Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

validation problems with multipage form

 
Ji Won
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

I'm having issues using the validator framework. I have a DynaValidatorForm with a bunch of form-properties, including a "page" initialized to "1" of type java.lang.Integer
Without validation, things seem to work flawlessly. I have the form spread over 3 jsp pages (each with a hidden "page" property), each submitting to a different action.

Using the validation is a bit tricky.

When I validate just the first page, it works perfectly. I have the fields on the first jsp defined in the validation.xml page.
But when I try to add a "page" attribute to the field tag, the first page won't validate (I haven't even gotten to the second or third pages).

I refactored my code to use DynaValidatorActionForm, using the action path as the formname in validation.xml and in the html:javascript tag on my jsp pages. This was unsuccessful as well.

Can anyone give me some insight? Thanks!
 
Ji Won
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I finally got the multipage validation to work.

Apparently the hidden page property in the jsp isnt' enough; you need to specify the page in the javascript tag as well.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic