Results 1 to 2 of 2

Thread: validator not instanceof PageAware

  1. #1
    Join Date
    Oct 2007
    Posts
    4

    Default validator not instanceof PageAware

    Hey.
    I am trying to figure out the springmodules and commons validator.

    HTML Code:
    <pre>
     protected void validatePage(Object object, Errors errors, int currentPage) {
           Validator[] validators = getValidators();
           for (Validator validator : validators) {
               if (validator instanceof PageAware) {
                   if (((PageAware) validator).getPage() == currentPage) {
                       validator.validate(object, errors);
                   }
               }
           }
       }
    </pre>
    The validator is not an instanceof PageAware and therefore the validator will never run. Have i forgot to set some configurations?

  2. #2
    Join Date
    Oct 2007
    Posts
    4

    Default IDEA and validator.xml

    And also, i'm using IDEA to develop this application and it seems to be an error with my validator.xml.
    I have configured this form

    HTML Code:
    <pre>
            <form name="creditcardApplication">
    			<field property="firstName" depends="required">
    				<arg0 key="person.first.name" />
    			</field>
            </form>
    </pre>
    
    The name creditCardApplication can't be resolved apparantly.
    Please help

Posting Permissions

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