wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ernesto Reinaldo Barreiro <reier...@gmail.com>
Subject Re: JS and CSS package references
Date Wed, 06 Mar 2013 16:27:23 GMT
Assuming

ExtGridSupport.js
extjs.css

sit next to ExtGrid class just do

 response.renderJavascriptReference(new PackageResourceReference(
ExtGrid.class,"ExtGridSupport.js"));

On Wed, Mar 6, 2013 at 5:14 PM, Entropy <blmulholland@gmail.com> wrote:

> 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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Regards - Ernesto Reinaldo Barreiro
Antilia Soft
http://antiliasoft.com/ <http://antiliasoft.com/antilia>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message