FileDocCategorySizeDatePackage
CustomFreemarkerManager.javaAPI DocApache Struts 2.0.9 Apps2237Mon Jul 23 13:43:26 BST 2007org.apache.struts2.showcase.freemarker

CustomFreemarkerManager

public class CustomFreemarkerManager extends org.apache.struts2.views.freemarker.FreemarkerManager
This is an example of a custom FreemarkerManager, mean to be instantiated through Spring.

It will add into Freemarker's model an utility class called {@link CustomFreemarkerManagerUtil} as a simple example demonstrating how to extends FreemarkerManager.

The {@link CustomFreemarkerManagerUtil} will be created by Spring and injected through constructor injection.

Fields Summary
private CustomFreemarkerManagerUtil
util
Constructors Summary
public CustomFreemarkerManager(CustomFreemarkerManagerUtil util)

        this.util = util;
    
Methods Summary
protected voidpopulateContext(org.apache.struts2.views.freemarker.ScopesHashModel model, com.opensymphony.xwork2.util.ValueStack stack, java.lang.Object action, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)

        super.populateContext(model, stack, action, request, response);
        model.put("customFreemarkerManagerUtil", util);