I just put CSS and JS under classpath and use
HeaderContributor.forCss(clazz, path); and
HeaderContributor.forJavaScrpt(clazz, path);

The benefit for me is not only simple and work, but that also allow me
to pack everything into a jar and build up some libraries to share
among difference projects.

On 2/14/07, spencer.c <[EMAIL PROTECTED]> wrote:
>
> Alright, I'm having trouble with what should be an easy thing:
> My page uses a stylesheet (1.css).  Unfortunately, I can't get it to find
> the resource.
>
> I have triedthe code listed here:
> http://www.wicket-wiki.org.uk/wiki/index.php/JavaScript
>
> Without success.  What am I doing wrong?
>
> In my html file, I have the following:
> <link wicket:id="pageCSS" rel="Stylesheet" type="text/css" href="1.css"/>
>
> In my page java class, I do the following:
> add(new StyleSheetReference("pageCSS", getClass(), "1.css"));
>
> 1.css is saved next to the class and .html files.
>
> When I run the application, the page comes up fine, but unstyled, and I get
> the following message logged:
> WARN  - PackageResource            - Unable to find package resource [path =
> com/test/pages/1.css, style = null, locale = null]
>
>
> Did something change regarding this between 1.3 and 1.2?  What else do I
> need to do?  Any help on this is greatly appreciated.
>
> I am using the current 1.3 snapshot.
>
> Best Regards,
>
> - spencer
> --
> View this message in context: 
> http://www.nabble.com/Simple-CSS-Link-tf3222758.html#a8951239
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier.
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to