org.apache.wicket.settings.JavaScriptLibrarySettings Java Examples

The following examples show how to use org.apache.wicket.settings.JavaScriptLibrarySettings. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BasePage.java    From Orienteer with Apache License 2.0 6 votes vote down vote up
@Override
public void renderHead(IHeaderResponse response) {
	response.render(new PriorityHeaderItem(CssHeaderItem.forReference(BOOTSTRAP_CSS)));
	response.render(CssHeaderItem.forReference(FONT_AWESOME_CSS));
	response.render(CssHeaderItem.forReference(SIMPLE_LINE_ICONS_CSS));
	response.render(CssHeaderItem.forReference(COREUI_CSS));
	response.render(CssHeaderItem.forReference(ORIENTEER_COREUI_CSS));
	super.renderHead(response);
	addBootstrapDatepicker(response);
	JavaScriptLibrarySettings javaScriptSettings =
			getApplication().getJavaScriptLibrarySettings();
	response.render(new PriorityHeaderItem(JavaScriptHeaderItem
			.forReference(javaScriptSettings.getJQueryReference())));
	response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(BOOTSTRAP_JS)));
	response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(TETHER_JS)));
	response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(PACE_JS)));
	response.render(JavaScriptHeaderItem.forReference(COREUI_JS).setDefer(true));

}
 
Example #2
Source File: JQueryJavascriptBehavior.java    From webanno with Apache License 2.0 5 votes vote down vote up
@Override
public void renderHead(Component aComponent, IHeaderResponse aResponse)
{
    // We also load the JQuery CSS always just to get a consistent look across
    // the app
    JavaScriptLibrarySettings cfg = aComponent.getApplication().getJavaScriptLibrarySettings();

    if (cfg.getJQueryReference() != null) {
        aResponse.render(JavaScriptHeaderItem.forReference(cfg.getJQueryReference()));
    }
}