groovy and fo.ftl

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

groovy and fo.ftl

Erwan de FERRIERES
Hi all,

is there a way to call groovy scripts directly in a fo.ftl file ?

Cheers,

--
Erwan de FERRIERES
www.nereide.biz
Reply | Threaded
Open this post in threaded view
|

Re: groovy and fo.ftl

pierre-29
Hi Erwan,

I think you should call groovy from action of the screen widget and not
from ftl.

Pierre
 
Erwan de FERRIERES a écrit :
> Hi all,
>
> is there a way to call groovy scripts directly in a fo.ftl file ?
>
> Cheers,
>




Reply | Threaded
Open this post in threaded view
|

Re: groovy and fo.ftl

Erwan de FERRIERES
In reply to this post by Erwan de FERRIERES
Le 01/09/2010 15:25, Erwan de FERRIERES a écrit :
> Hi all,
>
> is there a way to call groovy scripts directly in a fo.ftl file ?
>
> Cheers,
>

Ok, this was a bit not enough, for example, I want to transpose this in
a fo.ftl :
description="${groovy:partyName.size()>20?partyName[0..20]:partyName}"/>

or if I want to include a groovy file, which is used in a row-action in
a form ?

--
Erwan de FERRIERES
www.nereide.biz
Reply | Threaded
Open this post in threaded view
|

Re: groovy and fo.ftl

Malin Nicolas
hi erwan, in your case You can use substring :
http://freemarker.sourceforge.net/docs/ref_builtins_string.html#ref_builtin_substring

${partyName?substring(0, 20)}

Nicolas

Le 01/09/2010 16:55, Erwan de FERRIERES a écrit :

> Le 01/09/2010 15:25, Erwan de FERRIERES a écrit :
>> Hi all,
>>
>> is there a way to call groovy scripts directly in a fo.ftl file ?
>>
>> Cheers,
>>
>
> Ok, this was a bit not enough, for example, I want to transpose this
> in a fo.ftl :
> description="${groovy:partyName.size()>20?partyName[0..20]:partyName}"/>
>
> or if I want to include a groovy file, which is used in a row-action
> in a form ?
>


--
Nicolas MALIN
Consultant
Tél : 06.17.66.40.06
Site projet : http://www.neogia.org/
-------
Société LibrenBerry
Tél : 02.48.02.56.12
Site : http://www.librenberry.net/

Reply | Threaded
Open this post in threaded view
|

Re: groovy and fo.ftl

Erwan de FERRIERES
Le 01/09/2010 17:01, Nicolas Malin a écrit :
> hi erwan, in your case You can use substring :
> http://freemarker.sourceforge.net/docs/ref_builtins_string.html#ref_builtin_substring
>
>
> ${partyName?substring(0, 20)}
>
Ok nice for this one.. time to go to bed ?
>
>


--
Erwan de FERRIERES
www.nereide.biz