JSF Standard Dropdown List Component

See Also | Tutorials

You can drag the Standard JavaServer Faces Dropdown List component dropdown list icon from the Palette to the Visual Designer to create a Dropdown List (or combo box) that enables the user to click a drop button and select items from a list.

A Dropdown List is a list of items that initially displays as a single item and, when clicked, drops down into a list of multiple items. Only one item can be selected at a time. Dropdown Lists are the same as combo boxes in Swing and Microsoft Windows, and are called select lists in HTML.

A Dropdown List is a composite component: the enclosing component (dropdown) manages the style and behavior of the list itself, and the inside component (dropdownSelectItems) is used to bind to the actual items in the list. A third, related component named dropdownDefaultItems is created for each Dropdown List 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 Dropdown List to your page.

A Dropdown List renders as an HTML <select> tag with the size=1 attribute.

The value property of the Dropdown List is not rendered on the screen but is used when the form is submitted. The value property refers to the currently selected list element. The list displayed in the component is controlled by the dropdownSelectItems part of the component.

After adding a Dropdown List 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
Tutorials

Legal Notices