VAADIN 7: How to set theme without annotation (@Theme)


I have two different themes in my project.
I want to read web.xml to decide which of this themes do I have to use.
So how can I realize this? I find nothing like setTheme(…). You recommend to use annotation, but I can’t use it in my case.

Do you have a solution for my problem?



I think you could use a custom UiProvider to set the theme dynamically for a UI. Here’s a thread from StackOverflow that has a solution: