Package org.zkoss.zk.ui.util

Examples of org.zkoss.zk.ui.util.Initiator


   * It eats all exception without throwing one (but logging).
   * Caller has to re-throw the exception.
   */
  public boolean doCatch(Throwable t) {
    for (Iterator it = _inits.iterator(); it.hasNext();) {
      final Initiator init = (Initiator)it.next();
      try {
        try {
          if (init.doCatch(t))
            return true; //ignore and skip all other initiators
        } catch (AbstractMethodError ex) { //backward compatible prior to 3.0
          final Method m = init.getClass().getMethod(
              "doCatch", new Class[] {Throwable.class});
          Fields.setAccessible(m, true);
          m.invoke(init, new Object[] {t});
        }
      } catch (Throwable ex) {
View Full Code Here


  /** Invokes {@link Initiator#doFinally}.
   */
  public void doFinally() {
    Throwable t = null;
    for (Iterator it = _inits.iterator(); it.hasNext();) {
      final Initiator init = (Initiator)it.next();
      try {
        init.doFinally();
      } catch (Throwable ex) {
        Initiators.log.error(ex);
        if (t == null) t = ex;
      }
    }
View Full Code Here

    final List inits = new LinkedList();
    for (Iterator it = _initdefs.iterator(); it.hasNext();) {
      final InitiatorInfo def = (InitiatorInfo)it.next();
      try {
        final Initiator init = def.newInitiator(getEvaluator(), page);
        if (init != null) inits.add(init);
      } catch (Throwable ex) {
        throw UiException.Aide.wrap(ex);
      }
    }
View Full Code Here

TOP

Related Classes of org.zkoss.zk.ui.util.Initiator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.