public class PageTypeViewResolver extends AbstractWebFrameworkViewResolver
useNullSentinelFORWARD_URL_PREFIX, REDIRECT_URL_PREFIX| Constructor and Description |
|---|
PageTypeViewResolver() |
| Modifier and Type | Method and Description |
|---|---|
protected org.springframework.web.servlet.view.AbstractUrlBasedView |
buildView(String viewName)
Constructs the view for a page type request.
|
protected boolean |
canHandle(String viewName,
Locale locale)
Determines whether or not this view resolver can be used for the supplied
view name.
|
protected Object |
getCacheKey(String viewName,
Locale locale)
Overrides the default implementation from
AbstractCachingViewResolver to ensure that page type view are cached
with respect to the requested view. |
addPrefix, addReqParm, generateUriTemplateListIndexFromConfig, getBeanName, getModelObjectService, getServiceRegistry, getTemplatesContainer, getUriTemplateListIndex, getUrlHelperFactory, getWebframeworkConfigElement, getWebFrameworkRenderService, getWebFrameworkResourceService, getWebFrameworkServiceRegistry, lookupPage, matchUriTemplate, processView, setBeanName, setModelObjectService, setServiceRegistry, setTemplatesContainer, setUriTemplateIndex, setUrlHelperFactory, setWebframeworkConfigElement, setWebFrameworkRenderService, setWebFrameworkResourceServiceclearCache, removeFromCache, resolveViewNamecreateView, getAttributesMap, getContentType, getExposePathVariables, getOrder, getPrefix, getRequestContextAttribute, getSuffix, getViewClass, getViewNames, initApplicationContext, isRedirectContextRelative, isRedirectHttp10Compatible, loadView, requiredViewClass, setAttributes, setAttributesMap, setContentType, setExposePathVariables, setOrder, setPrefix, setRedirectContextRelative, setRedirectHttp10Compatible, setRequestContextAttribute, setSuffix, setViewClass, setViewNamesgetCacheLimit, isCache, isCacheUnresolved, setCache, setCacheLimit, setCacheUnresolvedgetServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContextprotected boolean canHandle(String viewName, Locale locale)
prefixes property.canHandle in class AbstractWebFrameworkViewResolverviewName - The name of the view to check for page type requestslocale - The locale of the request.
prefixes property.protected Object getCacheKey(String viewName, Locale locale)
Overrides the default implementation from AbstractCachingViewResolver to ensure that page type view are cached
with respect to the requested view. Default caching only takes the basic URL suffix into consideration and does not look at any
request parameters that have been provided. This means that if a user attempts to request a page type with a different theme from
the cached view then they would not see the page type they've requested. By setting a cache key that includes the requested theme
as well as the view name it is possible to switch between themes in a single session.
getCacheKey in class org.springframework.web.servlet.view.UrlBasedViewResolverprotected org.springframework.web.servlet.view.AbstractUrlBasedView buildView(String viewName) throws Exception
buildView in class org.springframework.web.servlet.view.UrlBasedViewResolverviewName - The name of the view to build.AbstractUrlBasedViewExceptionCopyright © 2005–2016 Alfresco Software. All rights reserved.