About this tag
This tag renders a listbox. Use the selected
attribute to associate the component with a model object that
represents the current choice, by setting the value to an EL
expression that corresponds to a property of a
managed bean.
Configuring the listbox tag
Use the multiple attribute to specify whether the
component accepts multiple selections. By default this is set to
false. If multiple selections are allowed, the model object
property must be either an array of primitives, an array of
objects, or a (subclass of) java.util.List .
Use the items attribute to specify the options
from which the web application user can choose. The value must be
an EL expression that identifies an array, a
java.util.Collection or a java.util.Map
of com.sun.rave.web.ui.Option .
The first time the component is rendered, the options which
correspond to the value of the selected model object
property is marked as selected, using the equals
method on the model object.
The number of list items simultaneously shown can be specified
using the rows attribute, and the component will be
rendered using a monospaced font if the useMonospace
attribute is set to true.
To optionally specify a label for the component, use the
label attribute, or specify a label facet.
Facets
label : use this facet to specify a custom
component for the label.
Client-side JavaScript functions
listbox_setDisabled(<id>, <disabled>) : use
this function to enable/disable the listbox. <id>
must be the generated id of the component. Set
<disabled> to true to disable the component,
false to enable it.
listbox_changed(<id>) : this
function is automatically invoked by the listbox's
onchange handler. <id>
must be the generated id of the component.
Examples
<ui:listbox selected="#{flightSearch.leaveAirport}"
items="#{dataBean.airports}"
rows="6"
id="leaveAirport"
toolTip="#{msgs.chooseAirport}"
label="#{msgs.chooseDepartureAirport)" />
<ui:listbox selected="#{flightSearch.leaveAirport}"
items="#{dataBean.airports}"
rows="6"
id="leaveAirport"
toolTip="#{msgs.chooseAirport}"
label="#{msgs.chooseDepartureAirport)" >
<f:facet name="label">
<facet component goes here>
</f:facet>
</ui:listbox>
Auto-generated component class.
Do NOT modify; all changes
will be lost!
|