public class ViewScopeImpl extends Object implements org.springframework.beans.factory.config.Scope, org.springframework.beans.factory.config.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".ViewScope| Modifier and Type | Class and Description |
|---|---|
static class |
ViewScopeImpl.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 |
|---|
ViewScopeImpl() |
| Modifier and Type | Method and Description |
|---|---|
Object |
get(String name,
org.springframework.beans.factory.ObjectFactory<?> objectFactory) |
String |
getConversationId() |
static ViewCacheRetrievalStrategy |
getViewCacheRetrievalStrategy()
Returns the
ViewCacheRetrievalStrategy
to use. |
void |
postProcessBeanFactory(org.springframework.beans.factory.config.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,
ViewScopeImpl.BeanFactoryContextViewCacheRetrievalStrategy
is used.public Object get(String name, org.springframework.beans.factory.ObjectFactory<?> objectFactory)
get in interface org.springframework.beans.factory.config.Scopepublic Object remove(String name)
remove in interface org.springframework.beans.factory.config.Scopepublic void registerDestructionCallback(String name, Runnable callback)
registerDestructionCallback in interface org.springframework.beans.factory.config.Scopepublic Object resolveContextualObject(String key)
resolveContextualObject in interface org.springframework.beans.factory.config.Scopepublic String getConversationId()
This implementation always returns null.
getConversationId in interface org.springframework.beans.factory.config.Scopepublic void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
throws org.springframework.beans.BeansException
postProcessBeanFactory in interface org.springframework.beans.factory.config.BeanFactoryPostProcessororg.springframework.beans.BeansExceptionCopyright © 2017 Vaadin Ltd. All Rights Reserved.