You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by pl...@netscape.net on 2002/08/14 02:09:03 UTC

Another question about Arrays

Okay, I am sure this question has been asked and answered many
times, but I have searched the velocity documentation and 
looked in the mail archives, but haven't found a good answer.

Is there a way to access elements in arrays from a Velocity
template?

Yes, I know that Velocity handles ArrayLists nicely.  However,
I have a two dimensional array (received from some other piece
of code that I didn't write) which I would like to put into the context
and use.

I did find an answer to this question from Geir Magnusson Jr. in:
   http://www.mail-archive.com/velocity-user@jakarta.apache.org/msg06191.html

in which he suggested that it should be possible to use the syntax:
   $myArray.get(3)
to access myArray[3].  However, that doesn't work in my test code.

Has anyone gotten that (or any other syntax) to work?

Thanks,
  --Paul


__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>