|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UIOutput
javax.faces.component.UIInput
com.sun.rave.web.ui.component.SelectorBase
com.sun.rave.web.ui.component.Selector
com.sun.rave.web.ui.component.RbCbSelectorBase
com.sun.rave.web.ui.component.RbCbSelector
public class RbCbSelector
Superclass for Checkbox and RadioButton.
| Field Summary | |
|---|---|
static java.lang.String |
IMAGE_FACET
Image facet name. |
static java.lang.String |
LABEL_FACET
Label facet name. |
| Fields inherited from class com.sun.rave.web.ui.component.Selector |
|---|
valueTypeEvaluator |
| Fields inherited from class javax.faces.component.UIInput |
|---|
COMPONENT_FAMILY, COMPONENT_TYPE, CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_ID |
| Fields inherited from class javax.faces.component.UIComponent |
|---|
bindings |
| Constructor Summary | |
|---|---|
RbCbSelector()
|
|
| Method Summary | |
|---|---|
protected void |
addToRequestMap(javax.faces.context.FacesContext context,
java.lang.String groupName)
Implemented by subclasses in order to reflect the selection state of this component id part of a group. |
protected javax.faces.component.UIComponent |
createImageComponent()
Create a com.sun.rave.web.ui.component.ImageComponent to represent the image for this component. |
protected javax.faces.component.UIComponent |
createLabelComponent()
Create a com.sun.rave.web.ui.component.Label to represent
the label for this component. |
void |
encodeBegin(javax.faces.context.FacesContext context)
Encode the component. |
java.lang.Object |
getConvertedValue(javax.faces.context.FacesContext context,
java.lang.Object submittedValue)
Convert the submittedValue argument. |
java.lang.Object |
getConvertedValue(javax.faces.context.FacesContext context,
RbCbSelector component,
java.lang.Object submittedValue)
Convert the submittedValue argument. |
javax.faces.component.UIComponent |
getImageComponent()
Returns a UIComponent that represents the image for this component. |
javax.faces.component.UIComponent |
getLabelComponent()
Returns a UIComponent that represents the label for this component. |
java.lang.Object |
getSelectedValue()
Return the value of the selectedValue property. |
boolean |
isChecked()
Return true if the control is checked. |
| Methods inherited from class com.sun.rave.web.ui.component.RbCbSelectorBase |
|---|
getFamily, getImageURL, getName, getSelected, getValueBinding, restoreState, saveState, setImageURL, setName, setSelected, setSelectedValue, setValueBinding |
| Methods inherited from class com.sun.rave.web.ui.component.Selector |
|---|
compareValues, getLabelLevel, getRendersChildren, getValueAsReadOnly, isMultiple, setMultiple, toString |
| Methods inherited from class com.sun.rave.web.ui.component.SelectorBase |
|---|
getItems, getLabel, getOnBlur, getOnChange, getOnClick, getOnDblClick, getOnFocus, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getOnSelect, getStyle, getStyleClass, getTabIndex, getToolTip, isDisabled, isReadOnly, isVisible, setDisabled, setItems, setLabel, setLabelLevel, setOnBlur, setOnChange, setOnClick, setOnDblClick, setOnFocus, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setOnSelect, setReadOnly, setStyle, setStyleClass, setTabIndex, setToolTip, setVisible |
| Methods inherited from class javax.faces.component.UIInput |
|---|
addValidator, addValueChangeListener, decode, getConverterMessage, getRequiredMessage, getSubmittedValue, getValidator, getValidatorMessage, getValidators, getValueChangeListener, getValueChangeListeners, isImmediate, isLocalValueSet, isRequired, isValid, processDecodes, processUpdates, processValidators, removeValidator, removeValueChangeListener, resetValue, setConverterMessage, setImmediate, setLocalValueSet, setRequired, setRequiredMessage, setSubmittedValue, setValid, setValidator, setValidatorMessage, setValue, setValueChangeListener, updateModel, validate, validateValue |
| Methods inherited from class javax.faces.component.UIOutput |
|---|
getConverter, getLocalValue, getValue, setConverter |
| Methods inherited from class javax.faces.component.UIComponentBase |
|---|
addFacesListener, broadcast, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient |
| Methods inherited from class javax.faces.component.UIComponent |
|---|
encodeAll, getContainerClientId, getValueExpression, setValueExpression |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.sun.rave.web.ui.component.SelectorManager |
|---|
getClientId, getOnChange, getStyle, getStyleClass, getTabIndex, isDisabled, isReadOnly |
| Methods inherited from interface javax.faces.component.ValueHolder |
|---|
getConverter, getLocalValue, getValue, setConverter |
| Field Detail |
|---|
public static final java.lang.String IMAGE_FACET
public static final java.lang.String LABEL_FACET
| Constructor Detail |
|---|
public RbCbSelector()
| Method Detail |
|---|
protected void addToRequestMap(javax.faces.context.FacesContext context,
java.lang.String groupName)
context - the context for this request.groupName - the value of the name property.
public void encodeBegin(javax.faces.context.FacesContext context)
throws java.io.IOException
If this component is part of a group, ensure that the initial
state is reflected in the request map by calling
addToRequestMap.
encodeBegin in class javax.faces.component.UIComponentBasecontext - the context for this request.
java.io.IOException
public java.lang.Object getConvertedValue(javax.faces.context.FacesContext context,
java.lang.Object submittedValue)
throws javax.faces.convert.ConverterException
submittedValue argument.
If there is a renderer for this component,
its getConvertedValue() method is called and
the value returned by that method is returned.
If there is no renderer, and submittedValue is not
an instance of String[] or
String a ConverterException is thrown.
The submittedValue indicates selected if it is
String[1].length() != 0 or
String.length() != 0.
getSelectedValue() returns an
instance of Boolean, Boolean.FALSE is
returned.
If not selected and it's not a boolean control then an unselected
value is returned appropriate for the type of the selected
property. If the type of the selected property evaluates
to a primitive type by virtue of a value binding the appropriate
MIN_VALUE constant is returned. For example if the
type is int, new Integer(Integer.MIN_VALUE)
is returned.
If the type is not a primitive value "" is returned.
If the control is selected
ConversionUtilities.convertValueToObject() is called to
convert submittedValue.
If ConversionUtilities.convertValueToObject() returns
submittedValue, the value of the
getSelectedValue() property
is returned, else the value returned by
ConversionUtilities.convertValueToObject() is returned.
getConvertedValue in class Selectorcontext - the context of this request.submittedValue - the submitted String value of this component.
javax.faces.convert.ConverterException
public java.lang.Object getConvertedValue(javax.faces.context.FacesContext context,
RbCbSelector component,
java.lang.Object submittedValue)
throws javax.faces.convert.ConverterException
submittedValue argument.
If submittedValue is not
an instance of String[] or
String a ConverterException is thrown.
The submittedValue indicates selected if it is
String[1].length() != 0 or
String.length() != 0.
getSelectedValue() returns an
instance of Boolean, Boolean.FALSE is
returned.
If not selected and it's not a boolean control then an unselected
value is returned appropriate for the type of the selected
property. If the type of the selected property evaluates
to a primitive type by virtue of a value binding the appropriate
MIN_VALUE constant is returned. For example if the
type is int, new Integer(Integer.MIN_VALUE)
is returned.
If the type is not a primitive value "" is returned.
If the control is selected
ConversionUtilities.convertValueToObject() is called to
convert submittedValue.
If ConversionUtilities.convertValueToObject() returns
submittedValue, the value of the
getSelectedValue() property
is returned, else the value returned by
ConversionUtilities.convertValueToObject() is returned.
context - the context of this request.component - an RbCbSelector instance.submittedValue - the submitted String value of this component.
javax.faces.convert.ConverterExceptionpublic java.lang.Object getSelectedValue()
selectedValue property.
If selectedValue is null, then a Boolean
true instance is returned and the control will behave as a
boolean control.
getSelectedValue in class RbCbSelectorBasepublic boolean isChecked()
true if the control is checked.
A control is checked when the selectedValue property is
equal to the selected property.
public javax.faces.component.UIComponent getLabelComponent()
If a "label" facet exists, the UIComponent associated
with that facet is returned.
If a "label" facet does not exist and the label
property is not null, createLabelComponent is called
to create the label component.
public javax.faces.component.UIComponent getImageComponent()
If an "image" facet exists, the UIComponent associated
with that facet is returned.
If an "image" facet does not exist and the imageURL
property is not null, createImageComponent() is called
to create the image component.
protected javax.faces.component.UIComponent createLabelComponent()
com.sun.rave.web.ui.component.Label to represent
the label for this component.
protected javax.faces.component.UIComponent createImageComponent()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||