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
A
IChoiceItem
that is also a SelectItem
and can be used in JSF UIs.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSelectItemChoice
(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
Methods inherited from class javax.faces.model.SelectItem
getDescription, getLabel, isDisabled, isEscape, isNoSelectionOption, setDescription, setDisabled, setEscape, setLabel, setNoSelectionOption, setValue
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.xima.cmn.validation.spec.IChoiceEntry
getLabel, isDisabled
-
Constructor Details
-
SelectItemChoice
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
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
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
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.
-
-
Method Details
-
getValue
- Specified by:
getValue
in interfacede.xima.cmn.validation.spec.IChoiceItem<T>
- Overrides:
getValue
in classjavax.faces.model.SelectItem
-