Description
When no http session exists the URL of wicket-ajax.js is suffxed with ;jsessionid token.
Then you can register preCallHandler or postCallHandler for the ajax requests with Wicket.Ajax.registerPreCallHandler(..) and Wicket.Ajax.registerPostCallHandler(...).
But if the browser supports cookies the result of an ajax request return a response with the wicket-ajax.js without ;jsessionid token. Then the browser download this "new" file and evaluate it. This evaluation clears all the preCallHandler and postCallHandler registrations and the postCallHandler you registered is never call.
A workaround is to add explicitly the wicket-ajax.js in your page (without the ;jsessonid token).
As a fix maybe you can add
if (typeof(Wicket.Ajax) == "undefined")
around Wicket.Ajax =
{ ... }(or around the whole file) like in wicket-event.js to prevent this.
Attachments
Issue Links
- depends upon
-
WICKET-2999 Packaged Resource URLs encoded with jsessionid
- Resolved