File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts Validator Javascript Problems

 
Bob Cober
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to use the validator with a wizard-like series of screens.

I have a single formbean shared by multiple forms.

Server-side validation works fine.

Client-Side javascript only works on the first screen. When perusing the source on the pages, it is evident that the same javascript "required" array fields are being used on every page.

I am using the technique of setting the page= attribute on each field in the validation.xml formset. I am setting the appropriate page attribute during an override of validate() on the formbean itself.

Is it better to use the ValidatorActionForm class and use actions in the validation xml? This approach doesn't seem to work either - the javascript comes back without the correct javascript start tag, resulting in seeing the exposed non-functioning javascript in the html stream....


Much thanks for any advice....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic