Class SelectItemGroupChoice<T>

  • Type Parameters:
    T - Type of the value contained in this choice item.
    All Implemented Interfaces:
    de.xima.cmn.validation.spec.IChoiceEntry<T>, de.xima.cmn.validation.spec.IChoiceGroup<T>, Serializable

    public final class SelectItemGroupChoice<T>
    extends javax.faces.model.SelectItemGroup
    implements de.xima.cmn.validation.spec.IChoiceGroup<T>
    An IChoiceGroup with that is also a SelectItemGroup and can be used in JSF UIs. getChildren() is a view of the SelectItemGroup.getSelectItems() that cannot be modified. If you must modify the select items, modify the SelectItemGroup.getSelectItems() directly.

    Note: The inherited method SelectItemGroup.getSelectItems() returns an array of select items without a type parameter. Make sure you never write a select item to that array that is not compatible with the type parameter T of this class.

    Since:
    7.0.0
    Author:
    XIMA MEDIA GmbH
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      SelectItemGroupChoice​(String label, String description, boolean disabled, List<? extends de.xima.cmn.validation.spec.IChoiceEntry<T>> children)
      Creates a new choice group with the given data.
      SelectItemGroupChoice​(String label, String description, List<? extends SelectItemChoice<T>> children)
      Creates a new choice group with the given data that is enabled.
      SelectItemGroupChoice​(String label, List<? extends de.xima.cmn.validation.spec.IChoiceEntry<T>> children)
      Creates a new choice group with the given data that has no description and is enabled.
      SelectItemGroupChoice​(List<? extends de.xima.cmn.validation.spec.IChoiceEntry<T>> children)
      Creates a new choice group with the given data that has no label and no description and is enabled.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      List<? extends de.xima.cmn.validation.spec.IChoiceEntry<T>> getChildren()  
      • Methods inherited from class javax.faces.model.SelectItemGroup

        getSelectItems, setSelectItems
      • Methods inherited from class javax.faces.model.SelectItem

        getDescription, getLabel, getValue, isDisabled, isEscape, isNoSelectionOption, setDescription, setDisabled, setEscape, setLabel, setNoSelectionOption, setValue
      • Methods inherited from interface de.xima.cmn.validation.spec.IChoiceEntry

        getLabel, isDisabled
    • Constructor Detail

      • SelectItemGroupChoice

        public SelectItemGroupChoice​(List<? extends de.xima.cmn.validation.spec.IChoiceEntry<T>> children)
        Creates a new choice group with the given data that has no label and no description and is enabled.
        Parameters:
        children - Children contained in this group.
      • SelectItemGroupChoice

        public SelectItemGroupChoice​(String label,
                                     List<? extends de.xima.cmn.validation.spec.IChoiceEntry<T>> children)
        Creates a new choice group with the given data that has no description and is enabled.
        Parameters:
        label - A textual label for the entry.
        children - Children contained in this group.
      • SelectItemGroupChoice

        public SelectItemGroupChoice​(String label,
                                     String description,
                                     boolean disabled,
                                     List<? extends de.xima.cmn.validation.spec.IChoiceEntry<T>> children)
        Creates a new choice group with the given data.
        Parameters:
        label - A textual label for the entry.
        description - An optional description of the entry.
        disabled - Whether the item is disabled.
        children - Children contained in this group.
      • SelectItemGroupChoice

        public SelectItemGroupChoice​(String label,
                                     String description,
                                     List<? extends SelectItemChoice<T>> children)
        Creates a new choice group with the given data that is enabled.
        Parameters:
        label - A textual label for the entry.
        description - An optional description of the entry.
        children - Children contained in this group.
    • Method Detail

      • getChildren

        public List<? extends de.xima.cmn.validation.spec.IChoiceEntry<T>> getChildren()
        Specified by:
        getChildren in interface de.xima.cmn.validation.spec.IChoiceGroup<T>
        Returns:
        The children contained in this group. Note: This is an immutable view of SelectItemGroup.getSelectItems().