Package org.zkoss.zest

Examples of org.zkoss.zest.ZestException$Aide


    final Method mtd;
    try {
      final Class cls = Classes.forNameByThread(clsnm);
      mtd = Classes.getMethodBySignature(cls, sig, null);
    } catch (ClassNotFoundException ex) {
      throw new ZestException("Class not found: "+clsnm+", "+el.getLocator());
    } catch (Exception ex) {
      throw new ZestException("Method not found: "+sig+" in "+clsnm+", "+el.getLocator());
    }
    if ((mtd.getModifiers() & Modifier.STATIC) == 0)
      throw new ZestException("Not a static method: "+mtd+", "+el.getLocator());
    xelmtds.add(new Object[] {prefix, nm, new MethodFunction(mtd)});
  }
View Full Code Here


    return s == null || s.length() == 0;
  }
  private static void noELnorEmpty(String nm, String val, Item item)
  throws ZestException {
    if (isEmpty(val))
      throw new ZestException(nm + " cannot be empty, "+item.getLocator());
    noEL(nm, val, item);
  }
View Full Code Here

    noEL(nm, val, item);
  }
  private static void noEL(String nm, String val, Item item)
  throws ZestException {
    if (val != null && val.indexOf("${") >= 0)
      throw new ZestException(nm+" does not support EL expressions, "+item.getLocator());
  }
View Full Code Here

    return klass.newInstance();
  }
  public String execute(ActionContext ac, Object action) throws Exception {
    final String mtdnm = (String)_method.getValue(ac);
    if (mtdnm == null)
      throw new ZestException("Method, "+_method+", required for "+action);

    Method m1 = null, m2 = null;
    try {
      m1 = Classes.getMethodInPublic(action.getClass(), mtdnm,
        new Class[] {ActionContext.class});
View Full Code Here

            coerceParameters(ac, action);
          final String result = def.execute(ac, action);
          request.setAttribute("result", result);
          final ViewInfo viewInfo = def.getViewInfo(ac, result);
          if (viewInfo == null)
            throw new ZestException("No information specified for "+action+" under result is "+result+", when handling "+ac.getRequestPath());
          switch (viewInfo.getViewType()) {
          case REDIRECT:
            Https.sendRedirect(_ctx, request, response, viewInfo.getURI(), null, 0);
            break;
          case ERROR:
View Full Code Here

      final String code = (j >= 0 ? content.substring(0, j): content).trim();
      errMsg = j >= 0 ? content.substring(j + 1).trim(): null;
      try {
        errCode = Integer.parseInt(code);
      } catch (Throwable ex) {
        throw new ZestException("Unknown error: "+content);
      }
    } else if ("done".equals(stype)) {
      type = ViewType.DONE;
    } else {
      throw new ZestException("Unknown view type: "+stype);
    }
    return new VI(type, uri, errCode, errMsg);
  }
View Full Code Here

TOP

Related Classes of org.zkoss.zest.ZestException$Aide

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.