Non static java method call in ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Non static java method call in ftl

RamKrishna Swamy
Hi User,

Is there any way to call non static java method in ftl?


--
Thanks
Ramkrishna
Reply | Threaded
Open this post in threaded view
|

Re: Non static java method call in ftl

Youssef Khaye
In general, to call a non static java method you should have an instance
from its class.
for example
${screens.render("component://common/widget/CommonScreens.xml#cctypes")}
in our context  we have an object called "screens"  wich is an instance
of ScreenRenderer class.
with that object we can call non static method  render:
public String render(String combinedName)
hope this help.

youssef.

Le 14/05/2014 11:22, Ramkrishna Swamy a écrit :
> Hi User,
>
> Is there any way to call non static java method in ftl?
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Non static java method call in ftl

RamKrishna Swamy
Thank you Youssef for the pointer.



On Wednesday, May 14, 2014, Youssef Khaye <[hidden email]> wrote:

> In general, to call a non static java method you should have an instance
> from its class.
> for example
> ${screens.render("component://common/widget/CommonScreens.xml#cctypes")}
> in our context  we have an object called "screens"  wich is an instance of
> ScreenRenderer class.
> with that object we can call non static method  render:
> public String render(String combinedName)
> hope this help.
>
> youssef.
>
> Le 14/05/2014 11:22, Ramkrishna Swamy a écrit :
>
>> Hi User,
>>
>> Is there any way to call non static java method in ftl?
>>
>>
>>
>