|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface InitiatorExt
An extra interface that can be implemented with Initiator
to
have the better control.
Initiator
Method Summary | |
---|---|
void |
doAfterCompose(Page page,
Component[] comps)
Called after all components are created (aka., composed), and before any event is processed. |
boolean |
doCatch(java.lang.Throwable ex)
Called when an exception occurs during the evaluation of the page. |
void |
doFinally()
Do the cleanup after the page has been evaluated. |
Method Detail |
---|
void doAfterCompose(Page page, Component[] comps) throws java.lang.Exception
It won't be called if an un-caught exception occurs when creating components.
page
- the page that new components are attached to. It is the same
as Initiator.doInit(org.zkoss.zk.ui.Page, java.util.Map)
's page argument.comps
- the root components being created (never null, but the length
might be zero).
Note: It is not necessary the same as Page.getRoots()
, since
this method might be called thru Executions.createComponents(java.lang.String, org.zkoss.zk.ui.Component, java.util.Map, ?>)
.
java.lang.Exception
boolean doCatch(java.lang.Throwable ex) throws java.lang.Exception
If you don't want to handle the exception, simply returns false.
boolean doCatch(Throwable ex) {return false;}
An exception thrown in this method is simply logged. It has no effect on the execution. If you want to ignore the exception, just return true.
Notice: this method won't be called if the exception occurs
in Initiator.doInit(org.zkoss.zk.ui.Page, java.util.Map
.
ex
- the exception being thrown
java.lang.Exception
void doFinally() throws java.lang.Exception
Initiator.doInit(org.zkoss.zk.ui.Page, java.util.Map)
throws an exception.
However,it is always called no matter whether doCatch(java.lang.Throwable)
is called.
An exception thrown in this method is simply logged. It has no effect on the execution.
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |