Hi,
Am a fairly new user of Jelly and am wondering if there is a way to use
the value of a variable as the name of a new variable which I can then
dereference in my script.
Something like:
<j:set var="foo" value="a,b,c"/>
<j:set var="a.name" value="A"/>
<j:set var="b.name" value="B"/>
<j:set var="c.name" value="C"/>
<util:tokenize var="vars" delim=",">
${foo}
</util:tokenize>
<j:forEach var="var" varStatus="status" items="${vars.iterator()}">
echo ${ ${var}.name }
<-------------------- what is the syntax for this???
</j:forEach>
Output would be:
A
B
C
Do I use a dynabean?
Thanks,
Grant
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
|