Hi,

arrays are directly supported in #foreach startements:

#foreach( $item in $array )
  ...
#end


But to randomly access a specific item you need a tool:
  $ListTool.get($array, 2)
see:
  
http://velocity.apache.org/tools/releases/velocity-tools-1.2/javadoc/org/apache/velocity/tools/generic/ListTool.html

Velocity currently does not support a syntax like $array[$index]

Cheers,
Christoph


Murari, Veeresh (Cognizant) wrote:
> Hi
> 
>             Is it possible to use  arrays in Velocity files.
> 
>  
> 
> Regards,
> 
> Veeresh
> 
> Vnet:-443239
> 
> M:-9840138359
> 
>  
> 
> 
> 
> This e-mail and any files transmitted with it are for the sole use of the 
> intended recipient(s) and may contain confidential and privileged information.
> If you are not the intended recipient, please contact the sender by reply 
> e-mail and destroy all copies of the original message. 
> Any unauthorized review, use, disclosure, dissemination, forwarding, printing 
> or copying of this email or any action taken in reliance on this e-mail is 
> strictly 
> prohibited and may be unlawful.
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to