- java.lang.Object
-
- javax.faces.model.SelectItem
-
- javax.faces.model.SelectItemGroup
-
- All Implemented Interfaces:
- Serializable
public class SelectItemGroup extends SelectItem
SelectItemGroup is a subclass of
SelectItem
that identifies a set of options that will be made available as a subordinate "submenu" or "options list", depending upon the requirements of theUISelectMany
orUISelectOne
renderer that is actually used. In general, thevalue
property of this instance will be ignored, and thelabel
property of this instance will be used to label the submenu.Although it is feasible to incorporate
SelectItemGroup
instances in heselectItems
property 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 Summary
Constructors Constructor and Description SelectItemGroup()
Construct aSelectItemGroup
with no initialized property values.SelectItemGroup(String label)
Construct aSelectItemGroup
with the specified label and no associatedselectItem
s.SelectItemGroup(String label, String description, boolean disabled, SelectItem[] selectItems)
Construct aSelectItemGroup
with the specified properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description SelectItem[]
getSelectItems()
Return the set of subordinateSelectItem
s for this group.void
setSelectItems(SelectItem[] selectItems)
Set the set of subordinateSelectItem
s for this group.-
Methods inherited from class javax.faces.model.SelectItem
getDescription, getLabel, getValue, isDisabled, isEscape, isNoSelectionOption, setDescription, setDisabled, setEscape, setLabel, setNoSelectionOption, setValue
-
-
-
-
Constructor Detail
-
SelectItemGroup
public SelectItemGroup()
Construct a
SelectItemGroup
with no initialized property values.
-
SelectItemGroup
public SelectItemGroup(String label)
Construct a
SelectItemGroup
with the specified label and no associatedselectItem
s. Thevalue
property will be set to a zero-length String, thedescription
property will be set tonull
, and thedisabled
property will be set to false.- Parameters:
label
- Label to be rendered for this group in the response- Throws:
NullPointerException
- iflabel
isfalse
-
SelectItemGroup
public SelectItemGroup(String label, String description, boolean disabled, SelectItem[] selectItems)
Construct a
SelectItemGroup
with the specified properties. Thevalue
property will be set to a zero-length String.- Parameters:
label
- Label to be rendered for this group in the responsedescription
- Description of this group, for use in toolsdisabled
- Flag indicating that this group is disabledselectItems
- Array ofSelectItem
describing the items available in this group- Throws:
NullPointerException
- iflabel
orselectItems
isfalse
-
-
Method Detail
-
getSelectItems
public SelectItem[] getSelectItems()
Return the set of subordinate
SelectItem
s for this group.
-
setSelectItems
public void setSelectItems(SelectItem[] selectItems)
Set the set of subordinate
SelectItem
s for this group.- Parameters:
selectItems
- The new set of subordinate items- Throws:
NullPointerException
- ifselectItems
isnull
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
21/08/2025 22:49:09 Cette version de la page est en cache (à la date du 21/08/2025 22:49:09) afin d'accélérer le traitement.Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la version plus récente de la page.
Document créé le 14/04/2008, dernière modification le 18/08/2025
Source du document imprimé : https://www.gaudry.be/java-api-javaee-rf-javax/faces/model/selectitemgroup.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.