org.zkoss.jsf.zul.impl
Class BaseCommand

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by org.zkoss.jsf.zul.impl.AbstractComponent
              extended by org.zkoss.jsf.zul.impl.LeafComponent
                  extended by org.zkoss.jsf.zul.impl.BranchComponent
                      extended by org.zkoss.jsf.zul.impl.BaseCommand
All Implemented Interfaces:
javax.faces.component.ActionSource, javax.faces.component.StateHolder
Direct Known Subclasses:
Button, Menuitem, Toolbarbutton

public abstract class BaseCommand
extends BranchComponent
implements javax.faces.component.ActionSource

The Base implementation of ActionSource.

Author:
Dennis.Chen

Field Summary
 
Fields inherited from class org.zkoss.jsf.zul.impl.LeafComponent
_compAttrMap, _composer
 
Fields inherited from class javax.faces.component.UIComponent
bindings
 
Constructor Summary
BaseCommand()
           
 
Method Summary
 void addActionListener(javax.faces.event.ActionListener listener)
           
 void broadcast(javax.faces.event.FacesEvent event)
           
 void decode(javax.faces.context.FacesContext facesContext)
          Override Method, decode and queue event
 javax.faces.el.MethodBinding getAction()
           
 javax.faces.el.MethodBinding getActionListener()
           
 javax.faces.event.ActionListener[] getActionListeners()
           
protected  java.lang.String getJSSubmitMethodName(javax.faces.context.FacesContext context)
           
protected  java.lang.String getJSSubmitScript(javax.faces.context.FacesContext context)
           
protected  boolean hasListener()
           
 boolean isImmediate()
           
 void queueEvent(javax.faces.event.FacesEvent event)
           
 void removeActionListener(javax.faces.event.ActionListener listener)
           
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
          Override Method, restore the state of this component.
 java.lang.Object saveState(javax.faces.context.FacesContext context)
          Override Method, save the state of this component.
 void setAction(javax.faces.el.MethodBinding action)
           
 void setActionListener(javax.faces.el.MethodBinding actionListener)
           
 void setImmediate(boolean immediate)
           
 
Methods inherited from class org.zkoss.jsf.zul.impl.BranchComponent
loadZULTree
 
Methods inherited from class org.zkoss.jsf.zul.impl.LeafComponent
addZULDynamicAttribute, afterZULComponentComposed, encodeBegin, encodeChildren, encodeEnd, evaluateDynaAttributes, getAttributeValue, getComponentDefName, getComponentInfo, getForward, getRendersChildren, getUse, getZULComponent, setAttributeValue, setForward, setId, setUse, setZULDynamicAttribute
 
Methods inherited from class org.zkoss.jsf.zul.impl.AbstractComponent
findAncestorWithClass, getBodyContent, getFacesContext, getFamily, getIf, getUnless, isEffective, isSuppressed, restoreAttachedMapState, saveAttachedMapState, setBodyContent, setIf, setSuppressed, setUnless
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getValueBinding, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, removeFacesListener, restoreAttachedState, saveAttachedState, 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
 

Constructor Detail

BaseCommand

public BaseCommand()
Method Detail

setAction

public void setAction(javax.faces.el.MethodBinding action)
Specified by:
setAction in interface javax.faces.component.ActionSource

getAction

public javax.faces.el.MethodBinding getAction()
Specified by:
getAction in interface javax.faces.component.ActionSource

setActionListener

public void setActionListener(javax.faces.el.MethodBinding actionListener)
Specified by:
setActionListener in interface javax.faces.component.ActionSource

getActionListener

public javax.faces.el.MethodBinding getActionListener()
Specified by:
getActionListener in interface javax.faces.component.ActionSource

addActionListener

public void addActionListener(javax.faces.event.ActionListener listener)
Specified by:
addActionListener in interface javax.faces.component.ActionSource

getActionListeners

public javax.faces.event.ActionListener[] getActionListeners()
Specified by:
getActionListeners in interface javax.faces.component.ActionSource

removeActionListener

public void removeActionListener(javax.faces.event.ActionListener listener)
Specified by:
removeActionListener in interface javax.faces.component.ActionSource

broadcast

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

queueEvent

public void queueEvent(javax.faces.event.FacesEvent event)
Overrides:
queueEvent in class javax.faces.component.UIComponentBase

setImmediate

public void setImmediate(boolean immediate)
Specified by:
setImmediate in interface javax.faces.component.ActionSource

isImmediate

public boolean isImmediate()
Specified by:
isImmediate in interface javax.faces.component.ActionSource

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Description copied from class: LeafComponent
Override Method, save the state of this component.

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

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Description copied from class: LeafComponent
Override Method, restore the state of this component.

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

getJSSubmitMethodName

protected java.lang.String getJSSubmitMethodName(javax.faces.context.FacesContext context)

getJSSubmitScript

protected java.lang.String getJSSubmitScript(javax.faces.context.FacesContext context)

hasListener

protected boolean hasListener()
Returns:
return true if there are any action or actionListener register in this component.

decode

public void decode(javax.faces.context.FacesContext facesContext)
Override Method, decode and queue event

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


Copyright © 2005-2007 Potix Corporation. All Rights Reserved.