You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Meier (JIRA)" <ji...@apache.org> on 2015/11/11 20:47:11 UTC

[jira] [Created] (WICKET-6032) Wicket.Ajax.done() called twice on redirect

Sven Meier created WICKET-6032:
----------------------------------

             Summary: Wicket.Ajax.done() called twice on redirect
                 Key: WICKET-6032
                 URL: https://issues.apache.org/jira/browse/WICKET-6032
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 7.1.0, 6.20.0, 8.0.0-M1
            Reporter: Sven Meier
            Assignee: Sven Meier
            Priority: Minor


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)

{code}
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);
{code}

This leads to:
- done() being called before the closure returned from #success()
- done() being called a second time from the closure added in #complete()



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)