IJavaScriptLibrarySettings jsLibrarySettings = application.getJavaScriptLibrarySettings();
ResourceReference wicketAjaxReference = jsLibrarySettings.getWicketAjaxReference();
response.render(JavaScriptHeaderItem.forReference(wicketAjaxReference));
final IDebugSettings 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"));
}