Full details are here :
http://www.stripesframework.org/display/stripes/Save+ActionBean+fields+in+session
You can remove the object from session either by setting it to null or removing
it from session by it's key.
Remove objects from session
Just calling session.removeAttribute(key) will not work in all cases.
SessionStoreInterceptor saves fields in session after event completes and only
if no validation error occurs. To remove object from session manually, the best
solutions are:
1. No validation error: set field to null in the event (if it's not a
primitive).
2. Validation errors: use session.removeAttribute(key).
Christian
________________________________
From: Stephen Nelson [mailto:[email protected]]
Sent: Wednesday, October 28, 2009 12:46 PM
To: Stripes Users List
Subject: Re: [Stripes-users] Storing an entity between requests
On Wed, Oct 28, 2009 at 1:30 PM, Aaron Porter
<[email protected]<mailto:[email protected]>> wrote:
Stephen,
It sounds like you can accomplish what you're trying to do by marking
the ServiceProvider declaration in your ActionBean with @Session from
the StripesStuff project. That will save sessionProvider in the
HttpSession at the end of each request and restore it at the beginning
of subsequent requests.
You can get the StripesStuff jar at
http://sourceforge.net/projects/stripes-stuff/files/
Aaron
Hi Aaron
Thanks for the reply. I'll take a look at the Stripes stuff shortly but your
description sounds like the functionality I need. Can I also evict it from
session when I've completed the update? That way I won't be carrying additional
state in the session when it's not required.
Many thanks
--
Stephen
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users