ok, i got it :-) the downside is, that then you have the names of the css in the java class; as this is more the duty of the html designer, i looked for a way to let the html designer say which css to take (and pull it from a static source) and a mechanism that converts this to the "real" url by wicket. so i used the <wicket:container id="cssLinks"> solution.
uwe. On Fri, Feb 6, 2009 at 5:15 PM, Thomas Mäder <[email protected]>wrote: > No, what I meant was a single tag link and a list view: > > <link wicket:id="cssList"></link> > > and in code: > > List cssFiles= Array.asList(new String[] { "base.css", "special.css" }); > add(new ListView("cssList", cssFiles) { > public void populateItem(ListItem item) { > String cssFile= item.getModelObjectAsString(); > item.add(new AttributeModifier("href", new AbstractReadOnlyModel() { > public Object getModel() { > return <the prefix, don't know where to get it>+"/"+cssFile > } > }); > } > }); > > this is off the top of my head, just to see if we're even on the same page. > > Thomas > > On Fri, Feb 6, 2009 at 12:15 PM, uwe janner <[email protected]> > wrote: > > > 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")); > > > > > > > > > -- > Thomas Mäder > Wicket & Eclipse Consulting > www.devotek-it.ch >
