public class TilesViewResolver extends UrlBasedViewResolver
UrlBasedViewResolver that supports
TilesView (i.e. Tiles definitions) and custom subclasses of it.AbstractCachingViewResolver.CacheFilterFORWARD_URL_PREFIX, REDIRECT_URL_PREFIXDEFAULT_CACHE_LIMITloggerHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
TilesViewResolver()
This resolver requires
TilesView. |
| Modifier and Type | Method and Description |
|---|---|
protected TilesView |
buildView(String viewName)
Creates a new View instance of the specified view class and configures it.
|
protected AbstractUrlBasedView |
instantiateView()
Instantiate the specified view class.
|
protected Class<?> |
requiredViewClass()
Return the required type of view for this resolver.
|
void |
setAlwaysInclude(Boolean alwaysInclude)
Specify whether to always include the view rather than forward to it.
|
void |
setRenderer(Renderer renderer)
Set the
Renderer to use. |
applyLifecycleMethods, canHandle, createView, getAttributesMap, getCacheKey, getContentType, getExposeContextBeansAsAttributes, getExposedContextBeanNames, getExposePathVariables, getOrder, getPrefix, getRedirectHosts, getRequestContextAttribute, getSuffix, getViewClass, getViewNames, initApplicationContext, isRedirectContextRelative, isRedirectHttp10Compatible, loadView, setAttributes, setAttributesMap, setContentType, setExposeContextBeansAsAttributes, setExposedContextBeanNames, setExposePathVariables, setOrder, setPrefix, setRedirectContextRelative, setRedirectHosts, setRedirectHttp10Compatible, setRequestContextAttribute, setSuffix, setViewClass, setViewNamesclearCache, getCacheFilter, getCacheLimit, isCache, isCacheUnresolved, removeFromCache, resolveViewName, setCache, setCacheFilter, setCacheLimit, setCacheUnresolvedgetServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContextgetApplicationContext, getMessageSourceAccessor, obtainApplicationContext, requiredContextClass, setApplicationContextpublic TilesViewResolver()
TilesView.public void setRenderer(Renderer renderer)
Renderer to use. If not specified, a default
DefinitionRenderer will be used.TilesView.setRenderer(Renderer)public void setAlwaysInclude(Boolean alwaysInclude)
Default is "false". Switch this flag on to enforce the use of a Servlet include, even if a forward would be possible.
TilesView.setAlwaysInclude(boolean)protected Class<?> requiredViewClass()
UrlBasedViewResolverAbstractUrlBasedView.requiredViewClass in class UrlBasedViewResolverUrlBasedViewResolver.instantiateView(),
AbstractUrlBasedViewprotected AbstractUrlBasedView instantiateView()
UrlBasedViewResolverThe default implementation uses reflection to instantiate the class.
instantiateView in class UrlBasedViewResolverUrlBasedViewResolver.setViewClass(java.lang.Class<?>)protected TilesView buildView(String viewName) throws Exception
UrlBasedViewResolverSpring lifecycle methods as defined by the bean container do not have to
be called here; those will be applied by the loadView method
after this method returns.
Subclasses will typically call super.buildView(viewName)
first, before setting further properties themselves. loadView
will then apply Spring lifecycle methods at the end of this process.
buildView in class UrlBasedViewResolverviewName - the name of the view to buildException - if the view couldn't be resolvedUrlBasedViewResolver.loadView(String, java.util.Locale)