• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts Validator Javascript Problems

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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....
 
No one can make you feel inferior without your consent - Eleanor Roosevelt. tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic