struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From daveck <d...@holstein.com>
Subject Re: Struts 2: How can we save the parameters if we do redirect and not redirect-action
Date Thu, 18 Sep 2008 17:22:12 GMT

I ended up solving a similiar problem using an Interceptor and saving the
parameter Map to the session.

session.setAttribute("input_params", request.getParameterMap();

Then in my action I implemented SessionAware and utililized BeanUtils from
Jakarta Commons to re-populate the properties in my action class.

this.setRequestMap((Map)this.getSession().get("input_parms"));
BeanUtils.populate(this, this.getRequestMap();

Hope this helps.


srinivasch wrote:
> 
> Hi,
> 
>    My issue goes like this, I have a summary page which comes for a search
> result, and the user clicks to see summary of any record from the result.
> So all the search parameters are existing in the URL. And when we further
> hit edit link of the summary record, and again when the user hits cancel
> or save, the URL parameters which were forwarded to the summary page wont
> exist. I would like to retain the parameters. Appreciate your quick
> response
> 
> Here is the snippet of my struts config how I used the result
> 
> <result name="return-summary" type="redirect">
> 	            /view.action?linID=${linID}
> </result>
> 

-- 
View this message in context: http://www.nabble.com/Struts-2%3A-How-can-we-save-the-parameters-if-we-do-redirect-and-not-redirect-action-tp19557514p19557768.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Mime
View raw message