org.zkoss.jsf.zul
Class Toolbarbutton

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
                          extended by org.zkoss.jsf.zul.Toolbarbutton
All Implemented Interfaces:
javax.faces.component.ActionSource, javax.faces.component.StateHolder

public class Toolbarbutton
extends BaseCommand

Toolbarbutton is a JSF component implementation for Toolbarbutton, This component should be declared nested under Page. This class also implements ActionSource. That means you can use action and actionListener features on this component.
To use those features, you must declare a namespace of "http://java.sun.com/jsf/core" with a prefix (say 'f' in below example), add attribute of those feature with this namespace (for example f:required="true")in the jsf page. For more detail of ActionSource features of JSF, you can refer to http://java.sun.com/products/jsp/

Example of action :


 <z:toolbarbutton id="btn" label="submit" f:action="#{CommandBean.actionPerform}"/>
 

Example of actionListener :


 <z:toolbarbutton id="btn" label="submit" f:actionListener="#{CommandBean.onActionPerform}"/>
 

In some application server which doesn't support attribute namespace you can use attribute prefix 'f_' to replace attribute namespace
For example,

 <z:toolbarbutton  f_action="#{CommandBean.actionPerform}"/>
 

To know more ZK component features you can refer to http://www.zkoss.org/

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
Toolbarbutton()
           
 
Method Summary
protected  void loadZULTree(org.zkoss.zk.ui.Page page, java.io.StringWriter writer)
          Call by RootComponent or BranchComponent to load zk stuff and all it's children
 
Methods inherited from class org.zkoss.jsf.zul.impl.BaseCommand
addActionListener, broadcast, decode, getAction, getActionListener, getActionListeners, getJSSubmitMethodName, getJSSubmitScript, hasListener, isImmediate, queueEvent, removeActionListener, restoreState, saveState, setAction, setActionListener, setImmediate
 
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

Toolbarbutton

public Toolbarbutton()
Method Detail

loadZULTree

protected void loadZULTree(org.zkoss.zk.ui.Page page,
                           java.io.StringWriter writer)
                    throws java.io.IOException
Description copied from class: BranchComponent
Call by RootComponent or BranchComponent to load zk stuff and all it's children

Overrides:
loadZULTree in class BranchComponent
Throws:
java.io.IOException


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