• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

delayed validation

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working on multi-page form (wizzard) application usign Struts 1.2.9. User goes from let's say page 1 -> page 2 -> page 3 and then on page 4 we show him/her summary of all the information that they entered on the previous pages.

When the user is presented any of the pages I want to validate the infomation that they entered and show them the error message if they left a require field blank. But if the user wants to continue they can submit the form again without fixing the problem and the next form is displayed. On the summary page I display all of thier errors and make them fix the errors/blank required fields etc. before they submit the final/summary page.

This is very similar to your tax prepration application where if you do not know required information you can continue and fix it later. Anybody knows how to do that in struts because it seems like validator only has required and not required attributes?
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If it's a single session-based ActionForm it might be easier to do the validation manually rather than through XML. One solution for the XML route is to use the validwhen (or whatever it's called) and check both the condition and a per-page token, but I tend to think this would be brittle and too irritating to maintain.

Doing the validation in Java, in a validate method that dispatches to a per-page validation method based on a page token is an option to keep in mind, anyway.
 
keep an eye out for scorpions and black widows. But the tiny ads are safe.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic