Class UISelectItemGroups

All Implemented Interfaces:
PartialStateHolder, StateHolder, TransientStateHolder, ComponentSystemEventListener, FacesListener, SystemEventListenerHolder, EventListener

public class UISelectItemGroups extends UISelectItems

UISelectItemGroups is a component that may be nested inside a UISelectMany or UISelectOne component, and causes the addition of one or more SelectItemGroup of one or more SelectItem instances to the list of available options in the parent component. This component accepts only children of type UISelectItems or UISelectItem. The value attribute of this component, set either directly, or acquired indirectly via a ValueExpression, can be an array or Iterable of items of any type which is acceptable by the value attribute of any nested UISelectItems or UISelectItem component.

Since:
4.0
  • Field Details

    • COMPONENT_TYPE

      public static final String COMPONENT_TYPE

      The standard component type for this component.

      See Also:
  • Constructor Details

    • UISelectItemGroups

      public UISelectItemGroups()
  • Method Details

    • getValue

      public Object getValue()

      Iterate over the value attribute and wrap each item in a new SelectItemGroup instance whereby the item is exposed as a request attribute under the key specified by the var property. This must allow any nested UISelectItems or UISelectItem component to access the item via their attributes. Finally return these SelectItemGroup instances as an ordered collection.

      Overrides:
      getValue in class UISelectItems
      Returns:
      the value.