org.sakaiproject.metaobj.utils.mvc.impl.beans
Class AddableResourceBundleViewResolver

java.lang.Object
  extended byorg.springframework.context.support.ApplicationObjectSupport
      extended byorg.springframework.web.context.support.WebApplicationObjectSupport
          extended byorg.springframework.web.servlet.view.AbstractCachingViewResolver
              extended byorg.springframework.web.servlet.view.ResourceBundleViewResolver
                  extended byorg.sakaiproject.metaobj.utils.mvc.impl.beans.AddableResourceBundleViewResolver
All Implemented Interfaces:
ApplicationContextAware, DisposableBean, Ordered, ViewResolver

public class AddableResourceBundleViewResolver
extends ResourceBundleViewResolver


Field Summary
protected  org.apache.commons.logging.Log logger
           
 
Fields inherited from class org.springframework.web.servlet.view.ResourceBundleViewResolver
DEFAULT_BASENAME
 
Constructor Summary
AddableResourceBundleViewResolver()
           
 
Method Summary
 void destroy()
           
 List getBaseNames()
           
protected  BeanFactory initFactory(Locale locale)
          Initialize the BeanFactory from the ResourceBundle, for the given locale.
 void setBaseNames(List baseNames)
           
 void setDefaultParentView(String defaultParentView)
          Set the default parent for views defined in the ResourceBundle.
 
Methods inherited from class org.springframework.web.servlet.view.ResourceBundleViewResolver
getBundle, getBundleClassLoader, getOrder, loadView, setBasename, setBasenames, setBundleClassLoader, setOrder
 
Methods inherited from class org.springframework.web.servlet.view.AbstractCachingViewResolver
createView, getCacheKey, isCache, removeFromCache, resolveViewName, setCache
 
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, isContextRequired
 
Methods inherited from class org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final transient org.apache.commons.logging.Log logger
Constructor Detail

AddableResourceBundleViewResolver

public AddableResourceBundleViewResolver()
Method Detail

getBaseNames

public List getBaseNames()

setBaseNames

public void setBaseNames(List baseNames)

setDefaultParentView

public void setDefaultParentView(String defaultParentView)
Set the default parent for views defined in the ResourceBundle. This avoids repeated "yyy1.parent=xxx", "yyy2.parent=xxx" definitions in the bundle, especially if all defined views share the same parent.

The parent will typically define the view class and common attributes. Concrete views might simply consist of an URL definition then: a la "yyy1.url=/my.jsp", "yyy2.url=/your.jsp".

View definitions that define their own parent or carry their own class can still override this. Strictly speaking, the rule that a default parent setting does not apply to a bean definition that carries a class is there for backwards compatiblity reasons. It still matches the typical use case.

Parameters:
defaultParentView - the default parent view

initFactory

protected BeanFactory initFactory(Locale locale)
                           throws MissingResourceException,
                                  BeansException
Initialize the BeanFactory from the ResourceBundle, for the given locale. Synchronized because of access by parallel threads.

Throws:
MissingResourceException
BeansException

destroy

public void destroy()
             throws BeansException
Throws:
BeansException