struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <lau...@holoweb.net>
Subject Re: Localizing the list in a <s:select>-tag?
Date Sun, 12 Aug 2007 22:12:25 GMT
Toni Lyytikäinen wrote:
> Hello,
> 
> Is it possible to localize the options in the list attribute of the
> <s:select>-tag? I've tried several approaches but none of them seem to work.
> What I'm aiming at is something like the following:
> 
> <s:select name="somename"
>     list="#{
>         '01' : 'this should be some localized text from a bundle',
>         '02' : 'this text should be localized too',
>         }"
>     value="x"
> />
> 
> For some reason it seems to be impossible to use double quotes (") for the
> elements in the map, unless escaped, and the escaping means that the
> expression inside won't be evaluated.
> 

Have you tried something like (untested):

   list="#{'01': getText('message.key'), ...

L.


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


Mime
View raw message