Package org.zkoss.zk.ui.impl
Class ZScriptInitiator
- java.lang.Object
-
- org.zkoss.zk.ui.impl.ZScriptInitiator
-
-
Constructor Summary
Constructors Constructor Description ZScriptInitiator(ZScript script)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doInit(Page page, java.util.Map<java.lang.String,java.lang.Object> args)
Does the initializes before the page is evaluated.
-
-
-
Constructor Detail
-
ZScriptInitiator
public ZScriptInitiator(ZScript script)
-
-
Method Detail
-
doInit
public void doInit(Page page, java.util.Map<java.lang.String,java.lang.Object> args) throws java.lang.Exception
Description copied from interface:Initiator
Does the initializes before the page is evaluated.Note: when it is called,
Page.getDesktop()
,Page.getId()
andPage.getTitle()
all return null, since the page is not initialized yet. To get the current desktop, you have to useExecution.getDesktop()
(fromExecutions.getCurrent()
) instead. On the other hand, you can set the page's ID, title or style in this method (to override the declarations in the page definition) byPage.setId(java.lang.String)
,Page.setTitle(java.lang.String)
andPage.setStyle(java.lang.String)
. In additions,Page.getRequestPath()
andPage.getAttribute(java.lang.String, int)
are all available.- Specified by:
doInit
in interfaceInitiator
- Parameters:
page
- the page being evaluatedargs
- a map of arguments. Prior to 3.6.2, it is an array. To upgrade, use args.get("arg0") instead of args[0], args.get("arg1") instead of args[1] and so on. Of course, it is better to have a more meaningful name for each argument. If no argument is specified, args is an empty map (never null).- Throws:
java.lang.Exception
-
-