usually you would simply write a servlet to do it, but if you insist on doing it in wicket...
https://cwiki.apache.org/WICKET/dynamically-generate-a-css-stylesheet.html -igor On Fri, May 7, 2010 at 12:52 PM, Eric Hamel <dantehick...@gmail.com> wrote: > All, > > I've been exploring the use of TextTemplateHeaderContributor.forCss method > to build a CSS template for multiple application. > > Take for example: > > IModel<Map<String, Object>> model = new > AbstractReadOnlyModel<Map<String,Object>>(){ > > private static final long serialVersionUID = 1L; > > @Override > public Map<String, Object> getObject() { > HashMap<String,Object> map = new HashMap<String, Object>(); > map.put("body-bgcolor", "red"); > return map; > } > > }; > add(TextTemplateHeaderContributor.forCss(WelcomePage.class, "Template.css", > model)); > > with CSS template: > > body{ > > background-color: ${body-bgcolor}; > > } > > > > The output works. However, the template is contributing to the header in the > form of: > > <style type="text/css"><!-- body{ background-color: red; }--></style> > > which is unacceptable. Is there a way to generate a .css file to be used by > the application ? > > Thank you > > -- > Sent by Eric Hamel > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org