Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: Release 1.4.3
-
Fix Version/s: None
-
Component/s: Tag Library
-
Labels:None
Description
It would be nice if the <stripes:option/> tag attempted to localise label values in the same way that <stripes:optionsCollection/> does (as described elsewhere here: http://stripesframework.org/jira/browse/STS-151)
Then you could use it alongside options-collection, and it would work in the same way. This would be useful, e.g. for adding a localised default 'please select' option:
<stripes:select name="country">
<stripes:option label="selectCountryMessageKey" value=""/>
<stripes:options-collection collection="${actionBean.countryList}" label="countryMessageKey" value="countryCode"/>
</stripes:select>
(where selectCountryMessageKey and countryMessageKey are localised values defined in the stripes resource bundle.)
For consistency, it would probably make sense to try the same lookups in the same order as the options-collection does, ie:
lookup: {className}.{labelPropertyValue}
lookup: {packageName}.{className}.{labelPropertyValue}
lookup: {className}.{valuePropertyValue}
lookup: {packageName}.{className}.{valuePropertyValue}
labelPropertyValue