You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Shyam Anand <st...@yahoo.com> on 2005/08/05 21:46:01 UTC

problem with retaining form bean values - Struts 1.1

Hi,

I'm using Struts 1.1 for my web application. I have a
problem with retaining my form bean values in the
following scenario:
I have a JSP page with portions displayed in sequence
based on user action. I have 3 buttons on the page and
parts of the JSP page are displayed when the user
clicks on each button.I use DispatchAction for this
purpose and a single form bean for the JSP.

The following is the sequence of user interactions on
the page.

1.Initially the user clicks a link to get to the JSP -
"get" method of DispatchAction is called, and the
first part of the JSP page is displayed.

2. The user enters some values and clicks a button to
look up information. This invokes the "lookup" method
of the DispatchAction class, and subsequently, the
results are displayed on the JSP, along with other
input fields.

3. The user enters some more details on the JSP and
clicks a "Continue" button, which invokes the
"continue" method of the DispatchAction class. Based
on the data entered, some more information/input
fields are displayed on the JSP.

4. Finally, the user enters the remaining fields and
submits the form.

The issue I'm having is that the values entered in
steps 1 and 2 are not retained in the form bean when
the page is submitted or if there is a validation
error.I have used "session" scope for my form bean and
it didn't help.

Could somebody tell me what I'm doing wrong. Has
anybody come across such a scenario ? If so, what is
the best way to accomplish this task?

Any help would be greatly appreciated.

Thanks,
Shyam


		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

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