org.thymeleaf.extras.tiles2.spring4.web.view
public class AjaxThymeleafTilesView extends ThymeleafTilesView implements org.thymeleaf.spring4.view.AjaxEnabledView
Subclass of ThymeleafTilesView adding compatibility with AJAX events in
Spring JavaScript (part of Spring WebFlow). This allows this View implementation
to be able to return only fragments of the page.
These rendering of fragments is used, for example, in Spring WebFlow's <render> instructions (though not only).
This view searches for a comma-separated list of fragment names in a request parameter called fragments.
When using Tiles, fragments are considered to be Tiles attribute names (from a Tiles definition).
| Constructor and Description |
|---|
AjaxThymeleafTilesView() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addRuntimeAttributes(org.apache.tiles.impl.BasicTilesContainer container,
Map<String,org.apache.tiles.Attribute> resultMap,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Iterate over dynamically added Tiles attributes (see "Runtime Composition" in the Tiles documentation) and add
them to the output Map passed as input.
|
protected void |
flattenAttributeMap(org.apache.tiles.impl.BasicTilesContainer container,
org.apache.tiles.context.TilesRequestContext requestContext,
Map<String,org.apache.tiles.Attribute> resultMap,
org.apache.tiles.Definition compositeDefinition,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Iterate over all attributes in the given Tiles definition.
|
org.springframework.js.ajax.AjaxHandler |
getAjaxHandler() |
protected String[] |
getRenderFragments(Map model,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
render(Map<String,?> model,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
setAjaxHandler(org.springframework.js.ajax.AjaxHandler ajaxHandler) |
buildContextAndPrepareResponse, exposeModelAsRequestAttributes, getLocale, getTemplateEngine, isContentTypeSet, setLocale, setTemplateEngineaddRequestContextAsVariable, addStaticVariable, getBeanName, getCharacterEncoding, getContentType, getStaticVariables, getTemplateName, setBeanName, setCharacterEncoding, setContentType, setStaticVariables, setTemplateNamegetServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContextgetApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContextpublic org.springframework.js.ajax.AjaxHandler getAjaxHandler()
getAjaxHandler in interface org.thymeleaf.spring4.view.AjaxEnabledViewpublic void setAjaxHandler(org.springframework.js.ajax.AjaxHandler ajaxHandler)
setAjaxHandler in interface org.thymeleaf.spring4.view.AjaxEnabledViewpublic void render(Map<String,?> model, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
render in interface org.springframework.web.servlet.Viewrender in class ThymeleafTilesViewExceptionprotected String[] getRenderFragments(Map model, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
protected void flattenAttributeMap(org.apache.tiles.impl.BasicTilesContainer container,
org.apache.tiles.context.TilesRequestContext requestContext,
Map<String,org.apache.tiles.Attribute> resultMap,
org.apache.tiles.Definition compositeDefinition,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Iterate over all attributes in the given Tiles definition. Every attribute in the defintion is added to the map, and attributes which are definitions themselves will be recursively processed.
container - the TilesContainerrequestContext - the TilesRequestContextresultMap - the output Map where attributes of interest are added to.compositeDefinition - the definition to search for attributes of interest.request - the servlet requestresponse - the servlet responseprotected void addRuntimeAttributes(org.apache.tiles.impl.BasicTilesContainer container,
Map<String,org.apache.tiles.Attribute> resultMap,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Iterate over dynamically added Tiles attributes (see "Runtime Composition" in the Tiles documentation) and add them to the output Map passed as input.
container - the Tiles containerresultMap - the output Map where attributes of interest are added to.request - the Servlet requestresponse - the Servlet responseCopyright © 2014 The THYMELEAF team. All rights reserved.