Hi Joost,

I'd prefer not to do it in setupRender as that will clear the session
even if the logged-in user has accidently hit the back button - when he
goes forward to the app the state will be cleared. So I'll loop over the
objects and do it manually.

Cheers



On Thu, 2011-01-13 at 15:09 +0100, Joost Schouten (ml) wrote:
> Go with the suggestion you already posted or try to invalidate the 
> session on the setupRender of the login page in stead.
> 
> Cheers,
> Joost
> 
> On 13/01/11 2:50 PM, Richard Hill wrote:
> > Hi All,
> >
> > I have an app that's stateful, a fair number of @Persist'd fields on
> > various pages + an SSO with logged in user info.
> >
> > What I want to do is clear all of this session data when a user logs in.
> > The scenario here is a user logging in when he's already logged in (or
> > logging in as a different user when already logged in) - so I want to
> > start with a blank slate.
> >
> > I've tried invalidating the Session, but subsequently setting an SSO
> > with ApplicationStateManger throws an IllegalStateException:
> >
> >
> > @Inject
> > private ApplicationStateManager stateManager;
> > @Inject
> > private Request request;
> >
> > private void login(Client client) {
> >             
> >    Session session = request.getSession(false);
> >    session.invalidate();
> >             
> >    stateManager.set(ClientState.class, new ClientState(client));
> >
> > }
> >
> > which is not surprising I guess. So is it possible to create/validate a
> > new Session? Or is there a way to clear the Session without
> > destroying/invalidating?
> >
> > I've taken a look at this post here:
> > http://tapestry-user.markmail.org/search/?q=session+peter#query:session%
> > 20peter+page:1+mid:25lfcwf67itjg2ie+state:results
> >
> > which suggests looping over every ASM object. Is the best way to go?
> >
> > Thanks Richard.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to