类 VelocityLayoutView
- java.lang.Object
- org.springframework.context.support.ApplicationObjectSupport
- org.springframework.web.context.support.WebApplicationObjectSupport
- org.springframework.web.servlet.view.AbstractView
- org.springframework.web.servlet.view.AbstractUrlBasedView
- org.springframework.web.servlet.view.AbstractTemplateView
- org.springframework.web.servlet.view.velocity.VelocityView
- org.springframework.web.servlet.view.velocity.VelocityToolboxView
- org.springframework.web.servlet.view.velocity.VelocityLayoutView
@Deprecated public class VelocityLayoutView extends VelocityToolboxView
已过时。as of Spring 4.3, in favor of FreeMarkerVelocityLayoutView emulates the functionality offered by Velocity's VelocityLayoutServlet to ease page composition from different templates.The
url
property should be set to the content template for the view, and the layout template location should be specified aslayoutUrl
property. A view can override the configured layout template location by setting the appropriate key (the default is "layout") in the content template.When the view is rendered, the VelocityContext is first merged with the content template (specified by the
url
property) and then merged with the layout template to produce the final output.The layout template can include the screen content through a VelocityContext variable (the default is "screen_content"). At runtime, this variable will contain the rendered content template.
- 从以下版本开始:
- 1.2
- 作者:
- Darren Davison, Juergen Hoeller
- 另请参阅:
setLayoutUrl(java.lang.String)
,setLayoutKey(java.lang.String)
,setScreenContentKey(java.lang.String)
字段概要
字段 修饰符和类型 字段 说明 static String
DEFAULT_LAYOUT_KEY
已过时。The defaultlayout key
.static String
DEFAULT_LAYOUT_URL
已过时。The defaultlayout url
.static String
DEFAULT_SCREEN_CONTENT_KEY
已过时。The defaultscreen content key
.从类继承的字段 org.springframework.web.servlet.view.AbstractTemplateView
SPRING_MACRO_REQUEST_CONTEXT_ATTRIBUTE
从类继承的字段 org.springframework.web.servlet.view.AbstractView
DEFAULT_CONTENT_TYPE
从类继承的字段 org.springframework.context.support.ApplicationObjectSupport
logger
从接口继承的字段 org.springframework.web.servlet.View
PATH_VARIABLES, RESPONSE_STATUS_ATTRIBUTE, SELECTED_CONTENT_TYPE
构造器概要
构造器 构造器 说明 VelocityLayoutView()
已过时。
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 boolean
checkResource(Locale locale)
已过时。OverridesVelocityView.checkTemplate()
to additionally check that both the layout template and the screen content template can be loaded.protected void
doRender(org.apache.velocity.context.Context context, HttpServletResponse response)
已过时。Overrides the normal rendering process in order to pre-process the Context, merging it with the screen template into a single value (identified by the value of screenContentKey).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.VelocityToolboxView
createVelocityContext, getToolboxConfigLocation, initTool, setToolboxConfigLocation
从类继承的方法 org.springframework.web.servlet.view.velocity.VelocityView
autodetectVelocityEngine, createVelocityContext, exposeHelpers, exposeHelpers, exposeHelpers, exposeToolAttributes, getEncoding, getTemplate, getTemplate, getVelocityEngine, initApplicationContext, isCacheTemplate, mergeTemplate, renderMergedTemplateModel, setCacheTemplate, setDateToolAttribute, setEncoding, setNumberToolAttribute, setToolAttributes, setVelocityEngine
从类继承的方法 org.springframework.web.servlet.view.AbstractTemplateView
applyContentType, renderMergedOutputModel, setAllowRequestOverride, setAllowSessionOverride, setExposeRequestAttributes, setExposeSessionAttributes, setExposeSpringMacroHelpers
从类继承的方法 org.springframework.web.servlet.view.AbstractUrlBasedView
afterPropertiesSet, getUrl, isUrlRequired, setUrl, toString
从类继承的方法 org.springframework.web.servlet.view.AbstractView
addStaticAttribute, createMergedOutputModel, createRequestContext, createTemporaryOutputStream, exposeModelAsRequestAttributes, generatesDownloadContent, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getRequestToExpose, getStaticAttributes, isExposePathVariables, prepareResponse, render, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setExposeContextBeansAsAttributes, setExposedContextBeanNames, setExposePathVariables, setRequestContextAttribute, setResponseContentType, writeToResponse
从类继承的方法 org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
从类继承的方法 org.springframework.context.support.ApplicationObjectSupport
getApplicationContext, getMessageSourceAccessor, requiredContextClass, setApplicationContext
字段详细资料
DEFAULT_LAYOUT_URL
public static final String DEFAULT_LAYOUT_URL
已过时。The defaultlayout url
.- 另请参阅:
- 常量字段值