org.zkoss.zkplus.databind
Class AnnotateDataBinderInit

java.lang.Object
  extended by org.zkoss.zkplus.databind.AnnotateDataBinderInit
All Implemented Interfaces:
org.zkoss.zk.ui.util.Initiator

public class AnnotateDataBinderInit
extends java.lang.Object
implements org.zkoss.zk.ui.util.Initiator

This initiator class do following things:

  1. new an AnnotateDataBinder instance.
  2. set the AnnotateDataBinder instance as a variable "binder" in the ID Space of the root component as specified in arg0 "component-path".(if arg0 is not specified, use Page instead.)
  3. call DataBinder.loadAll() to initiate all UI components from the associated data bean.

Put the init PI as follows:

 <?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" [arg0="component|component-path"] [arg1="true|false"]?>
 

Where the arg0 is the component itself (via EL expression) or the component path that specifies the component the AnnotateDataBinder covers. If the arg0 is not specified or set to string "page", the AnnotateDataBinder will default to cover the whole page.

Where the arg1 is used to decide whether to load default binding configuration defined in lang-addon.xml. If the arg1 is not specified it is default to true. Note that you have to specify arg0 if you want to specify arg1.

Author:
Henri Chen
See Also:
AnnotateDataBinder

Field Summary
protected  AnnotateDataBinder _binder
          The AnnotateDataBinder created in doAfterCompose()
 
Constructor Summary
AnnotateDataBinderInit()
           
 
Method Summary
 void doAfterCompose(org.zkoss.zk.ui.Page page)
           
 void doCatch(java.lang.Throwable ex)
           
 void doFinally()
           
 void doInit(org.zkoss.zk.ui.Page page, java.lang.Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_binder

protected AnnotateDataBinder _binder
The AnnotateDataBinder created in doAfterCompose()

Constructor Detail

AnnotateDataBinderInit

public AnnotateDataBinderInit()
Method Detail

doAfterCompose

public void doAfterCompose(org.zkoss.zk.ui.Page page)
Specified by:
doAfterCompose in interface org.zkoss.zk.ui.util.Initiator

doCatch

public void doCatch(java.lang.Throwable ex)
Specified by:
doCatch in interface org.zkoss.zk.ui.util.Initiator

doFinally

public void doFinally()
Specified by:
doFinally in interface org.zkoss.zk.ui.util.Initiator

doInit

public void doInit(org.zkoss.zk.ui.Page page,
                   java.lang.Object[] args)
Specified by:
doInit in interface org.zkoss.zk.ui.util.Initiator


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