struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Pratt" <thechrispr...@gmail.com>
Subject Selecting over Static Maps from Resource Bundle
Date Tue, 04 Mar 2008 01:02:21 GMT
Is it possible to place the data for the list attribute of an
<s:select> tag in a resource bundle (so that it can be
internationalized)?  I have tried adding the data to my
application.properties file:

gender.map='FEMALE':'Female','MALE':'Male'

Then referencing it in the JSP as:

<s:select name="gender" id="gender" list="#{(getText('gender.map'))}"/>

But this produces, the fairly unusable code:

<select name="gender" id="gender">
  <option value="FEMALE:Female,MALE:Male"></option>
</select>

Is there any way to get it to generate:

<select name="gender" id="gender">
  <option value="FEMALE">Female</option>
  <option value="MALE">Male</option>
</select>

Thanks.
  (*Chris*)

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


Mime
View raw message