info.magnolia.module.admininterface
Class TemplatedMVCHandler
java.lang.Object
info.magnolia.cms.servlets.MVCServletHandlerImpl
info.magnolia.cms.servlets.CommandBasedMVCServletHandler
info.magnolia.module.admininterface.PageMVCHandler
info.magnolia.module.admininterface.TemplatedMVCHandler
- All Implemented Interfaces:
- info.magnolia.cms.servlets.MVCServletHandler
- Direct Known Subclasses:
- AbstractList, AdminCentralPage, ConfigurationPage, DevelopmentUtilsPage, ExportPage, JCRUtilsPage, LogViewerPage, QuickstartPage, UsersPage
public class TemplatedMVCHandler
- extends PageMVCHandler
A default page (handler) using a freemarker template to render. The default template name is following the class name.
You can overwrite the getTemplateName() method which can return a template per view.
- Version:
- $Revision: 37685 $ ($Author: dlipp $)
- Author:
- Philipp Bracher
Fields inherited from class info.magnolia.cms.servlets.MVCServletHandlerImpl |
exception, request, response, VIEW_ERROR, VIEW_SUCCESS |
Fields inherited from interface info.magnolia.cms.servlets.MVCServletHandler |
VIEW_NOTHING |
Constructor Summary |
TemplatedMVCHandler(String name,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
Methods inherited from class info.magnolia.cms.servlets.CommandBasedMVCServletHandler |
execute, findCommand, getCatalogueName, getCommandContext, getViewNameAfterExecution, setCatalogueName |
Methods inherited from class info.magnolia.cms.servlets.MVCServletHandlerImpl |
getCommand, getException, getExceptionStackTrace, getName, getRequest, getResponse, populateFromRequest, setCommand, setRequest, setResponse |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TemplatedMVCHandler
public TemplatedMVCHandler(String name,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
- Parameters:
name
- request
- response
-
getTemplateName
protected String getTemplateName(String viewName)
- Returns the template name for the rendering. The standard implementation used the classname to build the path.
- Parameters:
viewName
- the view name to render
- Returns:
- the template name (including path)
renderHtml
public void renderHtml(String view)
throws IOException
- Renders the template. The handlers is passed with the name 'this'.
- Throws:
IOException
Copyright © 2003-2010 Magnolia International Ltd.. All Rights Reserved.