public class SpringUIProvider
extends com.vaadin.server.UIProvider
UIProvider that looks up UI classes from the
Spring application context. The UI classes must be annotated with
SpringUI.| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
SpringUIProvider(com.vaadin.server.VaadinSession vaadinSession) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configureNavigator(com.vaadin.ui.UI ui)
Configures a UI to use the navigator found by
getNavigator() if
there is a SpringViewDisplay annotation. |
com.vaadin.ui.UI |
createInstance(com.vaadin.server.UICreateEvent event) |
protected void |
createThemeDirectory(String theme)
Create theme directory in the servlet context (if possible) to support
caching of themes compiled on the fly also in applications deployed as
JARs.
|
protected String |
deriveMappingForUI(String uiBeanName)
Derive the name (path) for a UI based on its annotation parameters.
|
protected void |
detectUIs() |
protected Object |
findSpringViewDisplay(com.vaadin.ui.UI ui) |
protected SpringNavigator |
getNavigator()
Returns the configured navigator bean or null if no bean defined.
|
String |
getPageTitle(com.vaadin.server.UICreateEvent event) |
protected javax.servlet.ServletContext |
getServletContext() |
protected SpringViewDisplayPostProcessor |
getSpringViewDisplayPostProcessor() |
String |
getTheme(com.vaadin.server.UICreateEvent event) |
protected Class<? extends com.vaadin.ui.UI> |
getUIByPath(String path) |
Class<? extends com.vaadin.ui.UI> |
getUIClass(com.vaadin.server.UIClassSelectionEvent uiClassSelectionEvent) |
protected org.springframework.web.context.WebApplicationContext |
getWebApplicationContext() |
protected void |
mapPathToUI(String path,
Class<? extends com.vaadin.ui.UI> uiClass) |
public SpringUIProvider(com.vaadin.server.VaadinSession vaadinSession)
protected void detectUIs()
protected String deriveMappingForUI(String uiBeanName)
uiBeanName - name of the UI beanpublic Class<? extends com.vaadin.ui.UI> getUIClass(com.vaadin.server.UIClassSelectionEvent uiClassSelectionEvent)
getUIClass in class com.vaadin.server.UIProviderprotected org.springframework.web.context.WebApplicationContext getWebApplicationContext()
public com.vaadin.ui.UI createInstance(com.vaadin.server.UICreateEvent event)
createInstance in class com.vaadin.server.UIProviderprotected void createThemeDirectory(String theme)
Any errors are logged and otherwise ignored, as this only helps caching.
theme - name of the themeprotected javax.servlet.ServletContext getServletContext()
protected void configureNavigator(com.vaadin.ui.UI ui)
getNavigator() if
there is a SpringViewDisplay annotation.ui - the Spring managed UI instance for which to configure
automatic navigationprotected SpringNavigator getNavigator()
SpringNavigator or null if none definedorg.springframework.beans.BeansException - if there are multiple navigator beans or other configuration
problemprotected Object findSpringViewDisplay(com.vaadin.ui.UI ui)
protected SpringViewDisplayPostProcessor getSpringViewDisplayPostProcessor()
public String getTheme(com.vaadin.server.UICreateEvent event)
getTheme in class com.vaadin.server.UIProviderpublic String getPageTitle(com.vaadin.server.UICreateEvent event)
getPageTitle in class com.vaadin.server.UIProviderCopyright © 2017 Vaadin Ltd. All Rights Reserved.