org.zkoss.jsf.zul
Class Init

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

public class Init
extends BaseInit

Init is a JSF component implementation for initial of page

Once this is specified, an instance inside this tag is created and Initiator.doInit(org.zkoss.zk.ui.Page, java.lang.Object[]) is called before the page is evaluated. Then, Initiator.doAfterCompose(org.zkoss.zk.ui.Page) is called after all components are created, and before any event is processed. In additions, Initiator.doFinally() is called after the page has been evaluated. If an exception occurs, Initiator.doCatch(java.lang.Throwable) is called.

A typical usage: starting a transaction in doInit, rolling back it in Initiator.doCatch(java.lang.Throwable) and commit it in Initiator.doFinally() (if Initiator.doCatch(java.lang.Throwable) is not called).

Usage:

 <z:init useClass="my.Init" arg0="hello"/>
 

This component should be declared nested under Page.

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

Author:
Dennis.Chen

Field Summary
 
Fields inherited from class javax.faces.component.UIComponent
bindings
 
Constructor Summary
Init()
           
 
Method Summary
 
Methods inherited from class org.zkoss.jsf.zul.impl.BaseInit
encodeEnd, getUseClass, restoreState, saveState, setDynamicAttribute, setUseClass
 
Methods inherited from class org.zkoss.jsf.zul.impl.AbstractComponent
findAncestorWithClass, getBodyContent, getComponentInfo, getFacesContext, getFamily, getIf, getUnless, isEffective, isSuppressed, loadZULTree, restoreAttachedMapState, saveAttachedMapState, setBodyContent, setIf, setSuppressed, setUnless
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, encodeBegin, encodeChildren, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, 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
 

Constructor Detail

Init

public Init()


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