struts: Multipage form  
Author Message
Philipp Roethl





PostPosted: 2003-9-17 2:33:00 Top

java-programmer, struts: Multipage form Hi,

I'm collection data across several pages using one Form per page. The scope of
each form is set to session. Let's say I have form1, form2 and form3 and the
corresponding action classes. In the jsp corresponding to form3 I can access
form1 using form1 as bean name.
But how can I access form1 from the Action class corresponding to form3?

Hope that was not to confusing.

Thanks in advance,
phi
 
Scott Yanoff





PostPosted: 2003-9-19 2:48:00 Top

java-programmer >> struts: Multipage form Philipp Roethl wrote:
> I'm collection data across several pages using one Form per page. The scope of
> each form is set to session. Let's say I have form1, form2 and form3 and the
> corresponding action classes. In the jsp corresponding to form3 I can access
> form1 using form1 as bean name.
> But how can I access form1 from the Action class corresponding to form3?

Can you pass in multiple forms to the "perform" method in your Action class:

public ActionForward perform(ActionMapping mapping,
ActionForm form, ActionForm form1,
etc...)

Otherwise, you could have one larger form bean instead of the three and
just reference it on each page.

Good luck,





--
-Scott
email***@***.com | http://www.yanoff.org | AOL IM: SAY KJY