Package org.eweb4j.mvc.config.bean

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


    fcb.setMessage(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(params[i]);
        pcb.setValue(values[i]);
        fcb.getParam().add(pcb);
      }
    }
   
View Full Code Here


          String[] pvalue = paramAnn.value();

          List<ParamConfigBean> pList = new ArrayList<ParamConfigBean>();
          for (int c = 0; c < pindex.length; ++c) {
            if (pindex[c] == b) {
              ParamConfigBean p = new ParamConfigBean();
              p.setName(StringUtil.parsePropValue(pname[c]));
              p.setValue(StringUtil.parsePropValue(pvalue[c]));
              pList.add(p);
            }
          }

          f.setParam(pList);
View Full Code Here

    FieldConfigBean fcb = new FieldConfigBean();
    fcb.setName(fieldName);
    fcb.setMessage(ann.mess());
   
    ParamConfigBean pcb = new ParamConfigBean();
    pcb.setName(ValidatorConstant.MIN_SIZE_PARAM);
    pcb.setValue(String.valueOf(ann.min()));
   
    fcb.getParam().add(pcb);
   
    ParamConfigBean pcb2 = new ParamConfigBean();
    pcb2.setName(ValidatorConstant.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(ann.mess());
   
    ParamConfigBean pcb = new ParamConfigBean();
    pcb.setName(ValidatorConstant.MIN_LENGTH_PARAM);
    pcb.setValue(String.valueOf(ann.min()));
   
    fcb.getParam().add(pcb);
   
    ParamConfigBean pcb2 = new ParamConfigBean();
    pcb2.setName(ValidatorConstant.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(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

    }

    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

    }

    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

    }

    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

    }

    FieldConfigBean fcb = new FieldConfigBean();
    fcb.setName(fieldName);
    fcb.setMessage(StringUtil.parsePropValue(ann.mess()));
    ParamConfigBean pcb = new ParamConfigBean();
    pcb.setName(Validators.FORBID_WORD_PARAM);
    StringBuilder sb = new StringBuilder();
    for (String s : ann.words()){
      if (sb.length() > 0)
        sb.append("#");
     
      sb.append(StringUtil.parsePropValue(s));
    }
   
    pcb.setValue(sb.toString());
    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.ENUM_WORD_PARAM);
    StringBuilder sb = new StringBuilder();
    for (String s : ann.words()){
      if (sb.length() > 0)
        sb.append("#");
     
      sb.append(StringUtil.parsePropValue(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.