Skip to main content
Participating Frequently
Oct 11, 2010 5:20 PM UTC
Answered

XML Configuration with token substitution

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 is closed to new replies. Start a new post to keep the conversation going.
Alex UhlmannCorrect answer
Participating Frequently
Oct 11, 2010 5:29 PM UTC

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

2 replies

Alex UhlmannCorrect answer
Participating Frequently
Oct 11, 2010 5:29 PM UTC

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

Translate
Participating Frequently
Oct 11, 2010 5:52 PM UTC

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

Translate