Class DynamicThemeInitializer

java.lang.Object
com.flowingcode.vaadin.addons.demo.DynamicThemeInitializer
All Implemented Interfaces:
VaadinServiceInitListener, Serializable, EventListener

public class DynamicThemeInitializer extends Object implements VaadinServiceInitListener
Service initialization listener that automatically applies a dynamic theme.

If the dynamic theme feature is supported, this listener checks whether the AppShellConfigurator is annotated with DefaultDynamicTheme. Otherwise, it checks for the presence of a /META-INF/dynamic-theme.properties file, and if found, it reads the theme property (e.g., theme=LUMO). The theme is registered as the default theme of the application, and an IndexHtmlRequestListener is registered to initialize the theme for all requests.

See Also: