Results 1 to 5 of 5

Thread: validation

  1. #1
    Join Date
    Sep 2004
    Posts
    13

    Default validation

    I don't know how to change validation method for different action state.
    There is (in FormAction class) method:
    Code:
    protected void validate(RequestContext context, Object formObject, Errors errors) throws Exception {
    		String validatorMethod = getProperty(VALIDATOR_METHOD_PROPERTY, context);
    		if (StringUtils.hasText(validatorMethod)) {
    			invokeValidatorMethod(validatorMethod, formObject, errors);
    		}
    		else {
    			getValidator().validate(formObject, errors);
    		}
    	}
    But I don't understand how to set property VALIDATOR_METHOD_PROPERTY and where it its better to do :roll:

  2. #2
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    The VALIDATOR_METHOD_PROPERTY tells the action what method to invoke on the configured Validator object.

    You can set this property in the definition of the action state.
    Keith Donald
    Core Spring Development Team

  3. #3
    Join Date
    Sep 2004
    Posts
    13

    Default Validation

    But how? I didn't see any samples with validation. :oops: Please could you show me example or tell where i could see it :roll:

  4. #4
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    See the 'sellitem' sample in samples/webflow.
    Keith Donald
    Core Spring Development Team

  5. #5
    Join Date
    Sep 2004
    Posts
    13

    Default validaton

    ooooooops! :shock: How could miss it?!! Thanks! :P

Similar Threads

  1. Replies: 2
    Last Post: Oct 10th, 2005, 05:12 PM
  2. Persistent Object Life-cycle Event Validation pattern
    By tentacle in forum Announcements
    Replies: 0
    Last Post: Jun 24th, 2005, 03:24 PM
  3. Lost with Validation
    By RAPHEAD in forum Architecture
    Replies: 6
    Last Post: May 29th, 2005, 06:01 AM
  4. Domain Object Validation
    By lhilden in forum Architecture
    Replies: 4
    Last Post: Dec 14th, 2004, 07:00 AM
  5. Replies: 0
    Last Post: Nov 15th, 2004, 11:25 AM

Posting Permissions

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