Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3.16
-
None
-
None
Description
The <@s.text> macro is very useful for localization of text values. The <@s.textfield tag also takes a "key" > but, the select, radio, and checkbox options don't have good options for localization. One option raised on the list and identified in a few places is to construct a separate map of variables that have been localized in Freemarker and use that for localization (https://stackoverflow.com/questions/5548104/struts-select-tag-localization-implementation/17258640#17258640)... this does not seem sustainable or maintainable. Two possible methods for addressing this might be:
- update the documentation to better identify how to localize these values in the "approved" way
- implement a listKey parameter that like the textfield implementation or other implementations might call getText() on the key prior to rendering
<#if parameters.listKey??> <#assign itemValue><@s.text name="${stack.findString(parameters.listKey)}" /><#rt></#assign> <#elseif parameters.listValue??> <#assign itemValue = stack.findString(parameters.listValue)/> <#else> <#assign itemValue = stack.findString('top')/> </#if>
Attachments
Attachments
Issue Links
- is duplicated by
-
WW-3441 support list ui tag bind data by listValue beside by listKey
- Closed