use of org.apache.wicket.settings.JavaScriptLibrarySettings in project wicket by apache.
the class CoreLibrariesContributor method contribute.
/**
* Contributes the backing library plus the implementation of Wicket.Event.
*
* @param application
* the application instance
* @param response
* the current header response
*/
public static void contribute(final Application application, final IHeaderResponse response) {
JavaScriptLibrarySettings jsLibrarySettings = application.getJavaScriptLibrarySettings();
ResourceReference wicketAjaxReference = jsLibrarySettings.getWicketAjaxReference();
response.render(JavaScriptHeaderItem.forReference(wicketAjaxReference));
}
use of org.apache.wicket.settings.JavaScriptLibrarySettings in project wicket by apache.
the class OnDomReadyHeaderItem method getDependencies.
@Override
public List<HeaderItem> getDependencies() {
JavaScriptLibrarySettings ajaxSettings = Application.get().getJavaScriptLibrarySettings();
ResourceReference wicketAjaxReference = ajaxSettings.getWicketAjaxReference();
List<HeaderItem> dependencies = super.getDependencies();
dependencies.add(JavaScriptHeaderItem.forReference(wicketAjaxReference));
return dependencies;
}
use of org.apache.wicket.settings.JavaScriptLibrarySettings in project wicket by apache.
the class CoreLibrariesContributor method contributeAjax.
/**
* Contributes the Ajax backing library plus wicket-event.js and wicket-ajax.js implementations.
* Additionally if Ajax debug is enabled then wicket-ajax-debug.js implementation is also added.
*
* @param application
* the application instance
* @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));
}
}
use of org.apache.wicket.settings.JavaScriptLibrarySettings in project wicket by apache.
the class OnEventHeaderItem method getDependencies.
@Override
public List<HeaderItem> getDependencies() {
JavaScriptLibrarySettings ajaxSettings = Application.get().getJavaScriptLibrarySettings();
ResourceReference wicketAjaxReference = ajaxSettings.getWicketAjaxReference();
List<HeaderItem> dependencies = super.getDependencies();
dependencies.add(JavaScriptHeaderItem.forReference(wicketAjaxReference));
return dependencies;
}
use of org.apache.wicket.settings.JavaScriptLibrarySettings in project wicket by apache.
the class OnLoadHeaderItem method getDependencies.
@Override
public List<HeaderItem> getDependencies() {
JavaScriptLibrarySettings ajaxSettings = Application.get().getJavaScriptLibrarySettings();
ResourceReference wicketAjaxReference = ajaxSettings.getWicketAjaxReference();
List<HeaderItem> dependencies = super.getDependencies();
dependencies.add(JavaScriptHeaderItem.forReference(wicketAjaxReference));
return dependencies;
}
Aggregations