Package org.apache.ofbiz.webapp.ftl
Class FreeMarkerViewHandler
- java.lang.Object
-
- org.apache.ofbiz.webapp.view.AbstractViewHandler
-
- org.apache.ofbiz.webapp.ftl.FreeMarkerViewHandler
-
- All Implemented Interfaces:
ViewHandler
public class FreeMarkerViewHandler extends AbstractViewHandler
FreemarkerViewHandler - Freemarker Template Engine View Handler.
-
-
Field Summary
Fields Modifier and Type Field Description protected freemarker.template.Configuration
config
static java.lang.String
module
-
Fields inherited from class org.apache.ofbiz.webapp.view.AbstractViewHandler
name
-
-
Constructor Summary
Constructors Constructor Description FreeMarkerViewHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
init(javax.servlet.ServletContext context)
Initializes the handler.static void
prepOfbizRoot(java.util.Map<java.lang.String,java.lang.Object> root, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
void
render(java.lang.String name, java.lang.String page, java.lang.String info, java.lang.String contentType, java.lang.String encoding, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Render the page.-
Methods inherited from class org.apache.ofbiz.webapp.view.AbstractViewHandler
getName, setName
-
-
-
-
Method Detail
-
init
public void init(javax.servlet.ServletContext context) throws ViewHandlerException
Description copied from interface:ViewHandler
Initializes the handler. Since handlers use the singleton pattern this method should only be called the first time the handler is used.- Parameters:
context
- ServletContext This may be needed by the handler in order to lookup properties or XML definition files for rendering pages or handler options.- Throws:
ViewHandlerException
-
render
public void render(java.lang.String name, java.lang.String page, java.lang.String info, java.lang.String contentType, java.lang.String encoding, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws ViewHandlerException
Description copied from interface:ViewHandler
Render the page.- Parameters:
name
- The name of the view.page
- The source of the view; could be a page, url, etc depending on the type of handler.info
- An info string attached to this viewrequest
- The HttpServletRequest object used when requesting this page.response
- The HttpServletResponse object to be used to present the page.- Throws:
ViewHandlerException
-
prepOfbizRoot
public static void prepOfbizRoot(java.util.Map<java.lang.String,java.lang.Object> root, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
-
-