* @param response
* the current header response
*/
public static void contributeAjax(final Application application, final IHeaderResponse response)
{
JavaScriptLibrarySettings jsLibrarySettings = application.getJavaScriptLibrarySettings();
final DebugSettings debugSettings = application.getDebugSettings();
if (debugSettings.isAjaxDebugModeEnabled())
{
response.render(JavaScriptHeaderItem.forReference(jsLibrarySettings.getWicketAjaxDebugReference()));
response.render(JavaScriptHeaderItem.forScript("Wicket.Ajax.DebugWindow.enabled=true;",
"wicket-ajax-debug-enable"));
}
else
{
ResourceReference wicketAjaxReference = jsLibrarySettings.getWicketAjaxReference();
response.render(JavaScriptHeaderItem.forReference(wicketAjaxReference));
}
}