I've updated to the a static Shared.class declaration, rather than
getClass(), thanks for that.
I'm using the snapshot from today, so I am definitely up to date.
My output looks like this:
<link href="resources/com.test.pages.Share/1.css" rel="stylesheet"
type="text/css" wicket:id="pageCSS"/>
which is similar to what you put there, except without the ../../'s.
Eelco Hillenius wrote:
>
>> 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"));
>
> getClass() is not a good idea, as then it'll depend on overriding
> classes. It is better to just fix:
> add(new StyleSheetReference("pageCSS", MyPage.class, "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]
>
> What does your page output look like? Something like:
>
> <link
> href="../../../../../../resources/ts4.web.wicket.page.workspace.TopBarPanel/TopBarPanel_en_US.css"
> rel="stylesheet"/>
>
> ? Do you have any mounts in place there?
>
>> I am using the current 1.3 snapshot.
>
> Please be sure to stay up to date with 1.3 as we're fixing things
> almost daily. Unfortunately, our maven repo with snapshots seems to be
> a bit crooked, so if you're depending on that, you should scratch your
> local maven repo wicket dirs regularly to force new downloads. See
> http://issues.apache.org/jira/browse/WICKET-283
>
> Eelco
>
>
>
--
View this message in context:
http://www.nabble.com/Simple-CSS-Link-tf3222758.html#a8952885
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