public class MustacheView
extends org.springframework.web.servlet.view.AbstractTemplateView
View
using the Mustache template engine.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, 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
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 org.springframework.web.servlet.view.AbstractUrlBasedView
Exception
protected void renderMergedTemplateModel(Map<String,Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception
renderMergedTemplateModel
in class org.springframework.web.servlet.view.AbstractTemplateView
Exception
Copyright © 2017 Pivotal Software, Inc.. All rights reserved.