org.zkoss.zk.ui.metainfo
Class InitiatorInfo

java.lang.Object
  extended by org.zkoss.zk.ui.metainfo.InitiatorInfo

public class InitiatorInfo
extends java.lang.Object

The init directive in the ZUML page.

Note: we resolve the class by using Classes.forNameByThread. In other words, it doesn't support the class defined in zscript. Why not? Since there is no way to run zscript before the init directive (and better performance).

Note: it is not serializable.

Author:
tomyeh

Constructor Summary
InitiatorInfo(java.lang.Class<? extends Initiator> cls, java.util.Map<java.lang.String,java.lang.String> args)
          Constructs with a class, and newInitiator(org.zkoss.zk.ui.metainfo.PageDefinition, org.zkoss.zk.ui.Page) will instantiate a new instance.
InitiatorInfo(Initiator init, java.util.Map<java.lang.String,java.lang.String> args)
          Constructs with an initiator that will be reuse each time newInitiator(org.zkoss.zk.ui.metainfo.PageDefinition, org.zkoss.zk.ui.Page) is called.
InitiatorInfo(java.lang.String clsnm, java.util.Map<java.lang.String,java.lang.String> args)
          Constructs with a class name and newInitiator(org.zkoss.zk.ui.metainfo.PageDefinition, org.zkoss.zk.ui.Page) will instantiate a new instance.
 
Method Summary
 Initiator newInitiator(Evaluator eval, Page page)
          Creates and returns the initiator, or null if no initiator is resolved.
 Initiator newInitiator(PageDefinition pgdef, Page page)
          Creates and returns the initiator, or null if no initiator is resolved.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InitiatorInfo

public InitiatorInfo(java.lang.Class<? extends Initiator> cls,
                     java.util.Map<java.lang.String,java.lang.String> args)
Constructs with a class, and newInitiator(org.zkoss.zk.ui.metainfo.PageDefinition, org.zkoss.zk.ui.Page) will instantiate a new instance.

Parameters:
args - the map of arguments. Ignored if null.
Notice that, once assigned, the map belongs to this object, and the caller shall not access it again
Since:
3.6.2

InitiatorInfo

public InitiatorInfo(java.lang.String clsnm,
                     java.util.Map<java.lang.String,java.lang.String> args)
              throws java.lang.ClassNotFoundException
Constructs with a class name and newInitiator(org.zkoss.zk.ui.metainfo.PageDefinition, org.zkoss.zk.ui.Page) will instantiate a new instance.

Parameters:
clsnm - the class name; it could be an EL expression.
Throws:
java.lang.ClassNotFoundException
Since:
3.6.2

InitiatorInfo

public InitiatorInfo(Initiator init,
                     java.util.Map<java.lang.String,java.lang.String> args)
Constructs with an initiator that will be reuse each time newInitiator(org.zkoss.zk.ui.metainfo.PageDefinition, org.zkoss.zk.ui.Page) is called.

Since:
3.6.2
Method Detail

newInitiator

public Initiator newInitiator(PageDefinition pgdef,
                              Page page)
                       throws java.lang.Exception
Creates and returns the initiator, or null if no initiator is resolved. Notice that Initiator.doInit(org.zkoss.zk.ui.Page, java.util.Map) was called before returned.

Throws:
java.lang.Exception

newInitiator

public Initiator newInitiator(Evaluator eval,
                              Page page)
                       throws java.lang.Exception
Creates and returns the initiator, or null if no initiator is resolved. Notice that Initiator.doInit(org.zkoss.zk.ui.Page, java.util.Map) was called before returned.

Throws:
java.lang.Exception
Since:
3.6.2


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo