i think one thing is better with header...
you can add css or javascript from every action you deal with...
Wicket manage all the added and make all the needed tags

+

On Fri, Oct 2, 2009 at 3:17 PM, Daniel Stoch <[email protected]> wrote:

> 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.
>
> --
> Daniel
>
> 2009/10/2 François-Xavier Lacroix <[email protected]>:
> > 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
> >
>

Reply via email to