| ListChooser |
The ListChooser is a special type of list control; it is intended for huge lists, and is composed of two parts: a text input in which you type the beginning of the item to search, and the list itself in an iframe.
The selected item is the one that is the closest alphabetically to the typed text, but it is always possible to select any value by clicking on the item.
The sort order is determined by the culture selected for the application.
The value is the key of the selected item, and is stored in a hidden input.
The following sections describe attributes, child elements, and parent elements.
Attribute | Description |
|---|---|
label | Creates a label tag next to the text input. |
labelposition | Where to place the label tag, "left" or "right"; default: left. |
id | id attribute of the hidden input. It determines the id attribute of several other tags:
|
name | the name of the hidden input; if omitted, will default to the id attribute |
list | XPath expression to select the items |
name-expression | XPath expression to select the text used for the sort order of an item; this expression is evaluated in the item's context |
id-expression | XPath expression to select the value for an item; this expression is evaluated in the item's context |
init | XPath attribute to initialize the selected item |
showselected | true or false; whether to change the text to the item's text at initialization; default: false |
Any xhtml / xsl tag; these tags will be used to determine the text displayed for an item. This text is different from the text used for the sort order, which is the name-expression attribute.
Element | Description |
|---|---|
any xhtml or xsl tag |
The XHTML structure created by the acs:ListChooser is the following:
<!-- if labelposition left --> <label for="myid">My label</label> <input type="text" id="myid_txt" name="myid_txt"/> <input type="hidden" id="myid" name="myid" value="myinitvalue"/> <!-- if labelposition right --> <label for="myid">My label</label><br/> <iframe id="myid_dir" scrolling="auto" frameborder="0" class="listchooser">   </iframe> <div id="myid_data" class="invisible"> <div id="bottom"></div> </div>
<acs:ListChooser showselected="true" id="enr13" label="{$codeLbl}" list="DAMAGE_CODE" id-expression="concat(CAT_GROUP,'_',CAT_CODE)" name-expression="CODE_TEXT" init="{concat(/BODY/CLAIM/DAMAGE_GROUP,'_',/BODY/CLAIM/DAMAGE_CODE)}"> <xsl:value-of select="CODE_TEXT" /> (<xsl:value-of select="GROUP_TEXT" />) </acs:ListChooser>