Upgrade to the most recent version of Freemarker-2.3-gae: this is not an official release yet but it will be soon; I have committed this work, as discussed in the dev list, in order to get help from the community to test this new improved version of Freemarker and provide feedback to the Freemarker community.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605029 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jacopo Cappellato
2014-06-24 08:33:04 +00:00
parent d4ae304e5a
commit 05073f29df
6 changed files with 13 additions and 6 deletions
@@ -49,6 +49,7 @@ import freemarker.template.Template;
import freemarker.template.TemplateException;
import freemarker.template.TemplateModel;
import freemarker.template.TemplateModelException;
import freemarker.template.Version;
/**
* Widget Library - Screen model HTML class.
@@ -58,10 +59,14 @@ public class HtmlWidget extends ModelScreenWidget {
public static final String module = HtmlWidget.class.getName();
private static final UtilCache<String, Template> specialTemplateCache = UtilCache.createUtilCache("widget.screen.template.ftl.general", 0, 0, false);
protected static Configuration specialConfig = FreeMarkerWorker.makeConfiguration(FreeMarkerWorker.configureBeansWrapper(new ExtendedWrapper()));
protected static Configuration specialConfig = FreeMarkerWorker.makeConfiguration(FreeMarkerWorker.configureBeansWrapper(new ExtendedWrapper(FreeMarkerWorker.version)));
// not sure if this is the best way to get FTL to use my fancy MapModel derivative, but should work at least...
public static class ExtendedWrapper extends BeansWrapper {
public ExtendedWrapper(Version version) {
super(version);
}
@SuppressWarnings("unchecked")
@Override
public TemplateModel wrap(Object object) throws TemplateModelException {