| ListBox |
The ListBox control creates a drop-down box (select tag).
The following sections describe attributes, child elements, and parent elements.
Attribute | Description |
|---|---|
label | Creates a label tag next to the select tag. |
labelposition | Where to place the label tag, "left" or "right"; default: left. |
id | id attribute of the select |
name | the name of the select; if omitted, will default to the id attribute |
enabled | true or false, whether the select can be modified or not |
emptyOption | true or false; if true, an empty value is added at the top fo the list |
items | XPath expression to select the items to put into the list |
valueNode | XPath expression to determine the value attribute of the option tag for each item; this expression is evaluated in the item's context |
textNode | XPath expression to determine the text inside the option tag for each item; this expression is evaluated in the item's context |
init | XPath expression to determine if the item is selected; this expression is evaluated in the item's context |
None.
Element | Description |
|---|---|
any xhtml or xsl tag |
The XHTML structure created by the acs:ListBox is the following:
<!-- if labelposition left --> <label for="myid">My label</label> <select id="myid" name="myid"> <!-- if emptyOption true --> <option value=""/> <option value="value1">text1</option> ... <option value="selectedvalue" selected="">selectedtext</option> ... <option value="valuen">textn</option> </select> <!-- if labelposition right --> <label for="myid">My label</label>
<BODY> <THEME> <ID>1</ID> <NAME>Test</NAME> <QUESTIONID>2</QUESTIONID> </THEME> <QUESTION> <ID>1</ID> <NAME>foo</NAME> </QUESTION> <QUESTION> <ID>2</ID> <NAME>bar</NAME> </QUESTION> </BODY>
<!-- Note that since the init XPath expression is evaluated in the item's context, we climb up to find the THEME tag --> <acs:ListBox id="mylist" items="QUESTION" valueNode="ID" textNode="NAME" init="../THEME/QUESTIONID" emptyOption="true"/>