struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From martin.coo...@tumbleweed.com
Subject RE: Multi page form desing
Date Thu, 02 Nov 2000 19:12:26 GMT
If you track the wizard steps (e.g. with a hidden field), then you can 
validate different sets of fields, depending on the current step. At the 
final step, you can do a more complete validation.

--
Martin Cooper
Tumbleweed Communications


At 09:41 AM 11/2/00 -0300, Ansaldo, Gaston wrote:
>Peter:
>         Thanks for your input but I can't wait until the user has reached
>the form's last page because depending on her selections i have to send her
>to a different JSP. Any other idea about this?
>
>Thanks again,
>
>         Gastón.
>
> > -----Original Message-----
> > From: Halverson, Peter [mailto:Peter_Halverson@sra.com]
> > Sent: 01 November, 2000 5:51 PM
> > To: 'struts-user@jakarta.apache.org'
> > Subject: RE: Multi page form desing
> >
> >
> >
> >
> > > -----Original Message-----
> > > From: Ansaldo, Gaston [mailto:gansaldo@soluziona-si.com]
> > > Sent: Wednesday, November 01, 2000 3:29 PM
> > > To: 'struts-user@jakarta.apache.org'
> > > Subject: Multi page form desing
> > >
> > >
> > > Hi all!!!
> > >
> > > I'm trying to implement a *wizard style form* using 4 or 5
> > > jsp's. I read in
> > > the user doc's that in Struts one should try to design the
> > > pages using the
> > > same XXXXForm and XXXXAction class for all the pages inside
> > > the *conceptual
> > > form*
> > >
> > > I'm wondering how I'm suppose to design the XXXXForm and
> > > XXXXAction classes
> > > in order to validate the form data just one time and not as
> > > many times as
> > > jsp's invoke the same XXXForm class..
> > >
> > > Can anybody share some ideas about how to implement this kind of
> > > functionality?
> >
> >
> > You'd need to track whether the form is all the way done or
> > in progress,
> > depending on which screen of the wizard the user has
> > completed.  Either
> > explicitly, as a form property that gets set by the Action,
> > or implicitly,
> > perhaps using a custom ActionMapping property (the latter
> > makes it easier to
> > introduce new pages, IMO, since you can define it as part of your
> > struts-config.xml). As long as there still screens to do, the form's
> > validate() method would always return true. Only when the
> > user has finished
> > all the screens do you actually check the form content as
> > appropriate.
> >
> > Ditto for the action, assuming you're using a single Action
> > for the entire
> > sequence.
> >
> > The only problem with deferring validation until the wizard
> > is complete is
> > that it's harder to return the user to the particular page
> > associated with
> > the bad input.
> >
> > pete
> >



Mime
View raw message