Hi,

I need to invalidate the web session after a panel of the current page
is replaced.

All my attempts are failing because webSession.invalidate() or even
webSession.replaceSession(); have an influence on the current
request/response.

Typically, one would just show a new page, e.g.

Session.invalidate();
setResponsePage(...);

but I don't have this option.

Is there any hook that I can use to expire the session after the work
on the current page is done? It is quite tricky because the page that
is loaded back into the browser with redirect after post needs the
session to replace the panel.

I have tried this but it doesn't work:

replacedPanel.getPage().add(new AbstractBehavior(){
    private boolean lastTime = false;
    @Override
    public void detach(Component component) {
        super.detach(component);
        if(lastTime){
            AuthenticatedWebSession webSession =
(AuthenticatedWebSession)Session.get();
            webSession.replaceSession();
        }else{
            lastTime = true;
        }
    }
});
replacedPanel.replaceWith(newPanel);

Many thanks,

Bernard


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to