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, setSynchronizeOnSessionapplyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isAlwaysMustRevalidate, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, preventCaching, setAlwaysMustRevalidate, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeadergetServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContextprotected 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.AbstractControllerExceptionprotected 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.