Sorry, this is for everyone too.

_CJ
----------  Forwarded Message  ----------

Subject: Re: Populating multiple forms from one action class
Date: Wed, 4 Dec 2002 23:42:14 +0000
From: Curtney Jacobs <[EMAIL PROTECTED]>
To: "Craig R. McClanahan" <[EMAIL PROTECTED]>

Greetings Craig!!

just to verify.

So, it is possible to populate multiple forms (contained on a single JSP
 page) from within one action class.

For instance, I intend to have one action class that pre-populates three form
beans: education, guardian, and enrollment.

Currently, I have the action class pre-populating only one form bean and
putting it into the current session, however, the data is not shown in the
form when the jsp page is displayed. It only work when I associate the action
to the form bean within my struts-config.xml

Thanks in advance,

Curtney Jacobs

On Monday 02 December 2002 1:12 am, you wrote:
> On Fri, 29 Nov 2002, Curtney Jacobs wrote:
> > Date: Fri, 29 Nov 2002 11:43:24 +0000
> > From: Curtney Jacobs <[EMAIL PROTECTED]>
> > Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>,
> >      [EMAIL PROTECTED]
> > To: Struts Users Mailing List <[EMAIL PROTECTED]>
> > Subject: Re: Populating multiple forms from one action class
> >
> > Greetings!!
> >
> > I understand what you are saying. However,  I was thinking that  it might
> > be possible to pre-populate the ActionForms with a generic action class
> > (not tied to any particular form) and put them in the current session.
> >
> > The following is an excerpt from "Mastering Jakarta Struts" that supports
> > my idea.
> >
> >
> >
> > " if the sesion already includes an instance of the ActionForm named by
> > the <form> element's name attribute, then the values stored in its data
> > members     will be used to prepopulate the input values. "
>
> Prepopulating input forms this way (by setting up the form bean in an
> Action that preceeds the display of the form) is a very standard approach
> in Struts based applications.  It's a perfectly reasonable thing to do.
>
> Whether you do it with a generic Action, or a customized Action for each
> type of form is pretty much up to you.
>
> > If anyone else have any opinions on this please don't be afraid to
> > comment :-)
> >
> > Thanks in advance,
> >
> > Curtney Jacobs
>
> Craig

--
U-Interface.com

-------------------------------------------------------

-- 
U-Interface.com

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

Reply via email to