• 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

branching webapp using single DynaValidatorForm

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My situation is this. I have a web app where the first page contains a set of radio buttons. Depending on what radio you select, the next screens will ask for different info. Eventually, both branches will show the same "confirm your request" page with "yes" and "no" buttons. "no" will nuke any session data and restart the app..."yes" will call an action which can forward you to either the "success" or "failure" page.

I would like to use DynaValidatorForm beans declared in the struts config file along with a dispatch action (since the business logic is very simple) and the validator.

I've read where you can use the "page" attr of the <field> tag in the validation config, which instructs the validator which fields to actually validate depending on what view the user came from.

Question is, if the web app branches, can you still use a single form design? The documentation reads that the validator will run validations on any page equal to or less then the current incoming page. For instance, I have two "page 2s": Page 2 on branch A and Page 2 on branch B. If page 3 on branch A tries to validate, it's going to run the validations for page 2 on both braches....will it not?

I like the simplicity of one form that multiple JSP are populating, but I don�t see how I can do this _and_ use the validator FW.

Any suggestions?

Jason
 
A berm makes a great wind break. And we all like to break wind once in a while. Like this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic