Vaadin CDI and UIProvider

Hi,

i make my first steps with Vaadin CDI and want to know how to use a UIProvider. My webapp should support different UIs or Layouts for different User-Agents like in this example: https://vaadin.com/wiki/-/wiki/Main/Creating+an+application+with+different+features+for+different+clients

What is the CDI way to do this?

Thanks

Andre

I suggest you look at
Vaadin-cdi source
particularly the CDIUIProvider , However , I would think it is easier to make use of different Views depending on the User-Agent rather than an entirely different UI.

Perhaps the simplest way would be to annotate your views with a viewname+, and re-implement
CDIViewProvider
to search for a viewname+ instead of just viewname . with a fallback to just the viewname if you dont have a specific implementation for the user-agent…

Well for mobile you might want a different UI…