The ModeList component displays a graphical list of items, each with a label and optional icon image. Only one of the items can be selected at any time. The currently selected item is shown in a different style. When the selection is changed by the user, the component updates and fires a standard actionListener event. Each item in the ModeList is represented by a ModeListItem component. This component supplies the label, optional icon and also a value which is set as the current value of the ModeList component when it becomes the selected item. The value can be retrieved from the component during the actionListener event handler.
This component can be optionally rendered horizontally to display a toolbar like UI element. Also it can be rendered in the form of a drop-down DHTML menu by setting the menu attribute to 'true'. It also features a large number of configurable CSS style elements to make it highly flexible in rendering style.