Examples of reject()


Examples of org.springframework.validation.Errors.reject()

        status.getErrorMessagesAsString(","), "message1");

    // two errors
    pc = createPageContext();
    errors = new ServletRequestDataBinder(new TestBean(), "tb").getBindingResult();
    errors.reject("code1", null, "message1");
    errors.reject("code1", null, "message2");
    pc.getRequest().setAttribute(BindingResult.MODEL_KEY_PREFIX + "tb", errors);
    tag = new BindTag();
    tag.setPageContext(pc);
    tag.setPath("tb");
View Full Code Here

Examples of org.springframework.validation.Errors.reject()

    // two errors
    pc = createPageContext();
    errors = new ServletRequestDataBinder(new TestBean(), "tb").getBindingResult();
    errors.reject("code1", null, "message1");
    errors.reject("code1", null, "message2");
    pc.getRequest().setAttribute(BindingResult.MODEL_KEY_PREFIX + "tb", errors);
    tag = new BindTag();
    tag.setPageContext(pc);
    tag.setPath("tb");
    tag.doStartTag();
View Full Code Here

Examples of org.springframework.validation.Errors.reject()

    Errors errors = new EscapedErrors(new BindException(tb, "tb"));
    errors.rejectValue("name", "NAME_EMPTY &", null, "message: &");
    errors.rejectValue("age", "AGE_NOT_SET <tag>", null, "message: <tag>");
    errors.rejectValue("age", "AGE_NOT_32 <tag>", null, "message: <tag>");
    errors.reject("GENERAL_ERROR \" '", null, "message: \" '");

    assertTrue("Correct errors flag", errors.hasErrors());
    assertTrue("Correct number of errors", errors.getErrorCount() == 4);
    assertTrue("Correct object name", "tb".equals(errors.getObjectName()));
View Full Code Here

Examples of org.springframework.validation.Errors.reject()

        
         expect(errors.getFieldValue("date")).andReturn("35/15/70");
         expect(errors.getFieldValue("price")).andReturn("noPrice");
         expectLastCall().anyTimes();
   
         errors.reject("errors.dateAsStirng.noCorrectFormat","errors.dateAsStirng.noCorrectFormat");
         errors.reject("errors.price.notCorrect","errors.price.notCorrect");
         errors.reject("errors.dateAsStirng.noCorrectFormat","errors.dateAsStirng.noCorrectFormat");
        
        
    replay(errors);
View Full Code Here

Examples of org.springframework.validation.Errors.reject()

         expect(errors.getFieldValue("date")).andReturn("35/15/70");
         expect(errors.getFieldValue("price")).andReturn("noPrice");
         expectLastCall().anyTimes();
   
         errors.reject("errors.dateAsStirng.noCorrectFormat","errors.dateAsStirng.noCorrectFormat");
         errors.reject("errors.price.notCorrect","errors.price.notCorrect");
         errors.reject("errors.dateAsStirng.noCorrectFormat","errors.dateAsStirng.noCorrectFormat");
        
        
    replay(errors);
   
View Full Code Here

Examples of org.springframework.validation.Errors.reject()

         expect(errors.getFieldValue("price")).andReturn("noPrice");
         expectLastCall().anyTimes();
   
         errors.reject("errors.dateAsStirng.noCorrectFormat","errors.dateAsStirng.noCorrectFormat");
         errors.reject("errors.price.notCorrect","errors.price.notCorrect");
         errors.reject("errors.dateAsStirng.noCorrectFormat","errors.dateAsStirng.noCorrectFormat");
        
        
    replay(errors);
   
    priceListValidator.validate(priceListDTO, errors);
View Full Code Here

Examples of org.springframework.validation.Errors.reject()

   
    UserValidator userValidator = new UserValidator();
   
    userValidator.setUserManager(userManager1);
   
    errors.reject("errors.name.required", "errors.name.required");
    errors.reject("errors.surname.required", "errors.surname.required");
    errors.reject("errors.password.notEquals","errors.password.notEquals");
    errors.reject("errors.username.alreadyAssign", "errors.username.alreadyAssign");
 
    EasyMock.expect(userManager1.getUser(user1.getUserName())).andReturn(user1);
View Full Code Here

Examples of org.springframework.validation.Errors.reject()

    UserValidator userValidator = new UserValidator();
   
    userValidator.setUserManager(userManager1);
   
    errors.reject("errors.name.required", "errors.name.required");
    errors.reject("errors.surname.required", "errors.surname.required");
    errors.reject("errors.password.notEquals","errors.password.notEquals");
    errors.reject("errors.username.alreadyAssign", "errors.username.alreadyAssign");
 
    EasyMock.expect(userManager1.getUser(user1.getUserName())).andReturn(user1);
   
View Full Code Here

Examples of org.springframework.validation.Errors.reject()

   
    userValidator.setUserManager(userManager1);
   
    errors.reject("errors.name.required", "errors.name.required");
    errors.reject("errors.surname.required", "errors.surname.required");
    errors.reject("errors.password.notEquals","errors.password.notEquals");
    errors.reject("errors.username.alreadyAssign", "errors.username.alreadyAssign");
 
    EasyMock.expect(userManager1.getUser(user1.getUserName())).andReturn(user1);
   
    expectLastCall().anyTimes();
View Full Code Here

Examples of org.springframework.validation.Errors.reject()

    userValidator.setUserManager(userManager1);
   
    errors.reject("errors.name.required", "errors.name.required");
    errors.reject("errors.surname.required", "errors.surname.required");
    errors.reject("errors.password.notEquals","errors.password.notEquals");
    errors.reject("errors.username.alreadyAssign", "errors.username.alreadyAssign");
 
    EasyMock.expect(userManager1.getUser(user1.getUserName())).andReturn(user1);
   
    expectLastCall().anyTimes();
   
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.