Class SelectItemGroup
- java.lang.Object
- 
- jakarta.faces.model.SelectItem
- 
- jakarta.faces.model.SelectItemGroup
 
 
- 
- All Implemented Interfaces:
- Serializable
 
 public class SelectItemGroup extends SelectItem SelectItemGroup is a subclass of SelectItemthat identifies a set of options that will be made available as a subordinate "submenu" or "options list", depending upon the requirements of theUISelectManyorUISelectOnerenderer that is actually used. In general, thevalueproperty of this instance will be ignored, and thelabelproperty of this instance will be used to label the submenu.Although it is feasible to incorporate SelectItemGroupinstances in heselectItemsproperty of this instance (thereby creating a data structure suitable for cascading submenus), some renderers may place restrictions on the level of nesting they support. For example, HTML based renderers that create an<select>element will typically render this instance as an<optgroup>element, but the HTML 4.01 Specification disallows nested option groups.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description SelectItemGroup()Construct aSelectItemGroupwith no initialized property values.SelectItemGroup(String label)Construct aSelectItemGroupwith the specified label and no associatedselectItems.SelectItemGroup(String label, String description, boolean disabled, SelectItem... selectItems)Construct aSelectItemGroupwith the specified properties.SelectItemGroup(String label, String description, boolean disabled, Collection<? extends SelectItem> selectItems)Construct aSelectItemGroupwith the specified properties.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description SelectItem[]getSelectItems()Return the set of subordinateSelectItems for this group.voidsetSelectItems(SelectItem... selectItems)Set the set of subordinateSelectItems for this group as a variable array.voidsetSelectItems(Collection<? extends SelectItem> selectItems)Set the set of subordinateSelectItems for this group as a collection.- 
Methods inherited from class jakarta.faces.model.SelectItemgetDescription, getLabel, getValue, isDisabled, isEscape, isNoSelectionOption, setDescription, setDisabled, setEscape, setLabel, setNoSelectionOption, setValue
 
- 
 
- 
- 
- 
Constructor Detail- 
SelectItemGrouppublic SelectItemGroup() Construct a SelectItemGroupwith no initialized property values.
 - 
SelectItemGrouppublic SelectItemGroup(String label) Construct a SelectItemGroupwith the specified label and no associatedselectItems. Thevalueproperty will be set to a zero-length String, thedescriptionproperty will be set tonull, and thedisabledproperty will be set to false.- Parameters:
- label- Label to be rendered for this group in the response
- Throws:
- NullPointerException- if- labelis- false
 
 - 
SelectItemGrouppublic SelectItemGroup(String label, String description, boolean disabled, SelectItem... selectItems) Construct a SelectItemGroupwith the specified properties. Thevalueproperty will be set to a zero-length String.- Parameters:
- label- Label to be rendered for this group in the response
- description- Description of this group, for use in tools
- disabled- Flag indicating that this group is disabled
- selectItems- Variable array of- SelectItemdescribing the items available in this group
- Throws:
- NullPointerException- if- labelor- selectItemsis- false
 
 - 
SelectItemGrouppublic SelectItemGroup(String label, String description, boolean disabled, Collection<? extends SelectItem> selectItems) Construct a SelectItemGroupwith the specified properties. Thevalueproperty will be set to a zero-length String.- Parameters:
- label- Label to be rendered for this group in the response
- description- Description of this group, for use in tools
- disabled- Flag indicating that this group is disabled
- selectItems- Collection of- SelectItemdescribing the items available in this group
- Throws:
- NullPointerException- if- labelor- selectItemsis- false
- Since:
- 4.0
 
 
- 
 - 
Method Detail- 
getSelectItemspublic SelectItem[] getSelectItems() Return the set of subordinate SelectItems for this group.- Returns:
- the set of subordinate SelectItems for this group
 
 - 
setSelectItemspublic void setSelectItems(SelectItem... selectItems) Set the set of subordinate SelectItems for this group as a variable array.- Parameters:
- selectItems- The new set of subordinate items as a variable array
- Throws:
- NullPointerException- if- selectItemsis- null
 
 - 
setSelectItemspublic void setSelectItems(Collection<? extends SelectItem> selectItems) Set the set of subordinate SelectItems for this group as a collection.- Parameters:
- selectItems- The new set of subordinate items as a collection.
- Throws:
- NullPointerException- if- selectItemsis- null
- Since:
- 4.0
 
 
- 
 
-