Package org.springframework.validation

Examples of org.springframework.validation.DataBinder.validate()


    Map<Course , List<FieldError>> executions = new HashMap<Course , List<FieldError>>();
    for(Course course : courses) {
      course.setRegulated(provider.getRegulated());
      DataBinder dataBinder = new DataBinder(course);
      dataBinder.setValidator(validator);
      dataBinder.validate();
      executions.put(course, dataBinder.getBindingResult().getFieldErrors());
      if(!dataBinder.getBindingResult().hasErrors()) {
        this.selectiveCourseStore(course, locale);
      }
    }
View Full Code Here


      Locale locale, Provider provider) throws Exception {
    Map<School , List<FieldError>> executions = new HashMap<School , List<FieldError>>();
    for(School school : objs) {
      DataBinder dataBinder = new DataBinder(school);
      dataBinder.setValidator(validator);
      dataBinder.validate();
      executions.put(school, dataBinder.getBindingResult().getFieldErrors());
      if(!dataBinder.getBindingResult().hasErrors()) {
        this.selectiveSchoolStore(school, locale);
      }
    }
View Full Code Here

    CustomValidatorBean validator = new CustomValidatorBean();
    validator.afterPropertiesSet();
    dataBinder.setValidator(validator);

    Class<?>[] groups = determineGroupsToUse(beanWrapper.getWrappedInstance());
    dataBinder.validate((Object[]) groups);

    if (dataBinder.getBindingResult().hasErrors()) {
      throw new BindException(dataBinder.getBindingResult());
    }
  }
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.