use of org.apache.wicket.markup.html.resources.JavascriptResourceReference in project gitblit by gitblit.
the class BasePage method addBottomScript.
/**
* Adds a HTML script element loading the javascript designated by the given path.
*
* @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)) + "'></script>\n");
bottomScripts.add(script.setEscapeModelStrings(false).setRenderBodyOnly(true));
}
Aggregations