org.apache.myfaces.trinidad.component
Class UIXCommand

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by org.apache.myfaces.trinidad.component.UIXComponent
          extended by org.apache.myfaces.trinidad.component.UIXComponentBase
              extended by org.apache.myfaces.trinidad.component.UIXCommand
All Implemented Interfaces:
javax.faces.component.ActionSource, javax.faces.component.StateHolder, DialogSource
Direct Known Subclasses:
CoreCommandButton, CoreCommandLink, CoreCommandNavigationItem

public class UIXCommand
extends UIXComponentBase
implements DialogSource, javax.faces.component.ActionSource

Events:

Type Phases Description
javax.faces.event.ActionEvent Invoke Application
Apply Request Values
Event delivered when the "action" of the component has been invoked; for example, by clicking on a button. The action may result in page navigation.
org.apache.myfaces.trinidad.event.ReturnEvent Apply Request Values Event delivered when the dialog has completed successfully.
org.apache.myfaces.trinidad.event.LaunchEvent Invoke Application
Apply Request Values
Event delivered to prompt the command to launch a dialog.
org.apache.myfaces.trinidad.event.AttributeChangeEvent Invoke Application
Apply Request Values
Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change events might include the width of a column that supported client-side resizing.


Field Summary
static PropertyKey ACTION_KEY
           
static PropertyKey ACTION_LISTENER_KEY
           
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
static PropertyKey IMMEDIATE_KEY
           
static PropertyKey LAUNCH_LISTENER_KEY
           
static PropertyKey RETURN_LISTENER_KEY
           
static FacesBean.Type TYPE
           
 
Fields inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase
BINDING_KEY, ID_KEY, RENDERED_KEY, RENDERER_TYPE_KEY, TRANSIENT_KEY
 
Constructor Summary
  UIXCommand()
          Construct an instance of the UIXCommand.
protected UIXCommand(java.lang.String rendererType)
          Construct an instance of the UIXCommand.
 
Method Summary
 void addActionListener(javax.faces.event.ActionListener listener)
          Adds a action listener.
 void addLaunchListener(LaunchListener listener)
          Adds a launch listener.
 void addReturnListener(ReturnListener listener)
          Adds a return listener.
 void broadcast(javax.faces.event.FacesEvent event)
           
 javax.faces.el.MethodBinding getAction()
          Gets a reference to an action method sent by the command component, or the static outcome of an action.
 javax.faces.el.MethodBinding getActionListener()
          Gets a method reference to an action listener
 javax.faces.event.ActionListener[] getActionListeners()
          Returns an array of attached action listeners.
protected  FacesBean.Type getBeanType()
           
 java.lang.String getFamily()
           
 javax.faces.el.MethodBinding getLaunchListener()
          Gets a method reference to a launch listener
 LaunchListener[] getLaunchListeners()
          Returns an array of attached launch listeners.
 javax.faces.el.MethodBinding getReturnListener()
          Gets a method reference to a return listener.This method is used to process dialog returnEvents which are generated as a result of either calling org.apache.myfaces.trinidad.context.RequestContext.returnFromDialog directly or declaratively through the use of a returnActionListener tag.
 ReturnListener[] getReturnListeners()
          Returns an array of attached return listeners.
 boolean isImmediate()
          Gets whether data validation - client-side or server-side - will be skipped when events are generated by this component.
 void queueEvent(javax.faces.event.FacesEvent e)
          Intercept queueEvent and mark the phaseId for the event to be PhaseId.APPLY_REQUEST_VALUES if the immediate flag is true, PhaseId.INVOKE_APPLICATION otherwise.
 void removeActionListener(javax.faces.event.ActionListener listener)
          Removes a action listener.
 void removeLaunchListener(LaunchListener listener)
          Removes a launch listener.
 void removeReturnListener(ReturnListener listener)
          Removes a return listener.
 void setAction(javax.faces.el.MethodBinding action)
          Sets a reference to an action method sent by the command component, or the static outcome of an action.
 void setActionListener(javax.faces.el.MethodBinding actionListener)
          Sets a method reference to an action listener
 void setImmediate(boolean immediate)
          Sets whether data validation - client-side or server-side - will be skipped when events are generated by this component.
 void setLaunchListener(javax.faces.el.MethodBinding launchListener)
          Sets a method reference to a launch listener
 void setReturnListener(javax.faces.el.MethodBinding returnListener)
          Sets a method reference to a return listener.This method is used to process dialog returnEvents which are generated as a result of either calling org.apache.myfaces.trinidad.context.RequestContext.returnFromDialog directly or declaratively through the use of a returnActionListener tag.
 
Methods inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase
addAttributeChange, addAttributeChangeListener, addFacesListener, broadcastToMethodBinding, createFacesBean, decode, decodeChildren, decodeChildrenImpl, encodeAll, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributeChangeListener, getAttributeChangeListeners, getAttributes, getBooleanProperty, getChildCount, getChildren, getClientId, getFacesBean, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacetNames, getFacets, getFacetsAndChildren, getId, getIntProperty, getLifecycleRenderer, getLocalClientId, getParent, getProperty, getPropertyKey, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, removeAttributeChangeListener, removeFacesListener, restoreState, saveState, setAttributeChangeListener, setBooleanProperty, setId, setIntProperty, setParent, setProperty, setRendered, setRendererType, setTransient, setValueBinding, toString, updateChildren, updateChildrenImpl, validateChildren, validateChildrenImpl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE

public static final FacesBean.Type TYPE

ACTION_KEY

public static final PropertyKey ACTION_KEY

ACTION_LISTENER_KEY

public static final PropertyKey ACTION_LISTENER_KEY

RETURN_LISTENER_KEY

public static final PropertyKey RETURN_LISTENER_KEY

LAUNCH_LISTENER_KEY

public static final PropertyKey LAUNCH_LISTENER_KEY

IMMEDIATE_KEY

public static final PropertyKey IMMEDIATE_KEY

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
See Also:
Constant Field Values

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
See Also:
Constant Field Values
Constructor Detail

UIXCommand

public UIXCommand()
Construct an instance of the UIXCommand.


UIXCommand

protected UIXCommand(java.lang.String rendererType)
Construct an instance of the UIXCommand.

Method Detail

queueEvent

public void queueEvent(javax.faces.event.FacesEvent e)

Intercept queueEvent and mark the phaseId for the event to be PhaseId.APPLY_REQUEST_VALUES if the immediate flag is true, PhaseId.INVOKE_APPLICATION otherwise.

Overrides:
queueEvent in class UIXComponentBase

broadcast

public void broadcast(javax.faces.event.FacesEvent event)
               throws javax.faces.event.AbortProcessingException
Overrides:
broadcast in class UIXComponentBase
Throws:
javax.faces.event.AbortProcessingException

getAction

public final javax.faces.el.MethodBinding getAction()
Gets a reference to an action method sent by the command component, or the static outcome of an action. If the action starts with "dialog:", useWindow attribute must be set to true.

Specified by:
getAction in interface javax.faces.component.ActionSource
Returns:
the new action value

setAction

public final void setAction(javax.faces.el.MethodBinding action)
Sets a reference to an action method sent by the command component, or the static outcome of an action. If the action starts with "dialog:", useWindow attribute must be set to true.

Specified by:
setAction in interface javax.faces.component.ActionSource
Parameters:
action - the new action value

getActionListener

public final javax.faces.el.MethodBinding getActionListener()
Gets a method reference to an action listener

Specified by:
getActionListener in interface javax.faces.component.ActionSource
Returns:
the new actionListener value

setActionListener

public final void setActionListener(javax.faces.el.MethodBinding actionListener)
Sets a method reference to an action listener

Specified by:
setActionListener in interface javax.faces.component.ActionSource
Parameters:
actionListener - the new actionListener value

getReturnListener

public final javax.faces.el.MethodBinding getReturnListener()
Gets a method reference to a return listener.This method is used to process dialog returnEvents which are generated as a result of either calling org.apache.myfaces.trinidad.context.RequestContext.returnFromDialog directly or declaratively through the use of a returnActionListener tag.

Specified by:
getReturnListener in interface DialogSource
Returns:
the new returnListener value

setReturnListener

public final void setReturnListener(javax.faces.el.MethodBinding returnListener)
Sets a method reference to a return listener.This method is used to process dialog returnEvents which are generated as a result of either calling org.apache.myfaces.trinidad.context.RequestContext.returnFromDialog directly or declaratively through the use of a returnActionListener tag.

Specified by:
setReturnListener in interface DialogSource
Parameters:
returnListener - the new returnListener value

getLaunchListener

public final javax.faces.el.MethodBinding getLaunchListener()
Gets a method reference to a launch listener

Specified by:
getLaunchListener in interface DialogSource
Returns:
the new launchListener value

setLaunchListener

public final void setLaunchListener(javax.faces.el.MethodBinding launchListener)
Sets a method reference to a launch listener

Specified by:
setLaunchListener in interface DialogSource
Parameters:
launchListener - the new launchListener value

isImmediate

public final boolean isImmediate()
Gets whether data validation - client-side or server-side - will be skipped when events are generated by this component. When immediate is true, the command's action and ActionListeners, including the default ActionListener provided by the JavaServer Faces implementation, will be executed during Apply Request Values phase of the request processing lifecycle, rather than waiting until the Invoke Application phase. Because validation runs during Process Validators (after Apply Request Values, but before Invoke Application), setting immediate to true will skip validation.

Specified by:
isImmediate in interface javax.faces.component.ActionSource
Returns:
the new immediate value

setImmediate

public final void setImmediate(boolean immediate)
Sets whether data validation - client-side or server-side - will be skipped when events are generated by this component. When immediate is true, the command's action and ActionListeners, including the default ActionListener provided by the JavaServer Faces implementation, will be executed during Apply Request Values phase of the request processing lifecycle, rather than waiting until the Invoke Application phase. Because validation runs during Process Validators (after Apply Request Values, but before Invoke Application), setting immediate to true will skip validation.

Specified by:
setImmediate in interface javax.faces.component.ActionSource
Parameters:
immediate - the new immediate value

addActionListener

public final void addActionListener(javax.faces.event.ActionListener listener)
Adds a action listener.

Specified by:
addActionListener in interface javax.faces.component.ActionSource
Parameters:
listener - the action listener to add

removeActionListener

public final void removeActionListener(javax.faces.event.ActionListener listener)
Removes a action listener.

Specified by:
removeActionListener in interface javax.faces.component.ActionSource
Parameters:
listener - the action listener to remove

getActionListeners

public final javax.faces.event.ActionListener[] getActionListeners()
Returns an array of attached action listeners.

Specified by:
getActionListeners in interface javax.faces.component.ActionSource
Returns:
an array of attached action listeners.

addReturnListener

public final void addReturnListener(ReturnListener listener)
Adds a return listener.

Specified by:
addReturnListener in interface DialogSource
Parameters:
listener - the return listener to add

removeReturnListener

public final void removeReturnListener(ReturnListener listener)
Removes a return listener.

Specified by:
removeReturnListener in interface DialogSource
Parameters:
listener - the return listener to remove

getReturnListeners

public final ReturnListener[] getReturnListeners()
Returns an array of attached return listeners.

Specified by:
getReturnListeners in interface DialogSource
Returns:
an array of attached return listeners.

addLaunchListener

public final void addLaunchListener(LaunchListener listener)
Adds a launch listener.

Specified by:
addLaunchListener in interface DialogSource
Parameters:
listener - the launch listener to add

removeLaunchListener

public final void removeLaunchListener(LaunchListener listener)
Removes a launch listener.

Specified by:
removeLaunchListener in interface DialogSource
Parameters:
listener - the launch listener to remove

getLaunchListeners

public final LaunchListener[] getLaunchListeners()
Returns an array of attached launch listeners.

Specified by:
getLaunchListeners in interface DialogSource
Returns:
an array of attached launch listeners.

getFamily

public java.lang.String getFamily()
Specified by:
getFamily in class UIXComponentBase

getBeanType

protected FacesBean.Type getBeanType()
Overrides:
getBeanType in class UIXComponentBase


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.