[EMAIL PROTECTED] wrote on Friday, November 28, 2003 1:29 AM:

> J�rg Schaible <[EMAIL PROTECTED]> wrote on 28/11/2003
> 02:17:16 AM:
> [snip]
>>>> So is there any solution to create such assembled variables?
>>> 
>>> 
>>> Use something like this:
>>> 
>>>                 <j:set
> var="variable">jdbc.database.${jdbc.os}</j:set>
>>>                 <j:set var="dbdatabase" value=
>>> "${context.findVariable(variable)}" />
>>> 
>>> This sets dbdatabase to the value of the variable ('jdbc.database.'
>>> + whatever was in the variable 'jdbc.os').
>> 
>> Does not work unfortunately. In your example I get an empty string as
>> content of "dbdatabase". Looking into Jelly examples I can use the
>> expression ${context.findVariable("variable")}, but this is
> equivalent
> to
>> ${variable} and delivers just the name of the created variable, but
>> not
> its value ..
> 
> It works fine for me. Can you post your example that doesn't work?

Silly me. Requesting the wrong (ant threrefor not-existing) property, will result in 
an empty string. I even managed to create such new variables with set or ask:

<j:set var="all.${var}" value="${defaultval}"/>
<i:ask question="${prompt}" answer="all.${var}" default="${defaultval}"/>

Works great. I did not expect this, since the var and answer attributes are documented 
as plain String values.

Thanks dion!

Regards,
J�rg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to