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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user