com.sun.webui.jsf.component
Class RadioButtonGroup

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIOutput
              extended by javax.faces.component.UIInput
                  extended by com.sun.webui.jsf.component.WebuiInput
                      extended by com.sun.webui.jsf.component.Selector
                          extended by com.sun.webui.jsf.component.RadioButtonGroup
All Implemented Interfaces:
com.sun.webui.jsf.component.ComplexComponent, com.sun.webui.jsf.component.SelectorManager, javax.faces.component.EditableValueHolder, javax.faces.component.NamingContainer, javax.faces.component.StateHolder, javax.faces.component.ValueHolder

public class RadioButtonGroup
extends Selector
implements javax.faces.component.NamingContainer, com.sun.webui.jsf.component.ComplexComponent

The RadioButtonGroup component is used to display two or more radio buttons in a grid layout in the rendered HTML page.


Field Summary
 
Fields inherited from class javax.faces.component.UIInput
COMPONENT_FAMILY, COMPONENT_TYPE, CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_ID
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
RadioButtonGroup()
          Default constructor.
 
Method Summary
 int getColumns()
          Defines how many columns may be used to layout the radio buttons.
 java.lang.String getFamily()
          Return the family for this component.
 java.lang.String getFocusElementId(javax.faces.context.FacesContext context)
          Returns the id of an HTML element suitable to receive the focus.
 java.lang.String getHtmlTemplate()
          Get alternative HTML template to be used by this component.
 javax.faces.component.UIComponent getIndicatorComponent(javax.faces.context.FacesContext context, Label label)
          Return a component instance that can be referenced by a Label in order to evaluate the required and valid states of this component.
 java.lang.String getLabeledElementId(javax.faces.context.FacesContext context)
          Returns the absolute ID of an HTML element suitable for use as the value of an HTML LABEL element's for attribute.
 java.lang.String getOnBlur()
          Scripting code executed when this element loses focus.
 java.lang.String getOnChange()
          Scripting code executed when the element value of this component is changed.
 java.lang.String getOnFocus()
          Scripting code executed when this component receives focus.
 java.lang.String getOnSelect()
          Scripting code executed when some text in this component value is selected.
 java.lang.String getPrimaryElementID(javax.faces.context.FacesContext context)
          Deprecated.  
 java.lang.String getRendererType()
           
 java.lang.Object getValue()
           
 boolean isVisible()
          Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.
 void restoreState(javax.faces.context.FacesContext _context, java.lang.Object _state)
          Restore the state of this component.
 java.lang.Object saveState(javax.faces.context.FacesContext _context)
          Save the state of this component.
 void setColumns(int columns)
          Defines how many columns may be used to layout the radio buttons.
 void setHtmlTemplate(java.lang.String htmlTemplate)
          Set alternative HTML template to be used by this component.
 void setVisible(boolean visible)
          Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page.
 
Methods inherited from class com.sun.webui.jsf.component.Selector
getConvertedValue, getItems, getLabel, getLabelLevel, getOnClick, getOnDblClick, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getRendersChildren, getSelected, getStyle, getStyleClass, getTabIndex, getToolTip, getValueExpression, isDisabled, isMultiple, isReadOnly, setDisabled, setItems, setLabel, setLabelLevel, setMultiple, setOnBlur, setOnChange, setOnClick, setOnDblClick, setOnFocus, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setOnSelect, setReadOnly, setSelected, setStyle, setStyleClass, setTabIndex, setToolTip, setValueExpression, toString
 
Methods inherited from class com.sun.webui.jsf.component.WebuiInput
broadcast, getValidator, getValidatorExpression, getValueChangeListener, getValueChangeListenerExpression, processDecodes, processUpdates, processValidators, setConverter, setId, setImmediate, setRendered, setRequired, setValidatorExpression, setValueChangeListenerExpression
 
Methods inherited from class javax.faces.component.UIInput
addValidator, addValueChangeListener, decode, getConverterMessage, getRequiredMessage, getSubmittedValue, getValidatorMessage, getValidators, getValueChangeListeners, isImmediate, isLocalValueSet, isRequired, isValid, removeValidator, removeValueChangeListener, resetValue, setConverterMessage, setLocalValueSet, setRequiredMessage, setSubmittedValue, setValid, setValidator, setValidatorMessage, setValue, setValueChangeListener, updateModel, validate
 
Methods inherited from class javax.faces.component.UIOutput
getConverter, getLocalValue
 
Methods inherited from class javax.faces.component.UIComponentBase
encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getValueBinding, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, restoreAttachedState, saveAttachedState, setParent, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sun.webui.jsf.component.SelectorManager
getClientId
 
Methods inherited from interface javax.faces.component.ValueHolder
getConverter, getLocalValue
 

Constructor Detail

RadioButtonGroup

public RadioButtonGroup()
Default constructor.

Method Detail

getFamily

public java.lang.String getFamily()

Return the family for this component.

Overrides:
getFamily in class Selector

getRendererType

public java.lang.String getRendererType()
Overrides:
getRendererType in class javax.faces.component.UIComponentBase

getPrimaryElementID

public java.lang.String getPrimaryElementID(javax.faces.context.FacesContext context)
Deprecated. 

Implement this method so that it returns the DOM ID of the HTML element which should receive focus when the component receives focus, and to which a component label should apply. Usually, this is the first element that accepts input.

Specified by:
getPrimaryElementID in interface com.sun.webui.jsf.component.ComplexComponent
Parameters:
context - The FacesContext for the request
Returns:
The client id, also the JavaScript element id
See Also:
getLabeledElementId(javax.faces.context.FacesContext), getFocusElementId(javax.faces.context.FacesContext)

getLabeledElementId

public java.lang.String getLabeledElementId(javax.faces.context.FacesContext context)
Returns the absolute ID of an HTML element suitable for use as the value of an HTML LABEL element's for attribute. If the ComplexComponent has sub-compoents, and one of the sub-components is the target of a label, if that sub-component is a ComplexComponent, then getLabeledElementId must called on the sub-component and the value returned. The value returned by this method call may or may not resolve to a component instance.

Specified by:
getLabeledElementId in interface com.sun.webui.jsf.component.ComplexComponent
Parameters:
context - The FacesContext used for the request
Returns:
An abolute id suitable for the value of an HTML LABEL element's for attribute.

getFocusElementId

public java.lang.String getFocusElementId(javax.faces.context.FacesContext context)
Returns the id of an HTML element suitable to receive the focus. If the ComplexComponent has sub-compoents, and one of the sub-components is to reveive the focus, if that sub-component is a ComplexComponent, then getFocusElementId must called on the sub-component and the value returned. The value returned by this method call may or may not resolve to a component instance.

Specified by:
getFocusElementId in interface com.sun.webui.jsf.component.ComplexComponent
Parameters:
context - The FacesContext used for the request

getIndicatorComponent

public javax.faces.component.UIComponent getIndicatorComponent(javax.faces.context.FacesContext context,
                                                               Label label)
Return a component instance that can be referenced by a Label in order to evaluate the required and valid states of this component.

Specified by:
getIndicatorComponent in interface com.sun.webui.jsf.component.ComplexComponent
Parameters:
context - The current FacesContext instance
label - The Label that labels this component.
Returns:
a UIComponent in order to evaluate the required and valid states.

getOnBlur

public java.lang.String getOnBlur()
Description copied from class: Selector

Scripting code executed when this element loses focus.

Overrides:
getOnBlur in class Selector

getOnChange

public java.lang.String getOnChange()
Description copied from class: Selector

Scripting code executed when the element value of this component is changed.

Specified by:
getOnChange in interface com.sun.webui.jsf.component.SelectorManager
Overrides:
getOnChange in class Selector

getOnFocus

public java.lang.String getOnFocus()
Description copied from class: Selector

Scripting code executed when this component receives focus. An element receives focus when the user selects the element by pressing the tab key or clicking the mouse.

Overrides:
getOnFocus in class Selector

getOnSelect

public java.lang.String getOnSelect()
Description copied from class: Selector

Scripting code executed when some text in this component value is selected.

Overrides:
getOnSelect in class Selector

getValue

public java.lang.Object getValue()
Specified by:
getValue in interface javax.faces.component.ValueHolder
Overrides:
getValue in class javax.faces.component.UIOutput

getColumns

public int getColumns()

Defines how many columns may be used to layout the radio buttons. The value must be greater than or equal to one. The default value is one. Invalid values are ignored and the value is set to one.


setColumns

public void setColumns(int columns)

Defines how many columns may be used to layout the radio buttons. The value must be greater than or equal to one. The default value is one. Invalid values are ignored and the value is set to one.

See Also:
getColumns()

isVisible

public boolean isVisible()

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page. If set to false, the HTML code for the component is present in the page, but the component is hidden with style attributes. By default, visible is set to true, so HTML for the component HTML is included and visible to the user. If the component is not visible, it can still be processed on subsequent form submissions because the HTML is present.

Overrides:
isVisible in class Selector

setVisible

public void setVisible(boolean visible)

Use the visible attribute to indicate whether the component should be viewable by the user in the rendered HTML page. If set to false, the HTML code for the component is present in the page, but the component is hidden with style attributes. By default, visible is set to true, so HTML for the component HTML is included and visible to the user. If the component is not visible, it can still be processed on subsequent form submissions because the HTML is present.

Overrides:
setVisible in class Selector
See Also:
isVisible()

getHtmlTemplate

public java.lang.String getHtmlTemplate()
Get alternative HTML template to be used by this component.


setHtmlTemplate

public void setHtmlTemplate(java.lang.String htmlTemplate)
Set alternative HTML template to be used by this component.


restoreState

public void restoreState(javax.faces.context.FacesContext _context,
                         java.lang.Object _state)

Restore the state of this component.

Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class Selector

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext _context)

Save the state of this component.

Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class Selector


Copyright © 2008 Sun Microsystems, Inc. All Rights Reserved.