views:

33

answers:

1

I would like to use variable calculated in freemarker inside Struts tag. How can I do this in following situation:

<#assign val0=100 />
<#assign val1=1000 />
<@s.select value="amount" name="amount" label="Amount" id="amount"
list=r"%{#{val0:'text100', val1:'text1000'}}"/>

Currently this select is empty.

A: 

You access custom variables the same way you access variables from the data model.

${val0}
Andy Pryor
This doesn't work: r"%{#{${val0}:'text100', ${val1}:'text1000'}}", select is empty
Ula Krukar