Tobago Demo

Menu

Listbox

The <tc:selectOneListbox/> create a list of entries, where only one entry can be selected. Items can be added with <tc:selectItem/> or <tc:selectItems/>.

Tag Library Documentation: <tc:selectOneListbox/> | <tc:selectItem/> | <tc:selectItems/>

Basics

If the number of rows is not set, die height of the list depends on the number of entries. The number of rows can be set by the size attribute. A list has at least two rows, therefor values less than two have no effect.

<tc:selectOneListbox label="List" size="3"> <tc:selectItem itemLabel="Alpha"/> ... </tc:selectOneListbox>

Simple Usage

Select a river in the list. After pressing the submit-button, the length of the river is shown in the output field.

Items are added with <tc:selectItem itemLabel="Nile" itemValue="6853 km"/>.

Ajax

Select a mountain in the list. The height will be displayed by <tc:out id="selectedMountain" .../>. The <tc:selectOneListbox/> contain a <f:ajax render="selectedMountain"/>, which rerender the output field.

© 2005-2023 Apache Software Foundation, Licensed under the Apache License, Version 2.0.