public class MustacheView extends AbstractTemplateView
View
using the Mustache template engine.SPRING_MACRO_REQUEST_CONTEXT_ATTRIBUTE
DEFAULT_CONTENT_TYPE
logger
PATH_VARIABLES, RESPONSE_STATUS_ATTRIBUTE, SELECTED_CONTENT_TYPE
Constructor and Description |
---|
MustacheView() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkResource(Locale locale) |
protected void |
renderMergedTemplateModel(Map<String,Object> model,
HttpServletRequest request,
HttpServletResponse response) |
void |
setCharset(String charset)
Set the charset used for reading Mustache template files.
|
void |
setCompiler(com.samskivert.mustache.Mustache.Compiler compiler)
Set the Mustache compiler to be used by this view.
|
applyContentType, renderMergedOutputModel, setAllowRequestOverride, setAllowSessionOverride, setExposeRequestAttributes, setExposeSessionAttributes, setExposeSpringMacroHelpers
afterPropertiesSet, getUrl, isUrlRequired, setUrl, toString
addStaticAttribute, createMergedOutputModel, createRequestContext, createTemporaryOutputStream, exposeModelAsRequestAttributes, formatViewName, generatesDownloadContent, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getRequestToExpose, getStaticAttributes, isExposePathVariables, prepareResponse, render, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setExposeContextBeansAsAttributes, setExposedContextBeanNames, setExposePathVariables, setRequestContextAttribute, setResponseContentType, writeToResponse
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
getApplicationContext, getMessageSourceAccessor, initApplicationContext, obtainApplicationContext, requiredContextClass, setApplicationContext
public void setCompiler(com.samskivert.mustache.Mustache.Compiler compiler)
Typically this property is not set directly. Instead a single Mustache.Compiler
is
expected in the Spring application context which is used to compile Mustache
templates.
compiler
- the Mustache compilerpublic void setCharset(String charset)
charset
- the charset to use for reading template filespublic boolean checkResource(Locale locale) throws Exception
checkResource
in class AbstractUrlBasedView
Exception
protected void renderMergedTemplateModel(Map<String,Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception
renderMergedTemplateModel
in class AbstractTemplateView
Exception
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.