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

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UICommand
              extended by com.esri.adf.web.faces.component.CommandControl
All Implemented Interfaces:
ToolbarItem, javax.faces.component.ActionSource, javax.faces.component.ActionSource2, javax.faces.component.StateHolder

public class CommandControl
extends javax.faces.component.UICommand
implements ToolbarItem

The Command control executes the server side action and/or action listener method for the control its associated with.


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.UIComponent
bindings
 
Constructor Summary
CommandControl()
          Initializes the Command control and sets the renderer type to null.
 
Method Summary
 void decode(javax.faces.context.FacesContext facesContext)
          Decodes the control ID from the specified FacesContext.
 Element generateXML()
          Generates an XML representation of the control.
 String getDefaultImage()
          Returns the default image that is set for this control.
 String getDisabledImage()
          Returns the disabled image that is set for this control.
 String getFamily()
          Returns the family of this control.
 String getHoverImage()
          Returns the hover image that is set for this control.
 String getSelectedImage()
          Returns the selected image that is set for this control.
 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.
 String getToolTip()
          Returns the alternate 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 setDefaultImage(String defaultImage)
          Sets the default image for this control.
 void setDisabled(boolean disabled)
          Sets an indicator whether to disable the control.
 void setDisabledImage(String disabledImage)
          Sets the disabled image for this control.
 void setHoverImage(String hoverImage)
          Sets the hover image for this control.
 void setInit(boolean init)
          Sets an indicator whether to initialize the control.
 void setSelectedImage(String selectedImage)
          Sets the selected image for this 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.
 void setToolTip(String toolTip)
          Sets the alternate text for this control.
 
Methods inherited from class javax.faces.component.UICommand
addActionListener, broadcast, getAction, getActionExpression, getActionListener, getActionListeners, getValue, isImmediate, queueEvent, removeActionListener, setAction, setActionExpression, setActionListener, setImmediate, setValue
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, 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
 

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

CommandControl

public CommandControl()
Initializes the Command 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.UICommand
Returns:
String- the COMPONENT_FAMILY

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

getToolTip

public String getToolTip()
Returns the alternate text that is set for this control.

Returns:
String- the alternate text

setToolTip

public void setToolTip(String toolTip)
Sets the alternate text for this control.

Parameters:
toolTip - the alternate text for this control

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. This text is displayed when toolbar style is either IMAGEANDTEXT or TEXTONLY.

Parameters:
toolText - the text for this control

getDefaultImage

public String getDefaultImage()
Returns the default image that is set for this control.

Returns:
String- the default image

setDefaultImage

public void setDefaultImage(String defaultImage)
Sets the default image for this control.

Parameters:
defaultImage - the default image for this control

getHoverImage

public String getHoverImage()
Returns the hover image that is set for this control.

Returns:
String- the hover image

setHoverImage

public void setHoverImage(String hoverImage)
Sets the hover image for this control.

Parameters:
hoverImage - the hover image for this control

getSelectedImage

public String getSelectedImage()
Returns the selected image that is set for this control.

Returns:
String- the selected image

setSelectedImage

public void setSelectedImage(String selectedImage)
Sets the selected image for this control.

Parameters:
selectedImage - the selected image for this control

getDisabledImage

public String getDisabledImage()
Returns the disabled image that is set for this control.

Returns:
String- the disabled image

setDisabledImage

public void setDisabledImage(String disabledImage)
Sets the disabled image for this control.

Parameters:
disabledImage - the disabled image 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.UICommand
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.UICommand
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 ID from the specified FacesContext.

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