Apache Struts 2 Documentation > Home > Guides > Tag Developers Guide > Struts Tags > Tag Reference > UI Tag Reference > doubleselect
Added by digi9ten, last edited by Don Brown on Jan 06, 2007  (view change)
Please make sure you have read the Tag Syntax document and understand how tag attribute syntax works.
Important

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 decendant. Other thing else, will result in doublelistkey and doublelistvalue to be null and not used.

Description

Renders two HTML select elements with second one changing displayed values depending on selected entry of first one.

Parameters

Name

Required

Default

Evaluated

Type

Description

accesskey false true String Set the html accesskey attribute on rendered html element
cssClass false true String The css class to use for element
cssStyle false true String The css style definitions for element ro use
disabled false true String Set the html disabled attribute on rendered html element
doubleAccesskey false true String Set the html accesskey attribute.
doubleCssClass false true String The css class for the second list
doubleCssStyle false true String The css style for the second list
doubleDisabled false true String Decides if a disable attribute should be added to the second list
doubleEmptyOption false true String Decides if the second list will add an empty option
doubleHeaderKey false true String The header key for the second list
doubleHeaderValue false true String The header value for the second list
doubleId false true String The id of the second list
doubleList true true String The second iterable source to populate from.
doubleListKey false true String Set the list key of the second attribute
doubleListValue false true String The value expression to use for second list
doubleMultiple false true String Decides if multiple attribute should be set on the second list
doubleName true true String The name for complete component
doubleOnblur false true String Set the onblur attribute of the second list
doubleOnchange false true String Set the onchange attribute of the second list
doubleOnclick false true String Set the onclick attribute of the second list
doubleOndblclick false true String Set the ondbclick attribute of the second list
doubleOnfocus false true String Set the onfocus attribute of the second list
doubleOnkeydown false true String Set the onkeydown attribute of the second list
doubleOnkeypress false true String Set the onkeypress attribute of the second list
doubleOnkeyup false true String Set the onkeyup attribute of the second list
doubleOnmousedown false true String Set the onmousedown attribute of the second list
doubleOnmousemove false true String Set the onmousemove attribute of the second list
doubleOnmouseout false true String Set the onmouseout attribute of the second list
doubleOnmouseover false true String Set the onmouseover attribute of the second list
doubleOnmouseup false true String Set the onmouseup attribute of the second list
doubleOnselect false true String Set the onselect attribute of the second list
doubleSize false true String Set the size attribute of the second list
doubleValue false true String The value expression for complete component
emptyOption false false true Boolean Decides of an empty option is to be inserted in the second list
formName false true String The form name this component resides in and populates to
headerKey false true String Set the header key of the second list. Must not be empty! '-1' and '' is correct, '' is bad.
headerValue false true String Set the header value of the second list
id false true String id for referencing element. For UI and form tags it will be used as HTML id attribute
key false true String Set the key (name, value, label) for this particular component
label false true String Label expression used for rendering a element specific label
labelposition false true String Define label position of form element (top/left)
list true true String Iterable source to populate from. If the list is a Map (key, value), the Map key will become the option 'value' parameter and the Map value will become the option body.
listKey false true String Property of list objects to get field value from
listValue false true String Property of list objects to get field content from
multiple false true String Creates a multiple select. The tag will pre-select multiple values if the values are passed as an Array (of appropriate types) via the value attribute.
name false true String The name to set for element
onblur false true String Set the html onblur attribute on rendered html element
onchange false true String Set the html onchange attribute on rendered html element
onclick false true String Set the html onclick attribute on rendered html element
ondblclick false true String Set the html ondblclick attribute on rendered html element
onfocus false true String Set the html onfocus attribute on rendered html element
onkeydown false true String Set the html onkeydown attribute on rendered html element
onkeypress false true String Set the html onkeypress attribute on rendered html element
onkeyup false true String Set the html onkeyup attribute on rendered html element
onmousedown false true String Set the html onmousedown attribute on rendered html element
onmousemove false true String Set the html onmousemove attribute on rendered html element
onmouseout false true String Set the html onmouseout attribute on rendered html element
onmouseover false true String Set the html onmouseover attribute on rendered html element
onmouseup false true String Set the html onmouseup attribute on rendered html element
onselect false true String Set the html onselect attribute on rendered html element
required false false true Boolean If set to true, the rendered element will indicate that input is required
requiredposition false true String Define required position of required form element (left|right)
size false true Integer Size of the element box (# of elements to show)
tabindex false true String Set the html tabindex attribute on rendered html element
template false true String The template (other than default) to use for rendering the element
templateDir false true String The template directory.
theme false true String The theme (other than default) to use for rendering the element
title false true String Set the html title attribute on rendered html element
tooltip false true String Set the tooltip of this particular component
tooltipConfig false true String Set the tooltip configuration
value false true String Preset the value of input element.

Examples

<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'}" />