Class ViewScopeImpl

java.lang.Object
com.vaadin.spring.internal.ViewScopeImpl
All Implemented Interfaces:
org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.beans.factory.config.Scope

public class ViewScopeImpl extends Object implements org.springframework.beans.factory.config.Scope, org.springframework.beans.factory.config.BeanFactoryPostProcessor
Implementation of Spring's 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".
Author:
Petter Holmström (petter@vaadin.com), Henri Sara (hesara@vaadin.com)
See Also:
  • Field Details

  • Constructor Details

    • ViewScopeImpl

      public ViewScopeImpl()
  • Method Details

    • setViewCacheRetrievalStrategy

      public static void setViewCacheRetrievalStrategy(ViewCacheRetrievalStrategy viewCacheRetrievalStrategy)
    • getViewCacheRetrievalStrategy

      public static ViewCacheRetrievalStrategy getViewCacheRetrievalStrategy()
    • get

      public Object get(String name, org.springframework.beans.factory.ObjectFactory<?> objectFactory)
      Specified by:
      get in interface org.springframework.beans.factory.config.Scope
    • remove

      public Object remove(String name)
      Specified by:
      remove in interface org.springframework.beans.factory.config.Scope
    • registerDestructionCallback

      public void registerDestructionCallback(String name, Runnable callback)
      Specified by:
      registerDestructionCallback in interface org.springframework.beans.factory.config.Scope
    • resolveContextualObject

      public Object resolveContextualObject(String key)
      Specified by:
      resolveContextualObject in interface org.springframework.beans.factory.config.Scope
    • getConversationId

      public String getConversationId()

      This implementation always returns null.

      Specified by:
      getConversationId in interface org.springframework.beans.factory.config.Scope
    • postProcessBeanFactory

      public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) throws org.springframework.beans.BeansException
      Specified by:
      postProcessBeanFactory in interface org.springframework.beans.factory.config.BeanFactoryPostProcessor
      Throws:
      org.springframework.beans.BeansException