File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes validation problems with multipage form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "validation problems with multipage form" Watch "validation problems with multipage form" New topic
Author

validation problems with multipage form

Ji Won
Greenhorn

Joined: Jul 04, 2004
Posts: 3
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

Joined: Jul 04, 2004
Posts: 3
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: validation problems with multipage form
 
Similar Threads
Redisplaying a page after validation due to validation errors?
Validator Framework
client side validation in struts
struts 2 validation problem
declarative validation of wizard pages