Package org.zkoss.zk.ui.metainfo
Class InitiatorInfo
- java.lang.Object
-
- 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
Constructors Constructor Description InitiatorInfo(java.lang.Class<? extends Initiator> cls, java.util.Map<java.lang.String,java.lang.String> args)
Constructs with a class, andnewInitiator(org.zkoss.zk.ui.metainfo.PageDefinition, org.zkoss.zk.ui.Page)
will instantiate a new instance.InitiatorInfo(java.lang.String clsnm, java.util.Map<java.lang.String,java.lang.String> args)
Constructs with a class name andnewInitiator(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 timenewInitiator(org.zkoss.zk.ui.metainfo.PageDefinition, org.zkoss.zk.ui.Page)
is called.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Initiator
newInitiator(PageDefinition pgdef, Page page)
Creates and returns the initiator, or null if no initiator is resolved.Initiator
newInitiator(Evaluator eval, Page page)
Creates and returns the initiator, or null if no initiator is resolved.
-
-
-
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, andnewInitiator(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 andnewInitiator(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 timenewInitiator(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 thatInitiator.doInit(org.zkoss.zk.ui.Page, java.util.Map<java.lang.String, java.lang.Object>)
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 thatInitiator.doInit(org.zkoss.zk.ui.Page, java.util.Map<java.lang.String, java.lang.Object>)
was called before returned.- Throws:
java.lang.Exception
- Since:
- 3.6.2
-
-