Template task - Velocity

43 views
Skip to first unread message

Mårten Peterson

unread,
May 4, 2012, 4:37:36 AM5/4/12
to CozyRoc, o...@bizt.se
Hi,

Is it possible to format date, numbers and use expressions like
$foreach.count in the Template Task? I have no succes when I try this
out of the box. If I work in Java with Velocity I could do the
following, I'm aware that it uses other Classes:

#set($intString = "9")
#set($Integer = 0)
$Integer.parseInt($intString)

<table>
#foreach( $customer in $customerList )
<tr><td>$foreach.count</td><td>$customer.Name</td></tr>
#end
</table>

Ivan Peev

unread,
May 4, 2012, 9:31:03 AM5/4/12
to coz...@googlegroups.com, o...@bizt.se
Hi Marten,

We have just updated the Template Task's documentation to include information about the questions you have asked below.

For formatting a number you can use similar approach like the process described for the Date.

Ivan
Reply all
Reply to author
Forward
0 new messages