how to dynamically skin a widget via css

Hi Jouni,

Thank you for the suggestions. However here is the exact problem I am trying to solve.

Lets assume for the sake of simplicity I have a vaadin app, that displays 2 text fields, and each user that logs in has an ability to customize the L & F of these 2 text fields, I can do this by maybe allowing users to enter some css and store it off in a database. For simplicity sake lets assume all css is valid and vaadin compatible. User a might choose background red, while user b might choose yellow. Whenever a user logs back in they must see the colors they set in their previous session. The simplest thing to do here is store the css in a database, and read it back and show them their “theme” when they log back in. This means I probably will not have css theme files on disk and theme must be retrieved and applied after login.

In most situations the UI L & F tends to be pretty static or only has limited choices. But in my situation the 2 users can style the text in any way css allows them to style text boxes.

I am trying to understand how I would solve this problem of applying custom css l & f after user login via vaadin. I know there are other ways of solving this problem so I am interested in your thoughts if vaadin has a different way of solving this. I am assuming as you mentioned earlier csslayout might be the answer I am looking for.

Thank you