Re: Remove last comma...

2005-01-17 Thread Shinobu Kawai Yoshida
Hi Dimitrios, > Thank you all for your replies. The best solution in my case is the inline > evaluation $foo="#foreach...#end" Shinobu suggested. What I would like to > ask is whether I can trigger in some way the re-evaluation of $foo. Do you mean something like the (View)RenderTool? http://

Re: Remove last comma...

2005-01-17 Thread Dimitrios Kolovos
e Jong" <[EMAIL PROTECTED]> To: "'Velocity Users List'" Sent: Monday, January 17, 2005 7:22 PM Subject: RE: Remove last comma... Yes. This is the standard pattern I use for displaying lists: if (list not null) display header display element[1] loop (each element in l

RE: Remove last comma...

2005-01-17 Thread Wiebe de Jong
while loop, so no check is required. I don't know how the foreach loop in Velocity would handle an empty list. Wiebe de Jong -Original Message- From: Will Glass-Husain [mailto:[EMAIL PROTECTED] Sent: Monday, January 17, 2005 10:55 AM To: Velocity Users List Subject: Re: Remove last

Re: Remove last comma...

2005-01-17 Thread Will Glass-Husain
Then you need an if statement to ensure the list has at least 2 elements. WILL - Original Message - From: "Wiebe de Jong" <[EMAIL PROTECTED]> To: "'Velocity Users List'" Sent: Monday, January 17, 2005 10:04 AM Subject: RE: Remove last comma... How ab

RE: Remove last comma...

2005-01-17 Thread Wiebe de Jong
How about process the fist line separately, then all the rest. $1 #foreach ($i in [2..10],$i#end Will product 1,2,3..10 Wiebe de Jong -Original Message- From: Dimitrios Kolovos [mailto:[EMAIL PROTECTED] Sent: Friday, January 14, 2005 2:18 AM To: Velocity Users List Subject: Remove last