public interface ExecutionInit
How this interface is used.
init(org.zkoss.zk.ui.Execution, org.zkoss.zk.ui.Execution)
is called.Modifier and Type | Method and Description |
---|---|
void |
init(Execution exec,
Execution parent)
Called when an execution is created and initialized.
|
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
Copyright © 2005-2023 Potix Corporation. All Rights Reserved.