This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Struts Validator Javascript Problems  RSS feed

 
Bob Cober
Greenhorn
Posts: 6
  • 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....
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!