You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Swati <sw...@cisco.com> on 2003/08/13 10:36:59 UTC

How to maintain data b/w pages?

Hi,
I have a wizard to add objects, each wizard screen has
back/next/cancel/finish buttons.
There is one ActionForm class, and several action classes, corresponding
to each screen. The action classes  extend LookupDispatchAction.

My problem is that the data is not maintained between the pages, i.e.
enter data on a page, click next, and then click back. The data entered
on the page is lost.

I could solve it partially by keeping the String data in html:hidden
tags in my jsp pages. But, how can I keep the data whose get method
returns an array of string or HashMap. html:hidden tags do not work in
that case.

Is there any other way to do so?

Thanks,
Swati


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


Re: How to maintain data b/w pages?

Posted by Nagendra Kumar O V S <na...@ikigo.com>.
hi,
generally in the wizard kind, use session scope for the action_form , u dont
have to save them as the hidden fields.if any form element has a value in
the corresponding action form,struts will render that value. 

u can multiple actionclasses but use only one action form in session scope
for all the wizard jsps

-- nagi
-------Original Message-------

From: Struts Users Mailing List
Date: Wednesday, August 13, 2003 02:08:30 PM
To: struts-user@jakarta.apache.org
Subject: How to maintain data b/w pages?

Hi,
I have a wizard to add objects, each wizard screen has
back/next/cancel/finish buttons.
There is one ActionForm class, and several action classes, corresponding
to each screen. The action classes extend LookupDispatchAction.

My problem is that the data is not maintained between the pages, i.e.
enter data on a page, click next, and then click back. The data entered
on the page is lost.

I could solve it partially by keeping the String data in html:hidden
tags in my jsp pages. But, how can I keep the data whose get method
returns an array of string or HashMap. html:hidden tags do not work in
that case.

Is there any other way to do so?

Thanks,
Swati


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


.