Announcement Announcement Module
Collapse

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions (http://www.springsource.org/extensions) project, this forum has been decommissioned in favour of Spring Extensions one at:
http://forum.springsource.org/forumdisplay.php?f=44

Please see the Spring Extensions home page for a complete list of current projects in Java, .NET and ActionScript. You can also propose one if you want.

Cheers,
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
See more
See less
validator not instanceof PageAware Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment

    Working...
    X