public interface InitiatorExt
Initiator to
have the better control.Initiator| Modifier and Type | Method and Description |
|---|---|
void |
doAfterCompose(Page page,
Component[] comps)
Called after all components are created (a.k.a., 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.
|
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<java.lang.String, java.lang.Object>)'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.Exceptionboolean 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<java.lang.String, java.lang.Object>).
ex - the exception being thrownjava.lang.Exceptionvoid doFinally()
throws java.lang.Exception
Initiator.doInit(org.zkoss.zk.ui.Page, java.util.Map<java.lang.String, java.lang.Object>) 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.ExceptionCopyright © 2005-2011 Potix Corporation. All Rights Reserved.