You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "Chacko, Raj" <rc...@cincom.com> on 2004/11/22 20:06:41 UTC

Iterator Tools?

Hi, 

Can anyone please review this code snippet? I am using the Iterator tools to
iterate through a vector object that is stored in a session object. The data
is populated to an array on the client side. I use the iterator tool to
check for any existing object and if so, add a comma delimiter, for the
array.

#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