List of usage examples for org.apache.wicket.request.resource JavaScriptResourceReference JavaScriptResourceReference
public JavaScriptResourceReference(Class<?> scope, String name)
From source file:at.molindo.wicketutils.utils.WicketUtils.java
License:Apache License
public static JavaScriptResourceReference js(Class<?> scope, String name) { return new JavaScriptResourceReference(scope, name); }
From source file:com.cubeia.games.poker.admin.wicket.components.datepicker.BootstrapDatePicker.java
License:Open Source License
/** * Called immediately after the onConfigure method in a behavior. Since this is before the rendering * cycle has begun, the behavior can modify the configuration of the component (i.e. {@link Options}) * * @param behavior the {@link JQueryBehavior} *///from w w w . j a va 2 s. c om protected void onConfigure(JQueryBehavior behavior) { behavior.add(new JavaScriptResourceReference(BootstrapDatePicker.class, "bootstrap-datepicker.js")); behavior.add(new CssResourceReference(BootstrapDatePicker.class, "datepicker.css")); }
From source file:com.cubeia.games.poker.admin.wicket.components.timepicker.TimePickerBehaviour.java
License:Open Source License
public TimePickerBehaviour(String selector, Options options) { super(selector, "timepicker", options); this.add(new JavaScriptResourceReference(TimePickerBehaviour.class, "jquery.timepicker.js")); this.add(new CssResourceReference(TimePickerBehaviour.class, "jquery.timepicker.css")); }
From source file:com.gitblit.wicket.pages.BasePage.java
License:Apache License
/** * Adds a HTML script element loading the javascript designated by the given * path.// w w w . j a v a 2 s. c o m * * @param scriptPath * page-relative path to the Javascript resource; normally starts * with "scripts/" */ protected void addBottomScript(String scriptPath) { RepeatingView bottomScripts = getBottomScriptContainer(); Label script = new Label(bottomScripts.newChildId(), "<script type='text/javascript' src='" + urlFor(new JavaScriptResourceReference(this.getClass(), scriptPath), null) + "'></script>\n"); bottomScripts.add(script.setEscapeModelStrings(false).setRenderBodyOnly(true)); }
From source file:com.googlecode.wickedcharts.showcase.ShowcaseApplication.java
License:Apache License
/** * @see org.apache.wicket.Application#init() */// w w w .j ava 2 s . co m @Override public void init() { super.init(); JavaScriptResourceRegistry.getInstance().setJQueryReference( new JavaScriptResourceReference(ShowcaseApplication.class, "jquery-1.8.3.min-IEfix.js")); mountPage("/start", Homepage.class); mountPage("/start/${theme}", Homepage.class); mountPage("/simple", SimplePage.class); mountPage("/modal", ModalWindowPage.class); getJavaScriptLibrarySettings().setJQueryReference( new JavaScriptResourceReference(ShowcaseApplication.class, "jquery-1.8.3.min-IEfix.js")); }
From source file:com.googlecode.wickedcharts.wicket15.highcharts.features.drilldown.DrilldownProcessor.java
License:Apache License
/** * Resolves the needed javascript dependencies. *///from w w w.j a v a 2 s . c om private void addJavascriptDependencies(IHeaderResponse headerResponse) { headerResponse.renderJavaScriptReference( new JavaScriptResourceReference(DrilldownFunction.class, "drilldown.js")); }
From source file:com.googlecode.wickedcharts.wicket6.highcharts.features.drilldown.DrilldownProcessor.java
License:Apache License
/** * Resolves the needed javascript dependencies. *///from www. j a va 2 s . com private void addJavascriptDependencies(IHeaderResponse headerResponse) { headerResponse.render(JavaScriptHeaderItem .forReference(new JavaScriptResourceReference(DrilldownFunction.class, "drilldown.js"))); }
From source file:com.googlecode.wickedcharts.wicket6.highcharts.features.interaction.InteractionBehavior.java
License:Apache License
@Override public void renderHead(final Component component, final IHeaderResponse response) { super.renderHead(component, response); response.render(JavaScriptHeaderItem.forReference( new JavaScriptResourceReference(InteractionBehavior.class, "InteractionBehavior.js"))); }
From source file:com.googlecode.wickedcharts.wicket6.highcharts.features.selection.SelectionBehavior.java
License:Apache License
@Override public void renderHead(final Component component, final IHeaderResponse response) { super.renderHead(component, response); response.render(JavaScriptHeaderItem .forReference(new JavaScriptResourceReference(SelectionBehavior.class, "SelectionBehavior.js"))); }
From source file:com.googlecode.wicket.jquery.core.resource.JavaScriptPackageHeaderItem.java
License:Apache License
/** * Constructor//from ww w.j a v a 2s . c o m * * @param scope the scope * @param function the function, i.e.: the name of the '.js' file without the extension */ public JavaScriptPackageHeaderItem(Class<?> scope, String function) { super(new JavaScriptResourceReference(scope, function + ".js"), null, function, false, null, null); }