PDA

View Full Version : This is a difficult question to answer ...



mplanchart
04-18-2006, 03:30 PM
Hi,

First, I am using the file searcher bean from the Extras package.

Second, I created a bean that can obtain a value from a java properties file, by just giving the following parameters: Filename (obtained from file searcher), property key. The value, if it exists, is returned to a hidden bean property named 'propertyvalue', otherwise it will receive a default 'No Value Found!' string.

I want to concanetate several properties that I have been able to obtain that would end up in a variable called winProps if the platform is windows or linuxProps if the platform is Linux (pardon the redundancy). Now, my question is the following: How can I conditionally do this without having to create a wizard action for each one and for each platform?

Can conditional statements be used with the resolvers?

Is there something like the one-time popular iif? For example: iif( testCondition, trueExp, falseExp)




The more I work with IS MP 11.5 the more I like it. It's a great tool, but it does lack intuitivity and it requires improved documentation.

jweber
04-18-2006, 05:22 PM
Make one of the properies in your custom bean an array. For each element of the array store something like:

filename_from_searcher,property_to_get

Then just loop through the array, tokenize each element, processing and concatenating.

HTH