info.magnolia.module.admininterface
Class TemplatedMVCHandler

java.lang.Object
  extended by info.magnolia.cms.servlets.MVCServletHandlerImpl
      extended by info.magnolia.cms.servlets.CommandBasedMVCServletHandler
          extended by info.magnolia.module.admininterface.PageMVCHandler
              extended by info.magnolia.module.admininterface.TemplatedMVCHandler
All Implemented Interfaces:
MVCServletHandler
Direct Known Subclasses:
AbstractList, ActivationMonitorPage, ActivationPage, AdminCentralPage, AllModulesListPage, CacheToolsPage, ConfigurationPage, DevelopmentUtilsPage, ExportPage, InstalledModulesListPage, JCRUtilsPage, LogViewerPage, PermissionPage, QuickstartPage, RepositoryBrowserPage, SendMailPage, UsersPage, WorkflowUtilPage

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$ ($Author$)
Author:
Philipp Bracher

Field Summary
 
Fields inherited from class info.magnolia.module.admininterface.PageMVCHandler
COMMAND_PARAMETER_NAME, COMMAND_SHOW, VIEW_SHOW
 
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)
           
 
Method Summary
protected  String getTemplateName(String viewName)
          Returns the template name for the rendering.
 void renderHtml(String view)
          Renders the template.
 
Methods inherited from class info.magnolia.module.admininterface.PageMVCHandler
getForm, getI18nBasename, getMsgs, getParams, init, setForm, setI18nBasename, setMsgs, setParams, show
 
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
 

Constructor Detail

TemplatedMVCHandler

public TemplatedMVCHandler(String name,
                           javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response)
Parameters:
name -
request -
response -
Method Detail

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-2013 Magnolia International Ltd.. All Rights Reserved.