Package de.xima.fc.choice
Class SelectItemChoice<T>
- java.lang.Object
-
- javax.faces.model.SelectItem
-
- de.xima.fc.choice.SelectItemChoice<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.IChoiceItem<T>
,Serializable
public final class SelectItemChoice<T> extends javax.faces.model.SelectItem implements de.xima.cmn.validation.spec.IChoiceItem<T>, Serializable
AIChoiceItem
that is also aSelectItem
and can be used in JSF UIs.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SelectItemChoice(T value)
Creates a new choice item with the given data with no description that is enabled and where the label is plain text.SelectItemChoice(T value, String label)
Creates a new choice item with the given data with no description that is enabled and where the label is plain text.SelectItemChoice(T value, String label, String description)
Creates a new choice item with the given data that is enabled and where the label is plain text.SelectItemChoice(T value, String label, String description, boolean disabled)
Creates a new choice item with the given data with a label that is plain text.SelectItemChoice(T value, String label, String description, boolean disabled, boolean escape)
Creates a new choice item with the given data.SelectItemChoice(T value, String label, String description, boolean disabled, boolean escape, boolean noSelectOption)
Creates a new choice item with the given data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getValue()
-
Methods inherited from class javax.faces.model.SelectItem
getDescription, getLabel, isDisabled, isEscape, isNoSelectionOption, setDescription, setDisabled, setEscape, setLabel, setNoSelectionOption, setValue
-
-
-
-
Constructor Detail
-
SelectItemChoice
public SelectItemChoice(T value)
Creates a new choice item with the given data with no description that is enabled and where the label is plain text. The label is extracted from the value viaObject.toString()
.- Parameters:
value
- The value represented by this choice item.
-
SelectItemChoice
public SelectItemChoice(T value, String label)
Creates a new choice item with the given data with no description that is enabled and where the label is plain text.- Parameters:
value
- The value represented by this choice item.label
- A textual label for the entry.
-
SelectItemChoice
public SelectItemChoice(T value, String label, String description)
Creates a new choice item with the given data that is enabled and where the label is plain text.- Parameters:
value
- The value represented by this choice item.label
- A textual label for the entry.description
- An optional description of the entry.
-
SelectItemChoice
public SelectItemChoice(T value, String label, String description, boolean disabled)
Creates a new choice item with the given data with a label that is plain text.- Parameters:
value
- The value represented by this choice item.label
- A textual label for the entry.description
- An optional description of the entry.disabled
- Whether the item is disabled.
-
SelectItemChoice
public SelectItemChoice(T value, String label, String description, boolean disabled, boolean escape)
Creates a new choice item with the given data.- Parameters:
value
- The value represented by this choice item.label
- A textual label for the entry.description
- An optional description of the entry.disabled
- Whether the item is disabled.escape
-true
if thelabel
is plain text,false
if thelabel
contains (HTML) markup. selected. The value of a no select option is usually eithernull
or the empty string.
-
SelectItemChoice
public SelectItemChoice(T value, String label, String description, boolean disabled, boolean escape, boolean noSelectOption)
Creates a new choice item with the given data.- Parameters:
value
- The value represented by this choice item.label
- A textual label for the entry.description
- An optional description of the entry.disabled
- Whether the item is disabled.escape
-true
if thelabel
is plain text,false
if thelabel
contains (HTML) markup.noSelectOption
-true
if this choice item is the no select option that is used when no value is selected. The value of a no select option is usually eithernull
or the empty string.
-
-