Upgrading to 1.3.6 made this work properly when I'm testing it with a real web 
server, e.g. when I perform the AJAX request, I am redirected to the 
PageExpiredErrorPage.  However, I am still getting strange results when using 
WicketTester.  For instance, I have the following test...


                setUpUser();
                login("user", "password");
                
                tester.startPage(classUnderTest);

                FormTester accountSelectionFormTester = 
tester.newFormTester("accountSelectionForm");
                accountSelectionFormTester.select("accountSelectBox", 0);
                
                tester.getWicketSession().invalidateNow();
                //Select client action
                
tester.executeAjaxEvent("accountSelectionForm:accountSelectBox", "onchange");
                
                tester.assertRenderedPage(PageExpiredErrorPage.class);

However, the assertion is failing and telling me I am still at classUnderTest!  
Is there something else magical I have to do to get the tester to invalidate 
the session??

-----Original Message-----
From: Joel Barciauskas [mailto:jbarciaus...@nexaweb.com] 
Sent: Wednesday, May 20, 2009 11:07 AM
To: users@wicket.apache.org
Subject: Empty response on AJAX request when the session has timed out

Hi,

I am using Spring Security with wicket-auth-roles and wicket 1.3.5.  After a 
user is logged in, the normal behavior on a session timeout is when a 
subsequent non-AJAX request is made (e.g., requesting a new page using a 
regular Link), the user is 302 redirected to the LoginPage.  However, if the 
user makes an AJAX request after the session is timed out, nothing happens.  In 
the AJAX debug console, I see the following:

INFO: <ajax-response> </ajax-response>

Any guidance on how to configure Wicket so that when a request is made after a 
session is invalidated, the response is the same 302 redirect?

Thanks!

Joel Barciauskas

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

Reply via email to