public class VelocityViewController
extends org.springframework.web.servlet.mvc.AbstractController
Constructor and Description |
---|
VelocityViewController() |
Modifier and Type | Method and Description |
---|---|
protected String |
getContentTemplate(Map<String,Object> model)
Returns the template to be used for rendering the view
|
protected String |
getPage() |
protected String |
getSelectedMenu(Map<String,Object> model)
Returns the identifier to be exported as selected menu.
|
String |
getView() |
protected org.springframework.web.servlet.ModelAndView |
handleRequestInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected boolean |
prepareModel(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
Map<String,Object> model)
Prepares the model by adding the key value pairs.
|
void |
setContentTemplate(String contentTemplate)
Set the template to be rendered as view.
|
void |
setCssCategories(String[] categories)
Set the names of the categories whose CSS resources should be included when rendering the
page
|
void |
setJavaScriptCategories(String[] categories)
Set the names of the categories whose JavaScript resources should be included when rendering
the page
|
void |
setPage(String page) |
void |
setSelectedMenu(String menuIdentifier)
Set the identifier to be exported as selected menu.
|
void |
setTemplateManager(TemplateManager templateManager)
Set the template manager to use for resolving template names into templates
|
void |
setView(String view) |
handleRequest, isSynchronizeOnSession, setSynchronizeOnSession
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isAlwaysMustRevalidate, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, preventCaching, setAlwaysMustRevalidate, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
protected String getContentTemplate(Map<String,Object> model)
model
- the current model of the model and viewsetContentTemplate(String)
protected String getPage()
protected String getSelectedMenu(Map<String,Object> model)
model
- the current model of the model and viewsetSelectedMenu(String)
public String getView()
protected org.springframework.web.servlet.ModelAndView handleRequestInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
handleRequestInternal
in class org.springframework.web.servlet.mvc.AbstractController
Exception
protected boolean prepareModel(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Map<String,Object> model) throws Exception
request
- the requestresponse
- the responsemodel
- the model to prepareException
- Exception.public void setContentTemplate(String contentTemplate)
contentTemplate
- the content template to setpublic void setCssCategories(String[] categories)
categories
- the names of the categories in the order the resources of the category should be
renderedpublic void setJavaScriptCategories(String[] categories)
categories
- the names of the categories in the order the resources of the category should be
renderedpublic void setPage(String page)
page
- the page to setpublic void setSelectedMenu(String menuIdentifier)
menuIdentifier
- the menu identifier to setpublic void setTemplateManager(TemplateManager templateManager)
templateManager
- the managerpublic void setView(String view)
view
- the view to setCopyright © 2019 Communote team. All rights reserved.