类 TilesView
@Deprecated public class TilesView extends AbstractUrlBasedView
已过时。as of Spring 4.2, in favor of Tiles 3View
implementation that retrieves a Tiles definition. The "url" property is interpreted as name of a Tiles definition.This class builds on Tiles, which requires JSP 2.0. JSTL support is integrated out of the box due to JSTL's inclusion in JSP 2.0. Note: Spring 4.0 requires Tiles 2.2.2.
Depends on a TilesContainer which must be available in the ServletContext. This container is typically set up via a
TilesConfigurer
bean definition in the application context.NOTE: Tiles 2 support is deprecated in favor of Tiles 3 and will be removed as of Spring Framework 5.0..
- 从以下版本开始:
- 2.5
- 作者:
- Juergen Hoeller, Sebastien Deleuze
- 另请参阅:
AbstractUrlBasedView.setUrl(java.lang.String)
,TilesConfigurer
字段概要
从类继承的字段 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
构造器概要
构造器 构造器 说明 TilesView()
已过时。
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 boolean
checkResource(Locale locale)
已过时。Check whether the underlying resource that the configured URL points to actually exists.protected void
renderMergedOutputModel(Map<String,Object> model, HttpServletRequest request, HttpServletResponse response)
已过时。Subclasses must implement this method to actually render the view.void
setAlwaysInclude(boolean alwaysInclude)
已过时。Specify whether to always include the view rather than forward to it.从类继承的方法 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, initApplicationContext, requiredContextClass, setApplicationContext
构造器详细资料
TilesView
public TilesView()
已过时。
方法详细资料
setAlwaysInclude
public void setAlwaysInclude(boolean alwaysInclude)
已过时。Specify whether to always include the view rather than forward to it.Default is "false". Switch this flag on to enforce the use of a Servlet include, even if a forward would be possible.
- 从以下版本开始:
- 4.1.2
- 另请参阅:
TilesViewResolver.setAlwaysInclude(java.lang.Boolean)
checkResource
public boolean checkResource(Locale locale) throws Exception
已过时。从类复制的说明:AbstractUrlBasedView
Check whether the underlying resource that the configured URL points to actually exists.- 覆盖:
checkResource
在类中AbstractUrlBasedView
- 参数:
locale
- the desired Locale that we're looking for- 返回:
true
if the resource exists (or is assumed to exist);false
if we know that it does not exist- 抛出:
Exception
- if the resource exists but is invalid (e.g. could not be parsed)
renderMergedOutputModel
protected void renderMergedOutputModel(Map<String,Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception
已过时。从类复制的说明:AbstractView
Subclasses must implement this method to actually render the view.The first step will be preparing the request: In the JSP case, this would mean setting model objects as request attributes. The second step will be the actual rendering of the view, for example including the JSP via a RequestDispatcher.
- 指定者:
renderMergedOutputModel
在类中AbstractView
- 参数:
model
- combined output Map (nevernull
), with dynamic values taking precedence over static attributesrequest
- current HTTP requestresponse
- current HTTP response- 抛出:
Exception
- if rendering failed