You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Neal Kaiser <ne...@makeastore.com> on 2001/02/11 00:14:40 UTC

RE: [Q] TRANSACTION_TOKEN_KEY - Multiple Page Forms

Thanks, that makes sense. I'm using that design pattern now. Do you have any
prefered
design patterns for multiple page forms.  For example, if your Registration
example was spanned
over 3 different JSPs, where would you put the logic that knows what page to
validate, and what page to  forward to?  Would you use hidden tags? Would
you use different action paths? (ie saveRegistration.do would be
saveRegistration1.do, saveRegistration2.do, etc)  Just wondering the best
way...

Thanks.

> -----Original Message-----
> From: Dan Malks [mailto:dan.malks@sun.com]
> Sent: Saturday, February 10, 2001 3:46 PM
> To: struts-user@jakarta.apache.org
> Subject: Re: [Q] TRANSACTION_TOKEN_KEY
>
>
>
>
> "Craig R. McClanahan" wrote:
>
> > Dan Malks wrote:
> >
> > > Craig,
> > >
> > > "Craig R. McClanahan" wrote:
> > >
> > > > Neal Kaiser wrote:
> > > >
> > > > > How does this work when they are registering for the
> first time, not
> > > > > editing. I can
> > > > > see that in EditRegistrationAction the token is
> set... but if they are
> > > > > registering
> > > > > for the first time where is the token set? It seems
> that it would fail when
> > > > > it hits
> > > > > the token check in SaveRegistrationAction, but I know
> it doesn't, so it must
> > > > > be set
> > > > > somewhere, right?
> > > > >
> > > >
> > > > You will note that the "Register with the MailReader
> Demonstration Application"
> > > > link (on index.jsp) goes through "EditRegistration.do"
> as well, so that the
> > > > token gets saved even in this case.  The
> "?action=Create" request parameter is
> > > > used to distinguish this from the editing case ("?action=Edit").
> > >
> > > Would 'ModifyRegistration.do' or 'ProcessRegistration.do'
> be more clear, then?
> > >
> >
> > Or even something more generic like "StartRegistration.do"?
>  Can you tell that I wrote
> > the "edit" use case first?  :-)
> >
> > I had a Comp Sci prof that said the most critical design
> decision you will ever make
> > is naming things.
>
> And often, surprisingly, one of the harder ones.
>
>
> > And, even when you get the initial name correct, it is important to
> > review your names after the program has evolved a bit.
>
> Amen ;-)
>
> Thanks,
> -dm
>
>
> >  Sounds like it is time to do
> > that exercise on the example app.
> >
> > >
> > > -dm
> > >
> >
> > Craig
>
> --
> Dan Malks                                 Sun Java Center
> Enterprise Java Architect            703.208.5794
>
>