Examples of FieldConfigBean


Examples of org.eweb4j.mvc.config.bean.FieldConfigBean

    if (val == null || !ValidatorConstant.EQUALS_VAL.equals(val.getName())) {
      val = new ValidatorConfigBean();
      val.setName(ValidatorConstant.EQUALS_VAL);
    }

    FieldConfigBean fcb = new FieldConfigBean();
    fcb.setName(fieldName);
    fcb.setMessage(ann.mess());
    ParamConfigBean pcb = new ParamConfigBean();
    pcb.setName(ValidatorConstant.EQUALS_TO_PARAM);
    pcb.setValue(ann.to());
    fcb.getParam().add(pcb);

    val.getField().add(fcb);

    return val;
  }
View Full Code Here

Examples of org.eweb4j.mvc.config.bean.FieldConfigBean

    if (val == null || !ValidatorConstant.CHINESE_VAL.equals(val.getName())) {
      val = new ValidatorConfigBean();
      val.setName(ValidatorConstant.CHINESE_VAL);
    }

    FieldConfigBean fcb = new FieldConfigBean();
    fcb.setName(fieldName);
    fcb.setMessage(ann.mess());

    val.getField().add(fcb);

    return val;
  }
View Full Code Here

Examples of org.eweb4j.mvc.config.bean.FieldConfigBean

    if (val == null || !ValidatorConstant.QQ_VAL.equals(val.getName())) {
      val = new ValidatorConfigBean();
      val.setName(ValidatorConstant.QQ_VAL);
    }

    FieldConfigBean fcb = new FieldConfigBean();
    fcb.setName(fieldName);
    fcb.setMessage(ann.mess());

    val.getField().add(fcb);

    return val;
  }
View Full Code Here

Examples of org.eweb4j.mvc.config.bean.FieldConfigBean

    if (val == null || !ValidatorConstant.DATE_VAL.equals(val.getName())) {
      val = new ValidatorConfigBean();
      val.setName(ValidatorConstant.DATE_VAL);
    }

    FieldConfigBean fcb = new FieldConfigBean();
    fcb.setName(fieldName);
    fcb.setMessage(ann.mess());
    ParamConfigBean pcb = new ParamConfigBean();
    pcb.setName(ValidatorConstant.DATE_FORMAT_PARAM);
    pcb.setValue(ann.format());
    fcb.getParam().add(pcb);

    val.getField().add(fcb);

    return val;
  }
View Full Code Here

Examples of org.eweb4j.mvc.config.bean.FieldConfigBean

    if (val == null || !ValidatorConstant.REQUIRED_VAL.equals(val.getName())) {
      val = new ValidatorConfigBean();
      val.setName(ValidatorConstant.REQUIRED_VAL);
    }

    FieldConfigBean fcb = new FieldConfigBean();
    fcb.setName(fieldName);
    fcb.setMessage(ann.mess());

    val.getField().add(fcb);

    return val;
  }
View Full Code Here

Examples of org.eweb4j.mvc.config.bean.FieldConfigBean

    if (val == null || !ValidatorConstant.FORBID_VAL.equals(val.getName())) {
      val = new ValidatorConfigBean();
      val.setName(ValidatorConstant.FORBID_VAL);
    }

    FieldConfigBean fcb = new FieldConfigBean();
    fcb.setName(fieldName);
    fcb.setMessage(ann.mess());
    ParamConfigBean pcb = new ParamConfigBean();
    pcb.setName(ValidatorConstant.FORBID_WORD_PARAM);
    StringBuilder sb = new StringBuilder();
    for (String s : ann.words()){
      if (sb.length() > 0)
        sb.append("#");
      sb.append(s);
    }
   
    pcb.setValue(sb.toString());
    fcb.getParam().add(pcb);

    val.getField().add(fcb);

    return val;
  }
View Full Code Here

Examples of org.eweb4j.mvc.config.bean.FieldConfigBean

    if (val == null || !ValidatorConstant.IP_VAL.equals(val.getName())) {
      val = new ValidatorConfigBean();
      val.setName(ValidatorConstant.IP_VAL);
    }

    FieldConfigBean fcb = new FieldConfigBean();
    fcb.setName(fieldName);
    fcb.setMessage(ann.mess());

    val.getField().add(fcb);

    return val;
  }
View Full Code Here

Examples of org.eweb4j.mvc.config.bean.FieldConfigBean

    if (val == null || !Validators.CHINESE.equals(val.getName())) {
      val = new ValidatorConfigBean();
      val.setName(Validators.CHINESE);
    }

    FieldConfigBean fcb = new FieldConfigBean();
    fcb.setName(fieldName);
    fcb.setMessage(StringUtil.parsePropValue(ann.mess()));

    val.getField().add(fcb);

    return val;
  }
View Full Code Here

Examples of org.eweb4j.mvc.config.bean.FieldConfigBean

    if (val == null || !Validators.QQ.equals(val.getName())) {
      val = new ValidatorConfigBean();
      val.setName(Validators.QQ);
    }

    FieldConfigBean fcb = new FieldConfigBean();
    fcb.setName(fieldName);
    fcb.setMessage(StringUtil.parsePropValue(ann.mess()));

    val.getField().add(fcb);

    return val;
  }
View Full Code Here

Examples of org.eweb4j.mvc.config.bean.FieldConfigBean

    if (val == null || !Validators.DATE.equals(val.getName())) {
      val = new ValidatorConfigBean();
      val.setName(Validators.DATE);
    }

    FieldConfigBean fcb = new FieldConfigBean();
    fcb.setName(fieldName);
    fcb.setMessage(StringUtil.parsePropValue(ann.mess()));
    ParamConfigBean pcb = new ParamConfigBean();
    pcb.setName(Validators.DATE_FORMAT_PARAM);
    pcb.setValue(StringUtil.parsePropValue(ann.value()));
    fcb.getParam().add(pcb);

    val.getField().add(fcb);

    return val;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.