Example #1
0
 /** Invokes {@link Initiator#doFinally}. */
 public void doFinally() {
   Throwable t = null;
   if (_sysinitEx)
     for (int j = 0; j < _sysinits.length; ++j) {
       final Initiator init = _sysinits[j];
       if (init instanceof InitiatorExt) {
         try {
           ((InitiatorExt) init).doFinally();
         } catch (Throwable ex) {
           Initiators.log.error("", ex);
           if (t == null) t = ex;
         }
       }
     }
   if (_initEx)
     for (Initiator init : _inits) {
       if (init instanceof InitiatorExt) {
         try {
           ((InitiatorExt) init).doFinally();
         } catch (Throwable ex) {
           Initiators.log.error("", ex);
           if (t == null) t = ex;
         }
       }
     }
   if (t != null) throw UiException.Aide.wrap(t);
 }
Example #2
0
 /**
  * Invokes {@link Initiator#doAfterCompose}.
  *
  * @param page
  * @throws Exception
  */
 public void doAfterCompose(Page page, Component[] comps) throws Exception {
   if (_sysinitEx)
     for (int j = 0; j < _sysinits.length; ++j) {
       final Initiator init = _sysinits[j];
       if (init instanceof InitiatorExt) {
         if (comps == null) comps = new Component[0];
         ((InitiatorExt) init).doAfterCompose(page, comps);
       }
     }
   if (_initEx)
     for (Initiator init : _inits) {
       if (init instanceof InitiatorExt) {
         if (comps == null) comps = new Component[0];
         ((InitiatorExt) init).doAfterCompose(page, comps);
       }
     }
 }