wicket-select2
wicket-select2 copied to clipboard
No redirect after session timeout
I have the following problem:
if my current session is already expired and I click a Select2Choice Wicket creates an ajax response containing a redirect (see here: http://bit.ly/1flepiM) but this response is never digestet by wicket-ajax-jquery.js, because it is not even loaded on the current page (no ajax components). Even if there are other ajax components on the page and wicket-ajax-jquery.js is loaded, processAjaxResponse is never called. The result is that the redirect is not happening and the select2 get stuck (like this: http://bit.ly/1fligwv).
I created a quickstart to demonstrate this: http://bit.ly/1flfQOc (the session timeout is set to 1min in web.xml):
- open browser on localhost:8080
- wait for >1min
- click on select2
- look at response in e.g. firebug
Wicket seems to "think" that the request is ajax, but AFAIK Select2Choice is not using ajax, right? So is this a problem of Wicket itself or wicket-select2?
Ahm, surely wicket-select2 is doing ajax request ;)
It sets WebRequest.PARAM_AJAX in com.vaynberg.wicket.select2.AbstractSelect2Choice#onInitialize
. If the request is processed correctly, the JSON response is returned and digested, but in case of a server-side error (e.g. PageExpiredException) the returned ajax response is not consumed, as far as I do understand the code.
So, this relates to #75 I guess.
FYI: I have posted this also to the wicket mailing list for further discussions.