public class VaadinViewScope extends Object implements Scope, BeanFactoryPostProcessor
Scope that binds the views
and dependent beans to the visibility of the view, i.e. the scope is activated when a user navigates
into a view and destroyed when the user navigates out of the view.
Registered by default as the scope ""vaadin-view"".VaadinViewScope| Modifier and Type | Class and Description |
|---|---|
static class |
VaadinViewScope.BeanFactoryContextViewCacheRetrievalStrategy
Implementation of
ViewCacheRetrievalStrategy that
fetches the ViewCache instance from the provided
bean factory. |
| Modifier and Type | Field and Description |
|---|---|
static String |
VAADIN_VIEW_SCOPE_NAME |
| Constructor and Description |
|---|
VaadinViewScope() |
| Modifier and Type | Method and Description |
|---|---|
Object |
get(String name,
ObjectFactory<?> objectFactory) |
String |
getConversationId() |
static ViewCacheRetrievalStrategy |
getViewCacheRetrievalStrategy()
Returns the
ViewCacheRetrievalStrategy to use. |
void |
postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) |
void |
registerDestructionCallback(String name,
Runnable callback) |
Object |
remove(String name) |
Object |
resolveContextualObject(String key) |
static void |
setViewCacheRetrievalStrategy(ViewCacheRetrievalStrategy viewCacheRetrievalStrategy)
Sets the
ViewCacheRetrievalStrategy to use. |
public static final String VAADIN_VIEW_SCOPE_NAME
public static void setViewCacheRetrievalStrategy(ViewCacheRetrievalStrategy viewCacheRetrievalStrategy)
ViewCacheRetrievalStrategy to use.public static ViewCacheRetrievalStrategy getViewCacheRetrievalStrategy()
ViewCacheRetrievalStrategy to use.
By default, VaadinViewScope.BeanFactoryContextViewCacheRetrievalStrategy is used.public Object get(String name, ObjectFactory<?> objectFactory)
public void registerDestructionCallback(String name, Runnable callback)
registerDestructionCallback in interface Scopepublic Object resolveContextualObject(String key)
resolveContextualObject in interface Scopepublic String getConversationId()
This implementation always returns null.
getConversationId in interface Scopepublic void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException
postProcessBeanFactory in interface BeanFactoryPostProcessorBeansExceptionCopyright © 2015. All rights reserved.