Skip to main content
Participating Frequently
October 11, 2010
Answered

XML Configuration with token substitution

  • October 11, 2010
  • 1 reply
  • 1775 views

Hi,

I was trying out the new XML configuration support for Navigation today - great job on this Alex!

I was wondering if there was a way to do token substitution in the external xml config file, where the substituted values come from a properties file, along the lines of Spring.  Spring Actionscript decided to do it this way and it was very convenient... Here's an example:

<property file="config.properties" />

<object type="com.View1PM">

        <cairngorm:landmark name="${SOME_PROPERTY}"/>

</object>

And in a properties file called config.properties, define it this way:

# a comment

some_property=content.view1

I saw that there was a class that Xavi contributed to Parsley that seems related to this but wasn't sure whether it was completed or has evolved from there.  Is this currently possible in the way I describe above?

Best,

Bruce

This topic has been closed for replies.
Correct answer Alex Uhlmann

Hi Bruce,

Xavi still has his versions on his blog rialvalue.com but since Parsley 2.3 there's also property file support there. http://www.spicefactory.org/parsley/docs/2.3/manual/?page=config&section=properties

1 reply

Alex UhlmannCorrect answer
Participating Frequently
October 11, 2010

Hi Bruce,

Xavi still has his versions on his blog rialvalue.com but since Parsley 2.3 there's also property file support there. http://www.spicefactory.org/parsley/docs/2.3/manual/?page=config&section=properties

Participating Frequently
October 11, 2010

Oh this is great, didn't know it was just added in 2.3 - thanks for pointing me there!