hi thomas,
i dont really get your idea, maybe an example?
what i did was: write the followning in the html:
<link wicket:id="baseCss" href="base.css"/>
.... and many more ...
<link wicket:id="specialCss" href="special.css"/>
and then i "repeat" myself in the page class (CssLink just puts the dynamic
url part before the original href value):
add( new CssLink("baseCss"));
... and many more ...
add( new CssLink("specialCss"));
would look shorter if i do it in a loop iterationg over { "baseCss",
......... "specialCss" } but the bad thing about it is that i have to keep
these two in sync;
so i think i would implement it like this:
<wicket:container id="cssLinks">
<link href="base.css"/>
.... and many more ...
<link href="special.css"/>
</wicket:container>
and in the page i would add my custom ChangeHrefInBodyComponent, which would
directly change the hrefs in the body markup (not the child link components)
- bc i dont want to add those components explicitly by hand:
add( new ChangeHrefInBodyComponent( "cssLinks" );
or even simpler:
<wicket:cssLinks>
<link href="base.css"/>
.... and many more ...
<link href="special.css"/>
</wicket:cssLinks>
and nothing to add in the page (as with <wicket:links> )
cheersuwe!
On Thu, Feb 5, 2009 at 8:51 PM, Thomas Mäder <[email protected]>wrote:
> What I would have tried is this: have a list view of web markup containers.
> As a list item, create a WebMarkupContainer (mapped to the <link> tag). Add
> an attribute modifier that fixes up the "href" attribute of the link tag.
> You get the filename ("header.css") from the ListView's model. Or am I
> missing somthing here?
>
> Thomas
>
> --
> Thomas Mäder
> Wicket & Eclipse Consulting
> www.devotek-it.ch
>