You would probably have to use cookies to save which style the users would
have. There is no way knowing this without login or cookie.

There are probably a better way of doing this but if you save style and
classes in a database like this

*{ font-family: verdana; } // a row in the database
a{ color: red; } // a row in the database

you could implement the IHeaderContributor and override the renderHead

public void renderHead(IHeaderResponse response) {
  StringBuffer buf = new StringBuffer();
  buf.append( "<style type=\"text/css\">" ); 
  buf.append( "*{ font-size: 9px; }" );
  buf.append( "</style>" );
  response.renderString(buf);
}

of couse you should the get it from a service or directly from a dao.

public void renderHead(IHeaderResponse response) {
   BradningService service = getBrandingService(); // get this using
@SpringBean or whatever
   List<String> styles = service.getStyles( user ); // get the style for a
user
   iterate here and add the style

}


-- 
View this message in context: 
http://www.nabble.com/Save-CSS-StyleSheet-in-Database---tp24604324p24604928.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to