Class UISelectItem

All Implemented Interfaces:
PartialStateHolder, StateHolder, TransientStateHolder, ComponentSystemEventListener, FacesListener, SystemEventListenerHolder, EventListener
Direct Known Subclasses:
UISelectItemGroup

public class UISelectItem extends UIComponentBase

UISelectItem is a component that may be nested inside a UISelectMany or UISelectOne component, and causes the addition of a SelectItem instance to the list of available options for the parent component. The contents of the SelectItem can be specified in one of the following ways:

  • The value attribute's value is an instance of SelectItem.
  • The associated ValueExpression points at a model data item of type SelectItem.
  • A new SelectItem instance is synthesized from the values of the itemDescription, itemDisabled, itemLabel, itemEscaped, and itemValue attributes.
  • Field Details Link icon

    • COMPONENT_TYPE Link icon

      public static final String COMPONENT_TYPE

      The standard component type for this component.

      See Also:
    • COMPONENT_FAMILY Link icon

      public static final String COMPONENT_FAMILY

      The standard component family for this component.

      See Also:
  • Constructor Details Link icon

    • UISelectItem Link icon

      public UISelectItem()

      Create a new UISelectItem instance with default property values.

  • Method Details Link icon

    • getFamily Link icon

      public String getFamily()
      Description copied from class: UIComponent

      Return the identifier of the component family to which this component belongs. This identifier, in conjunction with the value of the rendererType property, may be used to select the appropriate Renderer for this component instance. Note this method should NOT return null

      Specified by:
      getFamily in class UIComponent
      Returns:
      the component family (not null).
    • getItemDescription Link icon

      public String getItemDescription()

      Return the description for this selection item.

      Returns:
      the item description.
    • setItemDescription Link icon

      public void setItemDescription(String itemDescription)

      Set the description for this selection item.

      Parameters:
      itemDescription - The new description
    • isItemDisabled Link icon

      public boolean isItemDisabled()

      Return the disabled setting for this selection item.

      Returns:
      true is the item disabled, false otherwise.
    • setItemDisabled Link icon

      public void setItemDisabled(boolean itemDisabled)

      Set the disabled value for this selection item.

      Parameters:
      itemDisabled - The new disabled flag
    • isItemEscaped Link icon

      public boolean isItemEscaped()

      Return the escape setting for the label of this selection item.

      Returns:
      true if the item is escaped, false otherwise.
    • setItemEscaped Link icon

      public void setItemEscaped(boolean itemEscaped)

      Set the escape value for the label of this selection item.

      Parameters:
      itemEscaped - The new disabled flag
    • getItemLabel Link icon

      public String getItemLabel()

      Return the localized label for this selection item.

      Returns:
      the item label.
    • setItemLabel Link icon

      public void setItemLabel(String itemLabel)

      Set the localized label for this selection item.

      Parameters:
      itemLabel - The new localized label
    • getItemValue Link icon

      public Object getItemValue()

      Return the server value for this selection item.

      Returns:
      the item value.
    • setItemValue Link icon

      public void setItemValue(Object itemValue)

      Set the server value for this selection item.

      Parameters:
      itemValue - The new server value
    • getValue Link icon

      public Object getValue()

      Returns the value property of the UISelectItem.

      Returns:
      the value.
    • setValue Link icon

      public void setValue(Object value)

      Sets the value property of the UISelectItem.

      Parameters:
      value - the new value
    • isNoSelectionOption Link icon

      public boolean isNoSelectionOption()

      Return the value of the noSelectionOption property. If the value of this property is true, the system interprets the option represented by this UISelectItem instance as representing a "no selection" option. See UISelectOne.validateValue(jakarta.faces.context.FacesContext, java.lang.Object) and UISelectMany.validateValue(jakarta.faces.context.FacesContext, java.lang.Object) for usage.

      Returns:
      the no selection option.
      Since:
      2.0
    • setNoSelectionOption Link icon

      public void setNoSelectionOption(boolean noSelectionOption)

      Set the value of the noSelectionOption property.

      Parameters:
      noSelectionOption - the no selection option.
      Since:
      2.0