Example usage for org.apache.wicket Application getJavaScriptLibrarySettings

List of usage examples for org.apache.wicket Application getJavaScriptLibrarySettings

Introduction

In this page you can find the example usage for org.apache.wicket Application getJavaScriptLibrarySettings.

Prototype

public final JavaScriptLibrarySettings getJavaScriptLibrarySettings() 

Source Link

Usage

From source file:com.norconex.commons.wicket.markup.head.JQueryLibrariesContributor.java

License:Apache License

public static void contribute(Application application, IHeaderResponse response) {
    response.render(new PriorityHeaderItem(JavaScriptHeaderItem
            .forReference(application.getJavaScriptLibrarySettings().getJQueryReference())));
    response.render(new PriorityHeaderItem(JavaScriptHeaderItem
            .forReference(application.getJavaScriptLibrarySettings().getWicketAjaxReference())));
    response.render(new PriorityHeaderItem(JavaScriptHeaderItem
            .forReference(application.getJavaScriptLibrarySettings().getWicketEventReference())));
}

From source file:de.alpharogroup.wicket.base.util.application.ApplicationExtensions.java

License:Apache License

/**
 * Gets the default jquery reference from the given application.
 *
 * @param application/*from ww  w  .  j  av  a2  s .c  o  m*/
 *            the application
 * @return the default jquery reference
 */
public static ResourceReference getJQueryReference(final Application application) {
    return application.getJavaScriptLibrarySettings().getJQueryReference();
}

From source file:org.wicketstuff.js.ext.util.ExtResourcesHeaderItem.java

License:Apache License

@Override
public Iterable<? extends HeaderItem> getDependencies() {
    final Application application = Application.get();
    IJavaScriptLibrarySettings jsLibrarySettings = application.getJavaScriptLibrarySettings();

    final IDebugSettings debugSettings = application.getDebugSettings();
    if (debugSettings.isAjaxDebugModeEnabled()) {
        return Arrays.asList(JavaScriptHeaderItem.forReference(jsLibrarySettings.getWicketAjaxDebugReference()),
                JavaScriptHeaderItem.forScript("Wicket.Ajax.DebugWindow.enabled=true;",
                        "wicket-ajax-debug-enable"));
    } else {//ww  w  .ja  va2 s  . com
        ResourceReference wicketAjaxReference = jsLibrarySettings.getWicketAjaxReference();
        return Arrays.asList(JavaScriptHeaderItem.forReference(wicketAjaxReference));
    }
}

From source file:org.wicketTutorial.behaviors.OnChangeSingleChoiceBehavior.java

License:Apache License

@Override
public void renderHead(Component component, IHeaderResponse response) {
    super.renderHead(component, response);
    Application app = Application.get();
    ResourceReference jqReference = app.getJavaScriptLibrarySettings().getJQueryReference();

    response.render(JavaScriptHeaderItem.forReference(jqReference));
}