So I am trying to do the package resource reference thing.
https://cwiki.apache.org/WICKET/adding-javascript-or-css-using-a-resource.html
https://cwiki.apache.org/WICKET/including-css-resources.html

However, I am clearly not doing it right.  The URLs rendered look like:

<script
src="resources/gov.usdoj.afms.shared.wicket.ext.grid.ExtGrid$1/ExtGridSupport.js"
type="text/javascript">
<link
href="resources/gov.usdoj.afms.shared.wicket.ext.grid.ExtGrid$1/extjs.css"
type="text/css" rel="stylesheet">

These are broken links in the browser.

I tried putting a package reference in front of them and that just prepends
the package in front of the slash befor ethe file name, but it also does not
work.  My code is:

                  response.renderJavascriptReference(new
PackageResourceReference(this.getClass(), 
                              /*this.getClass().getPackage().getName() +*/
"ExtGridSupport.js"));
                  response.renderCSSReference(new
PackageResourceReference(this.getClass(), 
                              /*this.getClass().getPackage().getName() +*/
"extjs.css"));

The resources (js and css files) are in the same package as the invoking
class.  Any ideas what I am doing wrong here?




--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/JS-and-CSS-package-references-tp4657034.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to