[
http://jira.undersunconsulting.com/browse/OFBIZ-848?page=all ]
Marco Risaliti closed OFBIZ-848:
--------------------------------
Resolution: Duplicate
replaced by
https://issues.apache.org/jira/browse/OFBIZ-273> FreeMarkerWorker.java flexibility
> ---------------------------------
>
> Key: OFBIZ-848
> URL:
http://jira.undersunconsulting.com/browse/OFBIZ-848> Project: [OFBiz] Open For Business
> Type: Improvement
> Components: base
> Versions: SVN
> Reporter: Oleg Kozyrev
> Assignee: Jira Administrator
> Priority: Minor
> Attachments: freemarkerworker.patch, freemarkerworker.properties
>
>
> Ftl transforms loading in org.ofbiz.base.util.template.FreeMarkerWorker is not really flexible at the moment.
> Now classes to load are hard-coded, like this:
> ftlTransforms.put("ofbizUrl", loader.loadClass("org.ofbiz.webapp.ftl.OfbizUrlTransform").newInstance());
> ftlTransforms.put("ofbizContentUrl", loader.loadClass("org.ofbiz.webapp.ftl.OfbizContentTransform").newInstance());
> ftlTransforms.put("ofbizCurrency", loader.loadClass("org.ofbiz.webapp.ftl.OfbizCurrencyTransform").newInstance());
> ftlTransforms.put("ofbizAmount", loader.loadClass("org.ofbiz.webapp.ftl.OfbizAmountTransform").newInstance());
> So, if we need to add new class we need to recompile all the component. This is not right way, I think.
> I suggest to create separate properties file, like:
> ofbizUrl=org.ofbiz.webapp.ftl.OfbizUrlTransform
> ofbizContentUrl=org.ofbiz.webapp.ftl.OfbizContentTransform
> ofbizCurrency=org.ofbiz.webapp.ftl.OfbizCurrencyTransform
> and load them using UtilProperties class.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.undersunconsulting.com/secure/Administrators.jspa-
For more information on JIRA, see:
http://www.atlassian.com/software/jira