|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ExecutionInit
Used to initialize an execution when it is created.
How this interface is used.
init(org.zkoss.zk.ui.Execution, org.zkoss.zk.ui.Execution)
is called.
Method Summary | |
---|---|
void |
init(Execution exec,
Execution parent)
Called when an execution is created and initialized. |
Method Detail |
---|
void init(Execution exec, Execution parent) throws java.lang.Exception
Note: this method is called after exec is activated. In other words,
Executions.getCurrent()
is the same as
the exec argument.
When this method is called, you can retrieve the current page with
ExecutionCtrl.getCurrentPage()
.
However, the page is not initialized yet. In other words,
Page.getDesktop()
,
Page.getId()
and Page.getTitle()
all return null.
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.
exec
- the execution being created.parent
- the previous execution in the same (Servlet) request, or
null if this is the first execution of the request.
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |