Top Description Fields Constructors Methods
jakarta.faces.component

public Class UISelectBoolean

extends UIInput
Class Inheritance
Known Direct Subclasses
jakarta.faces.component.html.HtmlSelectBooleanCheckbox
Imports
jakarta.el.ValueExpression

UISelectBoolean is a UIComponent that represents a single boolean (true or false) value. It is most commonly rendered as a checkbox.

By default, the rendererType property must be set to "jakarta.faces.Checkbox". This value can be changed by calling the setRendererType() method.

Field Summary

Modifier and TypeField and Description
public static final String
COMPONENT_FAMILY

Hides jakarta.faces.component.UIInput.COMPONENT_FAMILY.

The standard component family for this component.

public static final String
COMPONENT_TYPE

Hides jakarta.faces.component.UIInput.COMPONENT_TYPE.

The standard component type for this component.

Inherited from jakarta.faces.component.UIInput:
ALWAYS_PERFORM_VALIDATION_WHEN_REQUIRED_IS_TRUECONVERSION_MESSAGE_IDEMPTY_STRING_AS_NULL_PARAM_NAMEREQUIRED_MESSAGE_IDUPDATE_MESSAGE_IDVALIDATE_EMPTY_FIELDS_PARAM_NAMEvalidators

Constructor Summary

AccessConstructor and Description
public
UISelectBoolean()

Create a new UISelectBoolean instance with default property values.

Method Summary

Modifier and TypeMethod and Description
public String
getFamily()

Overrides jakarta.faces.component.UIInput.getFamily.

Return the identifier of the component family to which this component belongs.

public ValueExpression
getValueExpression(String
Name of the attribute or property for which to retrieve a ValueExpression
name
)

Overrides jakarta.faces.component.UIComponent.getValueExpression.

Return any ValueExpression set for value if a ValueExpression for selected is requested; otherwise, perform the default superclass processing for this method.

public boolean

Returns:

true if selected, false otherwise.
isSelected
()

Return the local value of the selected state of this component.

public void
setSelected(boolean
The new selected state
selected
)

Set the local value of the selected state of this component.

public void
setValueExpression(String
Name of the attribute or property for which to set a ValueExpression
name
,
ValueExpression
The ValueExpression to set, or null to remove any currently set ValueExpression
binding
)

Overrides jakarta.faces.component.UIComponent.setValueExpression.

Store any ValueExpression specified for selected under value instead; otherwise, perform the default superclass processing for this method.

Inherited from jakarta.faces.component.UIInput:
addValidatoraddValueChangeListenerclearInitialStatecompareValuesconsiderEmptyStringNulldecodegetConvertedValuegetConverterMessagegetRequiredMessagegetSubmittedValuegetValidatorMessagegetValidatorsgetValuegetValueChangeListenersisEmptyisImmediateisLocalValueSetisRequiredisValidmarkInitialStateprocessDecodesprocessUpdatesprocessValidatorsremoveValidatorremoveValueChangeListenerresetValuerestoreStatesaveStatesetConverterMessagesetImmediatesetLocalValueSetsetRequiredsetRequiredMessagesetSubmittedValuesetValidsetValidatorMessagesetValueupdateModelvalidatevalidateValue

Field Detail

COMPONENT_FAMILYback to summary
public static final String COMPONENT_FAMILY

Hides jakarta.faces.component.UIInput.COMPONENT_FAMILY.

The standard component family for this component.

COMPONENT_TYPEback to summary
public static final String COMPONENT_TYPE

Hides jakarta.faces.component.UIInput.COMPONENT_TYPE.

The standard component type for this component.

Constructor Detail

UISelectBooleanback to summary
public UISelectBoolean()

Create a new UISelectBoolean instance with default property values.

Method Detail

getFamilyback to summary
public String getFamily()

Overrides jakarta.faces.component.UIInput.getFamily.

Doc from jakarta.faces.component.UIComponent.getFamily.

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

Returns:String

the component family (not null).

Annotations
@Override
getValueExpressionback to summary
public ValueExpression getValueExpression(String name)

Overrides jakarta.faces.component.UIComponent.getValueExpression.

Return any ValueExpression set for value if a ValueExpression for selected is requested; otherwise, perform the default superclass processing for this method.

Parameters
name:String

Name of the attribute or property for which to retrieve a ValueExpression

Returns:ValueExpression

Doc from jakarta.faces.component.UIComponent.getValueExpression.

the value expression, or null.

Annotations
@Override
Exceptions
NullPointerException:
if name is null
Since
1.2
isSelectedback to summary
public boolean isSelected()

Return the local value of the selected state of this component. This method is a typesafe alias for getValue().

Returns:boolean

true if selected, false otherwise.

setSelectedback to summary
public void setSelected(boolean selected)

Set the local value of the selected state of this component. This method is a typesafe alias for setValue().

Parameters
selected:boolean

The new selected state

setValueExpressionback to summary
public void setValueExpression(String name, ValueExpression binding)

Overrides jakarta.faces.component.UIComponent.setValueExpression.

Store any ValueExpression specified for selected under value instead; otherwise, perform the default superclass processing for this method.

Parameters
name:String

Name of the attribute or property for which to set a ValueExpression

binding:ValueExpression

The ValueExpression to set, or null to remove any currently set ValueExpression

Annotations
@Override
Exceptions
NullPointerException:
if name is null
Since
1.2