You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sun Shine <sp...@yahoo.com> on 2005/11/29 06:29:52 UTC

Struts actionForm design

Hi All,
Sorry if a similar question has been posted already
but here goes...

What do you think is the best way to accomplish the
following:

You have several pages in a flow. On your first page,
you allow a user to make a selection. On subsequent
pages, you want to display what the user has selected
from the first page.

I am using one request scope ActionForm for multiple
pages. As I have read, my action form will be
recreated as I go from page to page!!

Is it possible to achieve one ActionForm using request
scope instead of session and still be able to see
'Page 1 data' later on 'Page X'?

or may you please recommend another approach?

With many thanks,
Penelope



	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts actionForm design

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Hi Penelope,

I think the answer you'll get the most is to use a single session-scoped 
bean for all the pages in your "flow".  I'm not sure it's the 
"canonical" answer, but it's pretty close I'd say :)  What you describe 
is a typical wizard interface, and while there are other ways, the 
easiest approach tends to be a single session-scoped bean.

You are correct in saying if you put it in request-scope, the values 
from page to page won't be saved because you get a new ActionForm with 
each request.

Frank

Sun Shine wrote:
> Hi All,
> Sorry if a similar question has been posted already
> but here goes...
> 
> What do you think is the best way to accomplish the
> following:
> 
> You have several pages in a flow. On your first page,
> you allow a user to make a selection. On subsequent
> pages, you want to display what the user has selected
> from the first page.
> 
> I am using one request scope ActionForm for multiple
> pages. As I have read, my action form will be
> recreated as I go from page to page!!
> 
> Is it possible to achieve one ActionForm using request
> scope instead of session and still be able to see
> 'Page 1 data' later on 'Page X'?
> 
> or may you please recommend another approach?
> 
> With many thanks,
> Penelope
> 
> 
> 
> 	
> 		
> __________________________________ 
> Yahoo! Mail - PC Magazine Editors' Choice 2005 
> http://mail.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 
> .
> 

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org