wicket-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Stoch <daniel.st...@gmail.com>
Subject Re: Autolinking resources in 1.4: different path after second request
Date Fri, 02 Oct 2009 13:17:37 GMT
I don't think there is something wrong in using <wicket:link> to add
resources (this way has some advantages too).
But I have tried your proposition and instead <wicket:link> in html, I
have added it in HomePage constructor:
add(CSSPackageResource.getHeaderContribution(HomePage.class, "main.css"));

Now the link is always rendered as (correctly for me :)):
<link rel="stylesheet" type="text/css"
href="resources/com.mycompany.HomePage/main.css" />

Well I think both ways (using <wicket:link> or header contribution in
code) should works the same.


2009/10/2 Fran├žois-Xavier Lacroix <fxlacroix@gmail.com>:
> I m not sure this is the best way to add css ressources...
> try to use instead
> add(CssPackageResource.getHeaderContribution("main.css"));
> assuming your css file is in you webapp

View raw message