[ http://jira.undersunconsulting.com/browse/OFBIZ-848?page=comments#action_14041 ] David E. Jones commented on OFBIZ-848: --------------------------------------
Yeah, I guess this hasn't really seen much attention has it. My guess, based on my own thoughts on it, is that others also see it as a less than ideal solution to a fairly low priority problem. It is certainly better than what we have in there now, and I have no objection to it, so yeah, feel free to go for it. > 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
