So... someone comes to my app and logs in. The get a page which includes a
"popup" link to AppPage. The link is constructed like so
In StartPage.java:

     PopupSettings popupSettings = new
PopupSettings(PageMap.forName("popuppagemap"));
     add(new BookmarkablePageLink("app-page",
AppPage.class).setPopupSettings(popupSettings));


The AppPage class is a page which is also behind authentication. Normally,
if you go to its bookmarked URL without having logged in, you get my login
page, login, and then are redirected to the AppPage. This is all handled by
the built-in wicket authentication scheme. I'm not doing anything fancy.

In the scenario described above, when the popup opens, you aren't asked to
login because you already logged in on the parent page. So far so good.

The parent page also contains a link to logout. Clicking this link gets you
the SignOutPage which does this:

In SignOutPage.java:

    protected void onEndRequest() {
        AuthenticatedWebSession awSession = (AuthenticatedWebSession)
getSession();
        awSession.invalidate();
        try { 
           
getWebRequestCycle().getWebResponse().getHttpServletResponse().sendRedirect("app");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }


You are logged out and brought back to the home page (this is all in the
parent window). Still Ok.

Here is the bad part...

If I reload/refresh the pop-up window (which is still open, and still
showing the AppPage - we haven't done anything in this window), I correctly
get the login page (because I have logged out), but when I submit the login
form I am brought the home page, not the AppPage! The reload/refresh makes
the identical request as if I tried to go straight to the AppPage (which
normally lets me login and present the AppPage) - but in this scenario ,
with the pop-up, and after a log out from the parent, it does not work.

I am at my wits end, so any help or advice, or suggestions would be much
appreciated. Please let me know if I can provide more code to help.

Thanks
-- 
View this message in context: 
http://www.nabble.com/Strange-Popup-Behavior-After-Logout-Session.invalidate%28%29-tf3620694.html#a10110484
Sent from the Wicket - User mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to