Package org.eweb4j.mvc.action.annotation

Examples of org.eweb4j.mvc.action.annotation.ShowValMess


      m_sb.append(s);
    }

    String controlMethod = m_sb.toString();
    ShowValMess cls_vm = cls.getAnnotation(ShowValMess.class);
    String controlShowValErr = cls_vm == null ? "alert" : cls_vm.value();

    controlShowValErr = StringUtil.parsePropValue(controlShowValErr);

    String clazzName = cls.getName();

    String reqMethod = controlMethod.length() == 0 ? GET + "|" + POST + "|"
        + PUT + "|" + DELETE : controlMethod;// 默认四种HTTP方法都支持
    String valErrType = controlShowValErr.trim().length() == 0 ? "alert"
        : controlShowValErr;// 验证器验证信息输出方式默认”alert“

    String[] _methods = new String[4];
    _methods[0] = m.getAnnotation(GET.class) != null ? GET : "";
    _methods[1] = m.getAnnotation(POST.class) != null ? POST : "";
    _methods[2] = m.getAnnotation(DELETE.class) != null ? DELETE : "";
    _methods[3] = m.getAnnotation(PUT.class) != null ? PUT : "";

    StringBuilder _sb = new StringBuilder("");
    for (String s : _methods) {
      if (_sb.length() > 0 && s.length() > 0)
        _sb.append("|");

      _sb.append(s);
    }
    String m_reqMethod = _sb.toString();

    reqMethod = m_reqMethod.trim().length() > 0 ? m_reqMethod : reqMethod;

    ShowValMess m_vm = m.getAnnotation(ShowValMess.class);
    valErrType = m_vm == null ? "alert" : m_vm.value();

    controlShowValErr = StringUtil.parsePropValue(valErrType);

    // Action properties
    String propId = cls.getName();
View Full Code Here


      level = actionLevel.value();
    return level;
  }

  private static String parseShowValErrType(Class<?> cls, Method m) {
    ShowValMess cls_vm = cls.getAnnotation(ShowValMess.class);
    String clsShowValErr = cls_vm == null ? "alert" : cls_vm.value();

    clsShowValErr = StringUtil.parsePropValue(clsShowValErr);

    String methodShowValErr = clsShowValErr.trim().length() == 0 ? "alert" : clsShowValErr;// 验证器验证信息输出方式默认”alert“

    ShowValMess m_vm = m.getAnnotation(ShowValMess.class);
    methodShowValErr = m_vm == null ? methodShowValErr : m_vm.value();

    return methodShowValErr;
  }
View Full Code Here

TOP

Related Classes of org.eweb4j.mvc.action.annotation.ShowValMess

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.