You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Struts Newsgroup (@Basebeans.com)" <st...@basebeans.com> on 2002/07/25 21:10:02 UTC

ActionForm across multiple pages - confusion

Subject: ActionForm across multiple pages - confusion
From: "David Chu" <da...@aol.net>
 ===
Hello, I will try to make this very brief:
It is necessary for me to populate an ActionForm on two separate pages.  So
the sequence is:
Action1 -> jsp1 -> Action2 -> jsp2 ->Action3

Suppose I specify some set of properties X that I gather with inputs on jsp1
and another set of properties Y that I gather with input on jsp2.

However, it seems that if I do not include <html:hidden> tags on jsp2 for
all of X, Action3 sees null values for all X.

My ActionForm is in the request scope, but I am passing it along.  So why
aren't my values persistent?

(this must be the 20th time I've been confused, thanks a lot for the help
yall)

--
-david

------------------------------
David C. Chu
America Online
Network Tools Intern
------------------------------





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: ActionForm across multiple pages - confusion

Posted by David Wood <dw...@team345.com>.
As long as you keep the hidden fields, you get all the information.   If 
you don't put the hidden tags and you're using request scope, then when 
you go to the 3rd action, it's creating a new ActionForm instance and it 
loses any previous values it had.  The only values it will receive are 
in the new request.
 
The other way to do it is to make the form in session scope and not use 
the reset method, but I don't think that's necessarily any better.

-- dave

Struts Newsgroup (@Basebeans.com) wrote:

>Subject: ActionForm across multiple pages - confusion
>From: "David Chu" <da...@aol.net>
> ===
>Hello, I will try to make this very brief:
>It is necessary for me to populate an ActionForm on two separate pages.  So
>the sequence is:
>Action1 -> jsp1 -> Action2 -> jsp2 ->Action3
>
>Suppose I specify some set of properties X that I gather with inputs on jsp1
>and another set of properties Y that I gather with input on jsp2.
>
>However, it seems that if I do not include <html:hidden> tags on jsp2 for
>all of X, Action3 sees null values for all X.
>
>My ActionForm is in the request scope, but I am passing it along.  So why
>aren't my values persistent?
>
>(this must be the 20th time I've been confused, thanks a lot for the help
>yall)
>
>--
>-david
>
>------------------------------
>David C. Chu
>America Online
>Network Tools Intern
>------------------------------
>
>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>  
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>