JSF Standard Listbox Component

See Also

You can drag the Standard JavaServer Faces Listbox component listbox icon from the Palette to the Visual Designer to create a component that enables the user to select one item from a list of items. If the box is too small to contain the items in the list, the list box includes scrollbars. Only one item at a time can be selected. If you want a listbox in which multiple items can be selected, use the Basic Listbox component.

A Listbox is a composite component: the enclosing component (listbox) manages the style and behavior of the list itself, and the inside component (listboxSelectItems) is used to bind to the actual items in the list. A third, related component named listboxDefaultItems is created for each Listbox component that you add to the page and contains an array of static default items for the list (item1, item2, item3). This last component is not one that you typically work with. You can see all these components in the Navigator window after you add a Listbox to your page.

A Listbox renders as an HTML <select> tag with the size attribute set to a value greater than 1.

After adding a Listbox Component to a Visual Web JSF page, you can do a number of things with it:

See Also
Working With Components
Component Tasks: Quick Reference
About the Visual Web Palette

Legal Notices