Constructor: |
public SelectItem() {
super();
}
|
public SelectItem(Object value) {
this(value, value == null ? null : value.toString(), null, false, true, false);
}
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
|
public SelectItem(Object value,
String label) {
this(value, label, null, false, true, false);
}
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
|
public SelectItem(Object value,
String label,
String description) {
this(value, label, description, false, true, false);
}
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
|
public SelectItem(Object value,
String label,
String description,
boolean disabled) {
this(value, label, description, disabled, true, false);
}
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
|
public SelectItem(Object value,
String label,
String description,
boolean disabled,
boolean escape) {
this(value, label, description, disabled, escape, false);
}
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 -
|
public SelectItem(Object value,
String label,
String description,
boolean disabled,
boolean escape,
boolean noSelectionOption) {
super();
setValue(value);
setLabel(label);
setDescription(description);
setDisabled(disabled);
setEscape(escape);
setNoSelectionOption(noSelectionOption);
}
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 from javax.faces.model.SelectItem Detail: |
public String getDescription() {
return (this.description);
}
Return a description of this item, for use in development tools.
|
public String getLabel() {
return (this.label);
}
Return the label of this item, to be rendered visibly for the user.
|
public Object getValue() {
return (this.value);
}
Return the value of this item, to be delivered to the model
if this item is selected by the user.
|
public boolean isDisabled() {
return (this.disabled);
}
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 .
|
public boolean isEscape() {
return this.escape;
}
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.
|
public boolean isNoSelectionOption() {
return noSelectionOption;
}
Return the value of the
noSelectionOption property. If the value of this
property is true , the system interprets the option
represented by this SelectItem instance as
representing a "no selection" option. See UISelectOne#validateValue and UISelectMany#validateValue
for usage.
|
public void setDescription(String description) {
this.description = description;
}
Set the description of this item, for use in development tools.
|
public void setDisabled(boolean disabled) {
this.disabled = 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 .
|
public void setEscape(boolean escape) {
this.escape = escape;
}
|
public void setLabel(String label) {
this.label = label;
}
Set the label of this item, to be rendered visibly for the user.
|
public void setNoSelectionOption(boolean noSelectionOption) {
this.noSelectionOption = noSelectionOption;
}
|
public void setValue(Object value) {
this.value = value;
}
Set the value of this item, to be delivered to the model
if this item is selected by this user.
|