public class ThymeleafView extends AbstractThymeleafView
Base implementation of the Spring WebMVC 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
Constructor and Description |
---|
ThymeleafView()
Creates a new instance of ThymeleafView.
|
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, getForceContentType, getLocale, getStaticVariables, getTemplateEngine, getTemplateName, isContentTypeSet, isForceContentTypeSet, setBeanName, setCharacterEncoding, setContentType, setForceContentType, setLocale, setStaticVariables, setTemplateEngine, setTemplateName
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
public ThymeleafView()
Creates a new instance of ThymeleafView.
public 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 © 2017 The THYMELEAF team. All rights reserved.