com.sun.webui.jsf.component
Class WebuiCommand

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UICommand
              extended by com.sun.webui.jsf.component.WebuiCommand
All Implemented Interfaces:
javax.faces.component.ActionSource, javax.faces.component.ActionSource2, javax.faces.component.StateHolder
Direct Known Subclasses:
Button, CommonTask, Hyperlink, SkipHyperlink

public class WebuiCommand
extends javax.faces.component.UICommand

Base class for components which need to extend UICommand.


Field Summary
 
Fields inherited from class javax.faces.component.UICommand
COMPONENT_FAMILY, COMPONENT_TYPE
 
Constructor Summary
WebuiCommand()
           
 
Method Summary
 void broadcast(javax.faces.event.FacesEvent event)
          Before calling super.broadcast, pass the ActionEvent being broadcast to the method referenced by actionListenerExpression (if any).
 javax.faces.el.MethodBinding getAction()
          
 javax.el.MethodExpression getActionExpression()
          MethodExpression representing the application action to invoke when this component is activated by the user.
 javax.faces.el.MethodBinding getActionListener()
          
 javax.el.MethodExpression getActionListenerExpression()
          Simply return the stored actionListenerExpression.
 void processDecodes(javax.faces.context.FacesContext context)
          Specialized decode behavior on top of that provided by the superclass.
 void processUpdates(javax.faces.context.FacesContext context)
          Specialized model update behavior on top of that provided by the superclass.
 void processValidators(javax.faces.context.FacesContext context)
          Specialized validation behavior on top of that provided by the superclass.
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
          
 java.lang.Object saveState(javax.faces.context.FacesContext context)
          
 void setActionListenerExpression(javax.el.MethodExpression me)
          Simply store the actionListenerExpression.
 void setId(java.lang.String id)
          The component identifier for this component.
 void setImmediate(boolean immediate)
          Flag indicating that event handling for this component should be handled immediately (in Apply Request Values phase) rather than waiting until Invoke Application phase.
 void setRendered(boolean rendered)
          Use the rendered attribute to indicate whether the HTML code for the component should be included in the rendered HTML page.
 
Methods inherited from class javax.faces.component.UICommand
addActionListener, getActionListeners, getFamily, getValue, isImmediate, queueEvent, removeActionListener, setAction, setActionExpression, setActionListener, setValue
 
Methods inherited from class javax.faces.component.UIComponentBase
decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRendererType, getRendersChildren, getValueBinding, getValueExpression, invokeOnComponent, isRendered, isTransient, processRestoreState, processSaveState, restoreAttachedState, saveAttachedState, setParent, setRendererType, setTransient, setValueBinding, setValueExpression
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebuiCommand

public WebuiCommand()
Method Detail

setId

public void setId(java.lang.String id)
The component identifier for this component. This value must be unique within the closest parent component that is a naming container.

Overrides:
setId in class javax.faces.component.UIComponentBase

setImmediate

public void setImmediate(boolean immediate)
Flag indicating that event handling for this component should be handled immediately (in Apply Request Values phase) rather than waiting until Invoke Application phase.

Specified by:
setImmediate in interface javax.faces.component.ActionSource
Overrides:
setImmediate in class javax.faces.component.UICommand

setRendered

public void setRendered(boolean rendered)
Use the rendered attribute to indicate whether the HTML code for the component should be included in the rendered HTML page. If set to false, the rendered HTML page does not include the HTML for the component. If the component is not rendered, it is also not processed on any subsequent form submission.

Overrides:
setRendered in class javax.faces.component.UIComponentBase

getAction

public javax.faces.el.MethodBinding getAction()

Specified by:
getAction in interface javax.faces.component.ActionSource
Overrides:
getAction in class javax.faces.component.UICommand

getActionListener

public javax.faces.el.MethodBinding getActionListener()

Specified by:
getActionListener in interface javax.faces.component.ActionSource
Overrides:
getActionListener in class javax.faces.component.UICommand

getActionExpression

public javax.el.MethodExpression getActionExpression()
MethodExpression representing the application action to invoke when this component is activated by the user. The expression must evaluate to a either a String or a public method that takes no parameters, and returns a String (the logical outcome) which is passed to the NavigationHandler for this application.

Specified by:
getActionExpression in interface javax.faces.component.ActionSource2
Overrides:
getActionExpression in class javax.faces.component.UICommand

getActionListenerExpression

public javax.el.MethodExpression getActionListenerExpression()

Simply return the stored actionListenerExpression. The broadcast method is overridden in WebuiCommand to invoke the actionListenerExpression.


setActionListenerExpression

public void setActionListenerExpression(javax.el.MethodExpression me)

Simply store the actionListenerExpression. The broadcast method is overridden in WebuiCommand to invoke the actionListenerExpression.


broadcast

public void broadcast(javax.faces.event.FacesEvent event)
               throws javax.faces.event.AbortProcessingException

Before calling super.broadcast, pass the ActionEvent being broadcast to the method referenced by actionListenerExpression (if any).

Overrides:
broadcast in class javax.faces.component.UICommand
Parameters:
event - FacesEvent to be broadcast
Throws:
javax.faces.event.AbortProcessingException - Signal the JavaServer Faces implementation that no further processing on the current event should be performed
java.lang.IllegalArgumentException - if the implementation class of this FacesEvent is not supported by this component
java.lang.NullPointerException - if event is null

processDecodes

public void processDecodes(javax.faces.context.FacesContext context)

Specialized decode behavior on top of that provided by the superclass.

Overrides:
processDecodes in class javax.faces.component.UIComponentBase
Parameters:
context - FacesContext for this request.

processValidators

public void processValidators(javax.faces.context.FacesContext context)

Specialized validation behavior on top of that provided by the superclass.

Overrides:
processValidators in class javax.faces.component.UIComponentBase
Parameters:
context - FacesContext for this request.

processUpdates

public void processUpdates(javax.faces.context.FacesContext context)

Specialized model update behavior on top of that provided by the superclass.

Overrides:
processUpdates in class javax.faces.component.UIComponentBase
Parameters:
context - FacesContext for this request.

restoreState

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

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

saveState

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

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


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