hi
I have a class with a bunch of static methods that I want to access
from freemarker templates.
According
to http://freemarker.sourceforge.net/docs/pgui_misc_beanwrapper.html#autoid_55
I can do something like
BeansWrapper wrapper = BeansWrapper.getDefaultInstance();
TemplateHashModel staticModels = wrapper.getStaticModels();
TemplateHashModel fileStatics =
(TemplateHashModel) staticModels.get("java.io.File");
for my class and that's it.
But the shardVariables map simply maps names to classes that can be
instantiated as TemplateModel.
It seems that what i actually need is a kind of factory or factory
method that will create the TemplateModel instance, in stead of
straight instantiation.
Is there something I miss, or is it simply not possible with the current setup?
I also found http://jira.magnolia-cms.com/browse/MAGNOLIA-3152
I think this issue addresses the same problem. Can I assume that the
fact this issue is still open means that some work is still needed to
make this possible?
If so, I can extend FreemarkerHelper, but I rather don't if not needed.
regards,
--
Ernst Bunders
Ontwikkelaar VPRO
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------