Results 1 to 3 of 3

Thread: Wizard form controller validation quiestion

  1. #1

    Default Wizard form controller validation quiestion

    Is it possible to use commons validator with wizard form controller validating a page at a time .. ??

    thanx

  2. #2
    Join Date
    Apr 2005
    Location
    Brazil
    Posts
    66

    Default

    why do u wanna develop this way?

    maybe u should create a class and invoke it in the method validatePage()

    protected void validatepage(....){
    TestValidator tv = new TestValidator();
    if tv.supports(command)
    tv.validate(....);
    }

  3. #3

    Default

    thanks vammpiro ..

    actually i am doing it the following way ..

    Code:
    	protected void validatePage(Object command, Errors errors, int page) {
    		UserRegistration userRegistration= (UserRegistration) command;
    		UserRegistrationValidator userRegistrationValidator = (UserRegistrationValidator) getValidator();
    		switch (page) {
    			case 0:
    				userRegistrationValidator.validateUserInfo(userRegistration, errors);
    				break;
    			case 1:
    				userRegistrationValidator.validateBillingAddressInfo(userRegistration, errors);
    				break;
    		}
    	}
    as there is only a single command object ..
    and as fields to be validated are different for different page i cannot validate the whole command at a time ..

    so i was just anxious to know if this could be done ...


    thanx again

Similar Threads

  1. Replies: 0
    Last Post: Jun 10th, 2005, 08:22 AM
  2. Wizard form controller quiestion
    By mia in forum Web
    Replies: 2
    Last Post: May 26th, 2005, 11:00 PM
  3. Wizard form controller quiestion
    By mia in forum Web
    Replies: 1
    Last Post: Apr 27th, 2005, 07:00 PM
  4. Replies: 1
    Last Post: Apr 27th, 2005, 07:46 AM
  5. Commons validation with wizard form controller
    By brianstclair in forum Web
    Replies: 0
    Last Post: Jan 14th, 2005, 02:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •