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

inconsistent state after setting AjaxDebugModeEnabled to true in an AjaxRequest

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.3.0-beta3
    • 1.3.0-rc1
    • wicket
    • None

    Description

      when the application debugsetting AjaxDebugModeEnabled is changed from false to true in an AjaxRequest (e.g. via JMX), the following two statements in AbstractDefaultAjaxBehavior#renderHead are executed:

      response.renderJavascript("wicketAjaxDebugEnable=true;", "wicket-ajax-debug-enable");
      response.renderJavascriptReference(JAVASCRIPT_DEBUG);

      as soon as the client recieves the response, the first javascript statement is executed and code in wicket-ajax.js "thinks" that ajax debug is enabled.
      well it is, but wicket-ajax-debug.js has not arrived (or at least has not been processed) yet, and thus Wicket.Log.info() and Wicket.Log.error() will fail, because these methods access an object which is defined in wicket-ajax-debug.js.

      This problem seems to be solved by changing the order of the statements in AbstractDefaultAjaxBehavior#renderHead, so that the ResourceReference JAVASCRIPT_DEBUG is rendered before wicketAjaxDebugEnable is set to true.

      Attachments

        Activity

          People

            Unassigned Unassigned
            faceman Gerolf Seitz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: