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

Wicket.Ajax.done() called twice on redirect

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 6.20.0, 7.1.0, 8.0.0-M1
    • 7.2.0, 8.0.0-M1, 6.22.0
    • wicket
    • None

    Description

      When a redirect is received from the server during Ajax requests, #processAjaxResponse() explicitly calls #done() on the current call:
      (wicket-ajax-jquery.js, line 777)

      if (typeof(redirectUrl) !== "undefined" && redirectUrl !== null && redirectUrl !== "") {
          // In case the page isn't really redirected. For example say the redirect is to an octet-stream.
          // A file download popup will appear but the page in the browser won't change.
          this.success(context);
          this.done(context.attrs);
      

      This leads to:

      • done() being called before the step added in #success()
      • done() being called a second time from the step added in #complete()

      Attachments

        Activity

          People

            svenmeier Sven Meier
            svenmeier Sven Meier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: