Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-2877

PreCallHandler and PostCallHandler registrations are lost when ;jsessionid is removed in javascript files URL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.4.8
    • 1.4.11
    • wicket

    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

          Activity

            People

              ivaynberg Igor Vaynberg
              mimah35 Michel DAVID
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: