com.esri.adf.web.faces.component
Class SelectOneControl

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 javax.faces.component.UISelectOne
                      extended by com.esri.adf.web.faces.component.SelectOneControl
All Implemented Interfaces:
ToolbarItem, javax.faces.component.EditableValueHolder, javax.faces.component.StateHolder, javax.faces.component.ValueHolder

public class SelectOneControl
extends javax.faces.component.UISelectOne
implements ToolbarItem

The SelectOne Control is rendered as a "select" HTML element. The control generates a value changed event when a new value is selected from the dropdown box.


Field Summary
static String COMPONENT_FAMILY
          The standard component family for this component.
static String COMPONENT_TYPE
          The standard component type for this component.
 
Fields inherited from class javax.faces.component.UISelectOne
INVALID_MESSAGE_ID
 
Fields inherited from class javax.faces.component.UIInput
CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID, UPDATE_MESSAGE_ID
 
Fields inherited from class javax.faces.component.UIComponent
bindings
 
Constructor Summary
SelectOneControl()
          Initializes the SelectOne Control and sets the renderer type to null.
 
Method Summary
 void decode(javax.faces.context.FacesContext facesContext)
          Decodes the control value from the specified FacesContext.
 Element generateXML()
          Generates an XML representation of the control.
 String getFamily()
          Returns the family of this control.
protected  javax.faces.render.Renderer getRenderer(javax.faces.context.FacesContext context)
          Returns a design-time renderer if the component is used in an IDE.
 String getStyle()
          Returns the style attributes of this control.
 String getStyleClass()
          Returns the file name where the CSS style attributes are defined.
 String getToolText()
          Returns the tool text that is set for this control.
 boolean isClientPostBack()
          Indicates whether the control supports client side post back.
 boolean isDisabled()
          Indicates whether the control is disabled.
 boolean isInit()
          Indicates whether this control is initialized.
 boolean isShowLoadingImage()
          Indicates whether the control shows a loading image when the page is submited.
 void restoreState(javax.faces.context.FacesContext facesContext, Object state)
          Restores the state of the control.
 Object saveState(javax.faces.context.FacesContext facesContext)
          Saves the state of this control.
 void setClientPostBack(boolean clientPostBack)
          Sets whether the control supports client side post back.
 void setDisabled(boolean disabled)
          Sets an indicator whether to disable the control.
 void setInit(boolean init)
          Sets an indicator whether to initialize the control.
 void setShowLoadingImage(boolean showLoadingImage)
          Sets whether the loading image is shown for this control.
 void setStyle(String style)
          Sets the default style for this control.
 void setStyleClass(String styleClass)
          Sets the CSS class name where the CSS style attributes are defined.
 void setToolText(String toolText)
          Sets the text to be displayed for this control.
 
Methods inherited from class javax.faces.component.UISelectOne
validateValue
 
Methods inherited from class javax.faces.component.UIInput
addValidator, addValueChangeListener, compareValues, getConvertedValue, 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
 
Methods inherited from class javax.faces.component.UIOutput
getConverter, getLocalValue, getValue, setConverter
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
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, toString, wait, wait, wait
 
Methods inherited from interface javax.faces.component.ValueHolder
getConverter, getLocalValue, getValue, setConverter
 

Field Detail

COMPONENT_FAMILY

public static final String COMPONENT_FAMILY
The standard component family for this component.

See Also:
Constant Field Values

COMPONENT_TYPE

public static final String COMPONENT_TYPE
The standard component type for this component.

See Also:
Constant Field Values
Constructor Detail

SelectOneControl

public SelectOneControl()
Initializes the SelectOne Control and sets the renderer type to null. The renderer type is set to null since the parent Toolbar Control is responsible for rendering this control.

Method Detail

getFamily

public String getFamily()
Returns the family of this control.

Overrides:
getFamily in class javax.faces.component.UISelectOne
Returns:
String- the COMPONENT_FAMILY

getRenderer

protected javax.faces.render.Renderer getRenderer(javax.faces.context.FacesContext context)
Returns a design-time renderer if the component is used in an IDE.

Overrides:
getRenderer in class javax.faces.component.UIComponentBase
Parameters:
context - the FacesContext
Returns:
Renderer- the renderer object

isInit

public boolean isInit()
Indicates whether this control is initialized.

Returns:
boolean- if true, the control is initialized

setInit

public void setInit(boolean init)
Sets an indicator whether to initialize the control.

Parameters:
init - if true, initialize the control

getStyle

public String getStyle()
Returns the style attributes of this control.

Returns:
String- the style attributes

setStyle

public void setStyle(String style)
Sets the default style for this control.

Parameters:
style - the default style for this control

getStyleClass

public String getStyleClass()
Returns the file name where the CSS style attributes are defined.

Returns:
String- the CSS class

setStyleClass

public void setStyleClass(String styleClass)
Sets the CSS class name where the CSS style attributes are defined.

Parameters:
styleClass - the CSS class

getToolText

public String getToolText()
Returns the tool text that is set for this control.

Returns:
String- the tool text

setToolText

public void setToolText(String toolText)
Sets the text to be displayed for this control. The text is displayed when toolbar style is either IMAGEANDTEXT or TEXTONLY.

Parameters:
toolText - the text for this control

isDisabled

public boolean isDisabled()
Indicates whether the control is disabled.

Returns:
boolean- if true, the control is disabled

setDisabled

public void setDisabled(boolean disabled)
Sets an indicator whether to disable the control.

Parameters:
disabled - if true, disable the control

isShowLoadingImage

public boolean isShowLoadingImage()
Indicates whether the control shows a loading image when the page is submited.

Returns:
boolean- if true, the loading image is shown

setShowLoadingImage

public void setShowLoadingImage(boolean showLoadingImage)
Sets whether the loading image is shown for this control.

Parameters:
showLoadingImage - if true, the loading image is shown

isClientPostBack

public boolean isClientPostBack()
Indicates whether the control supports client side post back.

Returns:
boolean- if true, the client side post back is supported

setClientPostBack

public void setClientPostBack(boolean clientPostBack)
Sets whether the control supports client side post back.

Parameters:
clientPostBack - if true, the client side post back is supported

saveState

public Object saveState(javax.faces.context.FacesContext facesContext)
Saves the state of this control.

Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class javax.faces.component.UIInput
Parameters:
facesContext - the associated FacesContext
Returns:
Object- the object to be saved

restoreState

public void restoreState(javax.faces.context.FacesContext facesContext,
                         Object state)
Restores the state of the control.

Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class javax.faces.component.UIInput
Parameters:
facesContext - the associated FacesContext
state - the object from which to restore the state of the control

generateXML

public Element generateXML()
Generates an XML representation of the control.

Specified by:
generateXML in interface ToolbarItem
Returns:
Element- the XML element of the control

decode

public void decode(javax.faces.context.FacesContext facesContext)
Decodes the control value from the specified FacesContext.

Overrides:
decode in class javax.faces.component.UIInput
Parameters:
facesContext - the FacesContext