This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts Validator Javascript Problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Validator Javascript Problems" Watch "Struts Validator Javascript Problems" New topic
Author

Struts Validator Javascript Problems

Bob Cober
Greenhorn

Joined: Jan 05, 2004
Posts: 6
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....
 
 
subject: Struts Validator Javascript Problems
 
Similar Threads
Validation.xml
Struts and Validation Framework
Problem in Struts Validation
Have any problem using validator
Issue when using shale commons validator with JSF