类 VelocityLayoutViewResolver
- java.lang.Object
- org.springframework.context.support.ApplicationObjectSupport
- org.springframework.web.context.support.WebApplicationObjectSupport
- org.springframework.web.servlet.view.AbstractCachingViewResolver
- org.springframework.web.servlet.view.UrlBasedViewResolver
- org.springframework.web.servlet.view.AbstractTemplateViewResolver
- org.springframework.web.servlet.view.velocity.VelocityViewResolver
- org.springframework.web.servlet.view.velocity.VelocityLayoutViewResolver
- 所有已实现的接口:
Aware
,ApplicationContextAware
,Ordered
,ServletContextAware
,ViewResolver
@Deprecated public class VelocityLayoutViewResolver extends VelocityViewResolver
已过时。as of Spring 4.3, in favor of FreeMarkerConvenience subclass of VelocityViewResolver, adding support for VelocityLayoutView and its properties.See VelocityViewResolver's javadoc for general usage info.
- 从以下版本开始:
- 1.2.7
- 作者:
- Juergen Hoeller
- 另请参阅:
VelocityViewResolver
,VelocityLayoutView
,setLayoutUrl(java.lang.String)
,setLayoutKey(java.lang.String)
,setScreenContentKey(java.lang.String)
字段概要
从类继承的字段 org.springframework.web.servlet.view.UrlBasedViewResolver
FORWARD_URL_PREFIX, REDIRECT_URL_PREFIX
从类继承的字段 org.springframework.web.servlet.view.AbstractCachingViewResolver
DEFAULT_CACHE_LIMIT
从类继承的字段 org.springframework.context.support.ApplicationObjectSupport
logger
从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
构造器概要
构造器 构造器 说明 VelocityLayoutViewResolver()
已过时。
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 protected AbstractUrlBasedView
buildView(String viewName)
已过时。Creates a new View instance of the specified view class and configures it.protected Class<?>
requiredViewClass()
已过时。Requires VelocityLayoutView.void
setLayoutKey(String layoutKey)
已过时。Set the context key used to specify an alternate layout to be used instead of the default layout.void
setLayoutUrl(String layoutUrl)
已过时。Set the layout template to use.void
setScreenContentKey(String screenContentKey)
已过时。Set the name of the context key that will hold the content of the screen within the layout template.从类继承的方法 org.springframework.web.servlet.view.velocity.VelocityViewResolver
initApplicationContext, setDateToolAttribute, setNumberToolAttribute, setToolboxConfigLocation
从类继承的方法 org.springframework.web.servlet.view.AbstractTemplateViewResolver
setAllowRequestOverride, setAllowSessionOverride, setExposeRequestAttributes, setExposeSessionAttributes, setExposeSpringMacroHelpers
从类继承的方法 org.springframework.web.servlet.view.UrlBasedViewResolver
canHandle, createView, getAttributesMap, getCacheKey, getContentType, getExposeContextBeansAsAttributes, getExposedContextBeanNames, getExposePathVariables, getOrder, getPrefix, getRedirectHosts, getRequestContextAttribute, getSuffix, getViewClass, getViewNames, isRedirectContextRelative, isRedirectHttp10Compatible, loadView, setAttributes, setAttributesMap, setContentType, setExposeContextBeansAsAttributes, setExposedContextBeanNames, setExposePathVariables, setOrder, setPrefix, setRedirectContextRelative, setRedirectHosts, setRedirectHttp10Compatible, setRequestContextAttribute, setSuffix, setViewClass, setViewNames
从类继承的方法 org.springframework.web.servlet.view.AbstractCachingViewResolver
clearCache, getCacheLimit, isCache, isCacheUnresolved, removeFromCache, resolveViewName, setCache, setCacheLimit, setCacheUnresolved
从类继承的方法 org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
从类继承的方法 org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext
构造器详细资料
VelocityLayoutViewResolver
public VelocityLayoutViewResolver()
已过时。
方法详细资料
requiredViewClass
protected Class<?> requiredViewClass()
已过时。Requires VelocityLayoutView.
setLayoutUrl
public void setLayoutUrl(String layoutUrl)
已过时。Set the layout template to use. Default is "layout.vm".- 参数:
layoutUrl
- the template location (relative to the template root directory)- 另请参阅:
VelocityLayoutView.setLayoutUrl(java.lang.String)
setLayoutKey
public void setLayoutKey(String layoutKey)
已过时。Set the context key used to specify an alternate layout to be used instead of the default layout. Screen content templates can override the layout template that they wish to be wrapped with by setting this value in the template, for example:#set($layout = "MyLayout.vm" )
The default key is "layout", as illustrated above.
- 参数:
layoutKey
- the name of the key you wish to use in your screen content templates to override the layout template- 另请参阅:
VelocityLayoutView.setLayoutKey(java.lang.String)
setScreenContentKey
public void setScreenContentKey(String screenContentKey)
已过时。Set the name of the context key that will hold the content of the screen within the layout template. This key must be present in the layout template for the current screen to be rendered.Default is "screen_content": accessed in VTL as
$screen_content
.- 参数:
screenContentKey
- the name of the screen content key to use- 另请参阅:
VelocityLayoutView.setScreenContentKey(java.lang.String)
buildView
protected AbstractUrlBasedView buildView(String viewName) throws Exception
已过时。从类复制的说明:UrlBasedViewResolver
Creates a new View instance of the specified view class and configures it. Does not perform any lookup for pre-defined View instances.Spring 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
在类中VelocityViewResolver
- 参数:
viewName
- the name of the view to build- 返回:
- the View instance
- 抛出:
Exception
- if the view couldn't be resolved- 另请参阅:
UrlBasedViewResolver.loadView(String, java.util.Locale)