Package org.eweb4j.mvc.config.bean

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


    List<ValidatorConfigBean> vlist = new ArrayList<ValidatorConfigBean>();
    ValidatorConfigBean validator = new ValidatorConfigBean();
    List<FieldConfigBean> fieldList = new ArrayList<FieldConfigBean>();
    FieldConfigBean field = new FieldConfigBean();
    List<ParamConfigBean> paramList = new ArrayList<ParamConfigBean>();
    ParamConfigBean param = new ParamConfigBean();
    paramList.add(param);
    field.setParam(paramList);
    fieldList.add(field);
    validator.setField(fieldList);
   
View Full Code Here


    fcb.setMessage(StringUtil.parsePropValue(ann.mess()));
    String[] params = ann.params();
    String[] values = ann.values();
    if (params.length > 0 && values.length > 0 && params.length == values.length){
      for (int i = 0; i < params.length; i++){
        ParamConfigBean pcb = new ParamConfigBean();
        pcb.setName(StringUtil.parsePropValue(params[i]));
        pcb.setValue(StringUtil.parsePropValue(values[i]));
        fcb.getParam().add(pcb);
      }
    }
   
    val.getField().add(fcb);
View Full Code Here

    FieldConfigBean fcb = new FieldConfigBean();
    fcb.setName(fieldName);
    fcb.setMessage(StringUtil.parsePropValue(ann.mess()));
   
    ParamConfigBean pcb = new ParamConfigBean();
    pcb.setName(Validators.MIN_SIZE_PARAM);
    pcb.setValue(String.valueOf(ann.min()));
   
    fcb.getParam().add(pcb);
   
    ParamConfigBean pcb2 = new ParamConfigBean();
    pcb2.setName(Validators.MAX_SIZE_PARAM);
    pcb2.setValue(String.valueOf(ann.max()));
   
    fcb.getParam().add(pcb2);

    val.getField().add(fcb);
View Full Code Here

    FieldConfigBean fcb = new FieldConfigBean();
    fcb.setName(fieldName);
    fcb.setMessage(StringUtil.parsePropValue(ann.mess()));
   
    ParamConfigBean pcb = new ParamConfigBean();
    pcb.setName(Validators.MIN_LENGTH_PARAM);
    pcb.setValue(String.valueOf(ann.min()));
   
    fcb.getParam().add(pcb);
   
    ParamConfigBean pcb2 = new ParamConfigBean();
    pcb2.setName(Validators.MAX_LENGTH_PARAM);
    pcb2.setValue(String.valueOf(ann.max()));
   
    fcb.getParam().add(pcb2);

    val.getField().add(fcb);
View Full Code Here

    }

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

    val.getField().add(fcb);

    return val;
View Full Code Here

    }

    FieldConfigBean fcb = new FieldConfigBean();
    fcb.setName(fieldName);
    fcb.setMessage(StringUtil.parsePropValue(ann.mess()));
    ParamConfigBean pcb = new ParamConfigBean();
    pcb.setName(Validators.EQUALS_TO_PARAM);
   
    String value = StringUtil.parsePropValue(ann.to());
    value = fieldName.substring(0, fieldName.lastIndexOf(".")+1) + value;
    pcb.setValue(value);
   
    fcb.getParam().add(pcb);

    val.getField().add(fcb);
View Full Code Here

    }

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

    val.getField().add(fcb);

    return val;
View Full Code Here

    }

    FieldConfigBean fcb = new FieldConfigBean();
    fcb.setName(fieldName);
    fcb.setMessage(ann.mess());
    ParamConfigBean pcb = new ParamConfigBean();
    pcb.setName(ValidatorConstant.ENUM_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

TOP

Related Classes of org.eweb4j.mvc.config.bean.ParamConfigBean

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.