pon., 21 lut 2022 o 20:38 Burton Rhodes <burtonrho...@gmail.com> napisał(a):
>
> I am using the s:select tag and filling it with a List<String> - pretty
> basic.  However, I am wanting to change the value that is displayed by
> adding a character before the String, but I can't figure out how to
> reference the item itself (since it's not an object with properties).
>
> The code below takes a List<String> mergeFieldCodes with values like:
> ["ExecutionDate", "FinanceDate", "ClosingDate"].  I am wanting the "value"
> part of the <select> tag to begin with a '$' symbol.
>
> <s:select name="teamplate.mergeFieldCode"
>     headerKey=""
>     headerValue="-- Select a Merge Field --"
>     list="mergeFieldCodes"
>     listKey="item"
>     listValue="%{'$' + item}"/>
>
> (in the code above, what do I replace "item" with??)
>
> <select>
>    <option value="ClosingDate">$ClosingDate</option>
>    <option value="FinanceDate">$FinanceDate</option>
> </select>
>
> I realize I could create a Map and add the values I want, but I would like
> to avoid that if possible.

I think you can use "top" or just omit setting up "listValue" attribute

<s:select name="teamplate.mergeFieldCode"
     headerKey=""
     headerValue="-- Select a Merge Field --"
     list="mergeFieldCodes"
     listKey="item"
     listValue="top"/>


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to