|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.zk.ui.impl.ZScriptInitiator
public class ZScriptInitiator
An initiator used to evaluate a zscript file.
Used internally by Parser to evaluate
the init directive with zscript:
<?init zscript="xxx"?>
| Constructor Summary | |
|---|---|
ZScriptInitiator(ZScript script)
|
|
| Method Summary | |
|---|---|
void |
doInit(Page page,
java.util.Map<java.lang.String,java.lang.Object> args)
Does the initializes before the page is evaluated. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ZScriptInitiator(ZScript script)
| Method Detail |
|---|
public void doInit(Page page,
java.util.Map<java.lang.String,java.lang.Object> args)
throws java.lang.Exception
InitiatorNote: when it is called, Page.getDesktop(),
Page.getId() and Page.getTitle() all return null, since
the page is not initialized yet.
To get the current desktop, you have to use
Execution.getDesktop() (from
Executions.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)
by Page.setId(java.lang.String), Page.setTitle(java.lang.String) and Page.setStyle(java.lang.String).
In additions, Page.getRequestPath()
and Page.getAttribute(java.lang.String, int) are all available.
doInit in interface Initiatorpage - 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).
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||