Hi Sinobu, Using results.more() will return the next item from the list, I wanted $results.hasMore() to check for any more elements in the wrapped list. So that I can append a comma to create an array.
Something like #if ($results.hasMore()) , #end Please correct me if I'm wrong in my approach. Regards... Binu Nadesan. (513) 612-2206. -----Original Message----- From: Shinobu Kawai [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 9:29 PM To: Velocity Users List Subject: Re: IteratorTool Hi Binu, > #if ($taskcount.intValue() > 0) > aData = [ > #set($results = $mill.wrap($tasksearchresults)) > #foreach($sitem in $results) > > ['$sitem.DueDate','$sitem.Severity','$sitem.Priority','$sitem.CaseCategory'] > #if ($results.hasMore()) , #end > #end > ]; > #end You need to call $results.more() in order to go to the next item using IteratorTool. http://jakarta.apache.org/velocity/tools/javadoc/org/apache/velocity/tools/g eneric/IteratorTool.html Best regards, -- Shinobu Kawai -- Shinobu Kawai <[EMAIL PROTECTED]> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]