The <tc:selectManyListbox/>
create a list,
where more than one entry could be selected. Entries are added with
<tc:selectItem/>
(static) or
<tc:selectItems value="\#{controller.list}"/>
(from controller).
Tag Library Documentation:
In this example, there is a list with three items. The second one is disabled with the
itemDisabled
attribute of the
tag.
Select an entry and press the submit-button. The text in the outputfield depends on the selection.
<tc:selectManyListbox label="List" value="\#{selectManyListboxController.celestials}">
<tc:selectItem itemLabel="Sun" itemValue="The sun, "/>
...
</tc:selectManyListbox>
<tc:out label="Selection" value="\#{selectManyListboxController.celestial}"/>
The selected deserts from the list, are shown in the
<tc:out id="desertOutput" .../>
.
The value in the outputfield will be rerendered, after the selection in the list changed. For that,
<tc:selectManyListbox label="Deserts" size="4" ...>
contain a
<f:ajax render="desertOutput"/>
tag.
The number of rows is set to four by the size
attribute. Is no size set, the height of the list
depends of the number of rows. The list shows at least two rows. Values lower than two have no effect.