Class DispatcherByXMLSpringAccess

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<String,Object>
org.eclnt.jsfserver.managedbean.DefaultDispatcher
org.eclnt.workplace.WorkpageDispatcher
org.eclnt.ccee.spring.v2.context.xmlbased.DispatcherByXMLSpringAccess
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>, ICCEEConstants, org.eclnt.jsfserver.defaultscreens.Statusbar.IStatusBarDrillDownInfoProvider, org.eclnt.jsfserver.managedbean.IDispatcher, org.eclnt.workplace.IWorkpageDispatcher

public abstract class DispatcherByXMLSpringAccess extends org.eclnt.workplace.WorkpageDispatcher implements ICCEEConstants
Dispatcher that uses Spring context to access page beans. If the expressions from the page processing is "#{d.XyzUI.xxx}, then the "XyzUI" is resolved in the following way:

1. the Spring context is requested for a bean with name "XyzUI"
2. if this object is NOT available then the normal resolution of beans following the normal Dispatcher-functions is done.

This dispatcher creates one spring context (AbstractApplicationContext) per dialog session. This dispatcher-spring-context is a child of the normal application spring context. The creation of this dialog-session-spring-context is done through class DialogSessionXMLApplicationContextFactory.
See Also:
  • Field Details

    • m_springContext

      protected org.springframework.context.support.AbstractApplicationContext m_springContext
  • Constructor Details

    • DispatcherByXMLSpringAccess

      public DispatcherByXMLSpringAccess()
      Constructor for the root dispatcher within the dialog session.
    • DispatcherByXMLSpringAccess

      public DispatcherByXMLSpringAccess(org.eclnt.workplace.IWorkpageContainer workpageContainer)
      Constructor for the sub dispatchers - if using the CaptainCasa Workplace management.
  • Method Details

    • initializeIgnoreSpringInitializationErrors

      public static void initializeIgnoreSpringInitializationErrors(boolean value)
      If there are problems creating the Spring context then by default an Error is thrown during initialization. If this should be avoided then you may set this value to "false". This typically makes sense if you want to use this class both in Spring scenarios and in no-Spring scenarios.
    • initializeResolveBeanWithLowerCaseKey

      public static void initializeResolveBeanWithLowerCaseKey(boolean value)
      When accessing beans from the spring context then the value of the expression is directly used. Example: if the expression is "#{d.XyzUI.*}" then the key which is used for accessing the spring context is "XyzUI".
      If defining "false" as parameter of this method, then the resolving stops when not having found a corresponding bean in the spring context.
      If passing "true" as parameter of this method, then after using "XyzUI" also the lower case variant "xyzUI" is used.

      Default is "true".
    • getSpringContext

      public org.springframework.context.support.AbstractApplicationContext getSpringContext()
      The spring context that is used for resolving dispatched beans. This is a context which is managed per dialog session and which is a child of the normal Spring application context.
    • readObject

      protected Object readObject(String key) throws Exception
      Overrides:
      readObject in class org.eclnt.jsfserver.managedbean.DefaultDispatcher
      Throws:
      Exception
    • createSpringContext

      protected org.springframework.context.support.AbstractApplicationContext createSpringContext()
      Creation of spring context. By default uses DialogSessionXMLApplicationContextFactory for creating the spring context.
    • getStaticDispatcherInfo

      public static org.eclnt.jsfserver.managedbean.DefaultDispatcher.DispatcherInfo getStaticDispatcherInfo()
    • findContextFactory

      protected DialogSessionXMLApplicationContextFactory findContextFactory()