类 AbstractTemplateViewResolver
java.lang.Object
cn.taketoday.context.support.ApplicationObjectSupport
cn.taketoday.web.view.AbstractCachingViewResolver
cn.taketoday.web.view.UrlBasedViewResolver
cn.taketoday.web.view.AbstractTemplateViewResolver
- 所有已实现的接口:
cn.taketoday.beans.factory.Aware,cn.taketoday.context.ApplicationContextAware,cn.taketoday.core.Ordered,ViewResolver
Abstract base class for template view resolvers, in particular for FreeMarker views.
Provides a convenient way to specify AbstractTemplateView's exposure
flags for request attributes, session attributes, and Framework's macro helpers.
- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller
- 另请参阅:
-
嵌套类概要
从类继承的嵌套类/接口 cn.taketoday.web.view.AbstractCachingViewResolver
AbstractCachingViewResolver.CacheFilter -
字段概要
字段修饰符和类型字段说明private booleanprivate booleanprivate booleanprivate boolean从类继承的字段 cn.taketoday.web.view.UrlBasedViewResolver
FORWARD_URL_PREFIX, REDIRECT_URL_PREFIX从类继承的字段 cn.taketoday.web.view.AbstractCachingViewResolver
DEFAULT_CACHE_FILTER, DEFAULT_CACHE_LIMIT, UNRESOLVED_VIEW从类继承的字段 cn.taketoday.context.support.ApplicationObjectSupport
applicationContext, log, messageSourceAccessor从接口继承的字段 cn.taketoday.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected AbstractUrlBasedViewCreates a new View instance of the specified view class and configures it.protected Class<?>Return the required type of view for this resolver.voidsetAllowRequestOverride(boolean allowRequestOverride) Set whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name.voidsetAllowSessionOverride(boolean allowSessionOverride) Set whether HttpSession attributes are allowed to override (hide) controller generated model attributes of the same name.voidsetExposeRequestAttributes(boolean exposeRequestAttributes) Set whether all request attributes should be added to the model prior to merging with the template.voidsetExposeSessionAttributes(boolean exposeSessionAttributes) Set whether all HttpSession attributes should be added to the model prior to merging with the template.从类继承的方法 cn.taketoday.web.view.UrlBasedViewResolver
applyLifecycleMethods, canHandle, createView, getAttributesMap, getCacheKey, getContentType, getExposeContextBeansAsAttributes, getExposedContextBeanNames, getExposePathVariables, getOrder, getPrefix, getRequestContextAttribute, getSuffix, getViewClass, getViewNames, initApplicationContext, instantiateView, isRedirectContextRelative, isRedirectHttp10Compatible, loadView, setAttributes, setAttributesMap, setContentType, setExposeContextBeansAsAttributes, setExposedContextBeanNames, setExposeOutputRedirectModel, setExposePathVariables, setOrder, setPrefix, setRedirectContextRelative, setRedirectHttp10Compatible, setRequestContextAttribute, setSuffix, setViewClass, setViewNames从类继承的方法 cn.taketoday.web.view.AbstractCachingViewResolver
clearCache, getCacheFilter, getCacheLimit, isCache, isCacheUnresolved, removeFromCache, resolveViewName, setCache, setCacheFilter, setCacheLimit, setCacheUnresolved从类继承的方法 cn.taketoday.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, initApplicationContext, isContextRequired, obtainApplicationContext, requiredContextClass, setApplicationContext, unwrapContext, unwrapFactory
-
字段详细资料
-
exposeRequestAttributes
private boolean exposeRequestAttributes -
allowRequestOverride
private boolean allowRequestOverride -
exposeSessionAttributes
private boolean exposeSessionAttributes -
allowSessionOverride
private boolean allowSessionOverride
-
-
构造器详细资料
-
AbstractTemplateViewResolver
public AbstractTemplateViewResolver()
-
-
方法详细资料
-
requiredViewClass
从类复制的说明:UrlBasedViewResolverReturn the required type of view for this resolver. This implementation returnsAbstractUrlBasedView. -
setExposeRequestAttributes
public void setExposeRequestAttributes(boolean exposeRequestAttributes) Set whether all request attributes should be added to the model prior to merging with the template. Default is "false". -
setAllowRequestOverride
public void setAllowRequestOverride(boolean allowRequestOverride) Set whether HttpServletRequest attributes are allowed to override (hide) controller generated model attributes of the same name. Default is "false", which causes an exception to be thrown if request attributes of the same name as model attributes are found. -
setExposeSessionAttributes
public void setExposeSessionAttributes(boolean exposeSessionAttributes) Set whether all HttpSession attributes should be added to the model prior to merging with the template. Default is "false". -
setAllowSessionOverride
public void setAllowSessionOverride(boolean allowSessionOverride) Set whether HttpSession attributes are allowed to override (hide) controller generated model attributes of the same name. Default is "false", which causes an exception to be thrown if session attributes of the same name as model attributes are found. -
buildView
从类复制的说明:UrlBasedViewResolverCreates a new View instance of the specified view class and configures it. Does not perform any lookup for pre-defined View instances.Framework lifecycle methods as defined by the bean container do not have to be called here; those will be applied by the
loadViewmethod after this method returns.Subclasses will typically call
super.buildView(viewName)first, before setting further properties themselves.loadViewwill then apply Framework lifecycle methods at the end of this process.- 覆盖:
buildView在类中UrlBasedViewResolver- 参数:
viewName- the name of the view to build- 返回:
- the View instance
- 抛出:
Exception- if the view couldn't be resolved- 另请参阅:
-