If you will be calling the forms in succession, like in a workflow or
"wizard" (for example, if form #2 will never be displayed except after
form #1), I would definitely put them in a single formbean and then
make the actions all session scope. If you don't you will end up doing
a lot of copying of params from one action to another. Also, I would
take a look at using DispatchAction for my action class and then have
each step implemented as a different method in your class.

The disadvantage of this approach is that you are putting things in
session scope which takes up server memory and can be a problem if you
have big objects or many user sessions hitting this set of pages and
therefore creating a lot of form beans in their sessions. Another
disadvantage is that you need to remove the formbean from the scope
when you are done (e.g. with <c:remove var="myFormBean"
scope="session"/>.

Do a search for DispatchAction on google and on the Struts wiki at
struts.apache.org.

-ed

On 11/16/05, Asad Habib <[EMAIL PROTECTED]> wrote:
> Hello. I am new to Struts and would like some advice. Is it better to use
> one form bean to capture data from several forms that are being submitted
> in succession or to use one form bean per form (i.e. multiple form beans)?
> What are the advantages or disadvantages of either approach? Also, I would
> appreciate if you would forward me to documents on the web, book chapters,
> etc., that discuss this in detail. Thank you.
>
> - Asad
>
> ---------------------------------------------------------------------
> 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