Esempio n. 1
0
 /* 标签结束方法 */
 public int doEndTag() throws JspTagException {
   Object value = getEqObj();
   DataValidation d = (DataValidation) TF.getBean("system.vaildator");
   ValidModel model =
       new ValidModel()
           .setValue(value)
           .setCheckRule(this.checkRule)
           .setCheckType(this.checkType)
           .setMessage(this.message);
   try {
     String result = d.valid(model);
     if (result.equals("")) {
       return EVAL_PAGE;
     } else {
       printError(result);
       return SKIP_PAGE;
     }
   } catch (Exception e) {
     ARE.getLog().error("valid_error:校验出错-" + e.toString(), e);
     printError("校验出错");
     return SKIP_PAGE;
   } finally {
     clear();
   }
 }