Discussion:
[FreeMarker-user] Regarding Setting custom Attribute
Nasina, Niranjan (EXT-E Soft Consulting - IN)
2014-04-07 08:10:15 UTC
Permalink
Hi ,

Present I am using freemarker template engine in one of my GUI based human tasks
In BPM processes. I have one custom java bean with some attributes.
How can I set one attribute using freemarker? I can't find any example and any
Solution in Manual.


Please help me in this regard.

Thanks,
Regards,
Niranjan Kumar.
Daniel Dekany
2014-04-11 20:53:02 UTC
Permalink
Hi,

Sorry for the late answer... FreeMarker wasn't designed to modifying
the data-model, it only reading it, as any well behaving MVC view does
it. But, you can call the setter methods of Beans as you can call any
other methods. So you can do something like
${myBean.setSomething(123)} and if it returns void, then it will not
print anything. Kind of awkward, but works. Well, assuming methods are
exposed by the ObjectWrapper (that's a Configuration settung), and by
default they are.
--
Thanks,
Daniel Dekany
Post by Nasina, Niranjan (EXT-E Soft Consulting - IN)
Hi ,
Present I am using freemarker template engine in one of my GUI based human tasks
In BPM processes. I have one custom java bean with some attributes.
How can I set one attribute using freemarker? I can’t find any example and any
Solution in Manual.
Please help me in this regard.
Thanks,
Regards,
Niranjan Kumar.
Loading...