Please make sure you have read the Tag Syntax document and understand how tag attribute syntax works.
Note that the doublelistkey
and doublelistvalue
attribute will default to key
and value
respectively only when the doublelist
attribute is evaluated to a Map or its descendant. Other thing else, will result in doublelistkey
and doublelistvalue
to be null and not used.
{% remote_file_content https://raw.githubusercontent.com/apache/struts/master/core/src/site/resources/tags/doubleselect-description.html %}
{% remote_file_content https://raw.githubusercontent.com/apache/struts/master/core/src/site/resources/tags/doubleselect-attributes.html %}
<s:doubleselect label="doubleselect test1" name="menu" list="{'fruit','other'}" doubleName="dishes" doubleList="top == 'fruit' ? {'apple', 'orange'} : {'monkey', 'chicken'}" /> <s:doubleselect label="doubleselect test2" name="menu" list="#{'fruit':'Nice Fruits', 'other':'Other Dishes'}" doubleName="dishes" doubleList="top == 'fruit' ? {'apple', 'orange'} : {'monkey', 'chicken'}" />