inconsistent state after setting AjaxDebugModeEnabled to true in an AjaxRequest
-------------------------------------------------------------------------------

                 Key: WICKET-916
                 URL: https://issues.apache.org/jira/browse/WICKET-916
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.3.0-beta3
            Reporter: Gerolf Seitz
            Priority: Minor


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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to