Interface InitiatorExt

  • All Known Implementing Classes:
    Composition, GenericInitiator

    public interface InitiatorExt
    An extra interface that can be implemented with Initiator to have the better control.
    See Also:
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method 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.
    • Method Detail

      • doCatch

        boolean doCatch​(java.lang.Throwable ex)
                 throws java.lang.Exception
        Called when an exception occurs during the evaluation of the page.

        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 thrown
        whether to ignore the exception. If false is returned, the exception will be re-thrown. Note: once an initiator's doCatch returns true, the exception will be ignored and it means doCatch of the following initiators won't be called. Prior to ZK 3.0.0, void is returned and it means always re-thrown