This approach might work for a small system, but I would not encourage it
for a large business app.  If I follow you correctly, this assumes that
subsequent pages will be served by the same container.  This is infrequently
(at least in systems I've seen) the case...

> -----Original Message-----
> From: Edgar P Dollin [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 14, 2003 10:19 AM
> To: 'Shyam A'; [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: RE: Passing parameters between forms
>
>
> My preference is to emulate the session functionality in your own classes,
> i.e. publish / subscribe.  Stick a static map in your class and
> use a unique
> key generated from objects both threads are aware of to index the object,
> then you can pull it out when you need to.  Synchronize if you need to as
> well.
>
> I like this better because then you can run junit tests w/o worring about
> the container.
>
> Edgar
>
> > -----Original Message-----
> > From: Shyam A [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, October 14, 2003 8:39 AM
> > To: [EMAIL PROTECTED]
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: Passing parameters between forms
> >
> >
> > Carey,
> >
> > Thanks for your mail. I knew about the option you
> > suggested and mentioned it in my mail.
> >
> > quote:
> >
> > I know I can save the "foo" attribute into session in
> > Action A class and access it in Action B, or set the
> > scope of Form A to session in struts-config and access
> > Form A from Action B.
> >
> > unquote:
> >
> > However, the disadvantage of this option is that I
> > need to use session scope for the forms, which I would
> > like to avoid.
> >
> > I also know it is possible to pass the form attribute
> > as a request parameter as follows:
> >
> > <html:link page="Action B?parameter=value">
> >
> > But, this allows the user to see the parameters being
> > passed. I would rather use buttons for the link and
> > post the form.
> >
> > Do you have any suggestions/comments?
> >
> > Thanks,
> > Shyam
> >
> >
> > --- Carey Nation <[EMAIL PROTECTED]> wrote:
> > > I have some vague memory (perhaps completely wrong)
> > > that the forms are
> > > stored wherever they are stored using the names that
> > > you specify in
> > > struts-config.  It may not be the nicest way to do
> > > this, but I'm pretty sure
> > > that, given session scope on your forms, you can do
> > > something like
> > > (FormA)forma = session.getAttribute("FormA");
> > >
> > > HTH,
> > > Carey
> > >
> > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> > > [EMAIL PROTECTED]
> > >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > The New Yahoo! Shopping - with improved product search
> http://shopping.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to