public class ThymeleafView extends AbstractThymeleafView
Base implementation of the Spring MVC View
interface.
Views represent a template being executed, after being resolved (and
instantiated) by a ViewResolver
.
This is the default view implementation resolved by ThymeleafViewResolver
.
DEFAULT_CONTENT_TYPE
Modifier | Constructor and Description |
---|---|
protected |
ThymeleafView()
Creates a new instance of ThymeleafView.
|
protected |
ThymeleafView(String templateName)
Creates a new instance of ThymeleafView, specifying the
template name.
|
Modifier and Type | Method and Description |
---|---|
String |
getMarkupSelector()
Returns the markup selector defining the part of the template that should
be processed.
|
void |
render(Map<String,?> model,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
renderFragment(Set<String> markupSelectorsToRender,
Map<String,?> model,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
setMarkupSelector(String markupSelector)
Sets the markup selector defining the part of the template that should
be processed.
|
addRequestContextAsVariable, addStaticVariable, getBeanName, getCharacterEncoding, getContentType, getLocale, getStaticVariables, getTemplateEngine, getTemplateName, isContentTypeSet, setBeanName, setCharacterEncoding, setContentType, setLocale, setStaticVariables, setTemplateEngine, setTemplateName
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
protected ThymeleafView()
Creates a new instance of ThymeleafView.
protected ThymeleafView(String templateName)
Creates a new instance of ThymeleafView, specifying the template name.
templateName
- the template name.public String getMarkupSelector()
Returns the markup selector defining the part of the template that should be processed.
This selector will be used for selecting the section of the template that should be processed, discarding the rest of the template. If null, the whole template will be processed.
Subclasses of ThymeleafView
might choose not to honor this parameter,
disallowing the processing of template fragments.
public void setMarkupSelector(String markupSelector)
Sets the markup selector defining the part of the template that should be processed.
This selector will be used for selecting the section of the template that should be processed, discarding the rest of the template. If null, the whole template will be processed.
Subclasses of ThymeleafView
might choose not to honor this parameter,
disallowing the processing of template fragments.
markupSelector
- the markup selector to be set.public void render(Map<String,?> model, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
Exception
Copyright © 2016 The THYMELEAF team. All rights reserved.