djComboBox - Dojo Combo Box

Accepts a selected value.

Category

Dojo Form

Syntax

<xe:djComboBox attributes>content</xe:djComboBox>
Table 1. Essential properties
Property Description
id Defaults to djComboBox1, djComboBox2, and so on.
value Binds the control to a data element.

Usage

This is a Dojo control.

At run time, a dropdown box appears on the page presenting itemLabel choices and returning the selected one. Use embedded selectItem controls or an embedded selectItems control to specify the pairs of labels and values.

This control is not tested against the latest accessibility standards. The recommended accessible path is the Combo Box control.

Examples

This example consists of a Combo Box box bound to a scoped variable, a button for submitting the page, and a computed field that displays the value of the scoped variable.
<xp:table>
	<xp:tr>
		<xp:td>Combo Box</xp:td>
		<xp:td>
		<xe:djComboBox id="djComboBox1"
			value="#{sessionScope.djComboBox1}">
			<xp:selectItem itemLabel="Maine"></xp:selectItem>
			<xp:selectItem itemLabel="New Hampshire"></xp:selectItem>
			<xp:selectItem itemLabel="Vermont"></xp:selectItem>
			<xp:selectItem itemLabel="Massachusetts"></xp:selectItem>
			<xp:selectItem itemLabel="Rhode Island"></xp:selectItem>
			<xp:selectItem itemLabel="Connecticut"></xp:selectItem>
		</xe:djComboBox></xp:td>
	</xp:tr>
	<xp:tr>
		<xp:td>
			<xp:button value="submit" id="button1">
				<xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="false" save="true">
			</xp:eventHandler></xp:button>
		</xp:td>
		<xp:td></xp:td>
	</xp:tr>
	<xp:tr>
		<xp:td>Value</xp:td>
		<xp:td><xp:text escape="true" id="computedField1" value="#{sessionScope.djComboBox1}"></xp:text></xp:td>
	</xp:tr>
</xp:table>