javax.faces.model

Class SelectItem

    • Constructor Detail

      • SelectItem

        public SelectItem()

        Construct a SelectItem with no initialized property values.

      • SelectItem

        public SelectItem(Object value)

        Construct a SelectItem with the specified value. The label property will be set to the value (converted to a String, if necessary), the description property will be set to null, the disabled property will be set to false, and the escape property will be set to ( true.

        Parameters:
        value - Value to be delivered to the model if this item is selected by the user
      • SelectItem

        public SelectItem(Object value,
                          String label)

        Construct a SelectItem with the specified value and label. The description property will be set to null, the disabled property will be set to false, and the escape property will be set to true.

        Parameters:
        value - Value to be delivered to the model if this item is selected by the user
        label - Label to be rendered for this item in the response
      • SelectItem

        public SelectItem(Object value,
                          String label,
                          String description)

        Construct a SelectItem instance with the specified value, label and description. This disabled property will be set to false, and the escape property will be set to true.

        Parameters:
        value - Value to be delivered to the model if this item is selected by the user
        label - Label to be rendered for this item in the response
        description - Description of this item, for use in tools
      • SelectItem

        public SelectItem(Object value,
                          String label,
                          String description,
                          boolean disabled)

        Construct a SelectItem instance with the specified property values. The escape property will be set to true.

        Parameters:
        value - Value to be delivered to the model if this item is selected by the user
        label - Label to be rendered for this item in the response
        description - Description of this item, for use in tools
        disabled - Flag indicating that this option is disabled
      • SelectItem

        public SelectItem(Object value,
                          String label,
                          String description,
                          boolean disabled,
                          boolean escape)

        Construct a SelectItem instance with the specified property values.

        Parameters:
        value - Value to be delivered to the model if this item is selected by the user
        label - Label to be rendered for this item in the response
        description - Description of this item, for use in tools
        disabled - Flag indicating that this option is disabled
        escape - Flag indicating that the text of this option should be escaped when rendered.
        Since:
        1.2
      • SelectItem

        public SelectItem(Object value,
                          String label,
                          String description,
                          boolean disabled,
                          boolean escape,
                          boolean noSelectionOption)

        Construct a SelectItem instance with the specified property values.

        Parameters:
        value - Value to be delivered to the model if this item is selected by the user
        label - Label to be rendered for this item in the response
        description - Description of this item, for use in tools
        disabled - Flag indicating that this option is disabled
        escape - Flag indicating that the text of this option should be escaped when rendered.
        noSelectionOption - Flag indicating that the current option is a "no selection" option
        Since:
        1.2
    • Method Detail

      • getDescription

        public String getDescription()

        Return a description of this item, for use in development tools.

      • setDescription

        public void setDescription(String description)

        Set the description of this item, for use in development tools.

        Parameters:
        description - The new description
      • isDisabled

        public boolean isDisabled()

        Return the disabled flag for this item, which should modify the rendered output to make this item unavailable for selection by the user if set to true.

      • setDisabled

        public void setDisabled(boolean disabled)

        Set the disabled flag for this item, which should modify the rendered output to make this item unavailable for selection by the user if set to true.

        Parameters:
        disabled - The new disabled flag
      • getLabel

        public String getLabel()

        Return the label of this item, to be rendered visibly for the user.

      • setLabel

        public void setLabel(String label)

        Set the label of this item, to be rendered visibly for the user.

        Parameters:
        label - The new label
      • getValue

        public Object getValue()

        Return the value of this item, to be delivered to the model if this item is selected by the user.

      • setValue

        public void setValue(Object value)

        Set the value of this item, to be delivered to the model if this item is selected by this user.

        Parameters:
        value - The new value
      • isEscape

        public boolean isEscape()

        If and only if this returns true, the code that renders this select item must escape the label using escaping syntax appropriate to the content type being rendered.

        Since:
        2.0
      • setEscape

        public void setEscape(boolean escape)

        Set the value of the escape property. See isEscape().

        Since:
        2.0
      • setNoSelectionOption

        public void setNoSelectionOption(boolean noSelectionOption)

        Set the value of the noSelectionOption property.

        Since:
        2.0

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 15:07:48 Cette version de la page est en cache (à la date du 21/08/2025 15:07:48) 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/SelectItem.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

  1. Consulter le document html Langue du document :fr Manuel PHP : https://docs.oracle.com, SelectItem (Java(TM) EE 7 Specification APIs)

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.