velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Kienenberger <mkien...@alaska.net>
Subject Re: Referencing arrays
Date Mon, 15 Nov 2004 23:20:31 GMT
Steve O'Hara <sohara@pivotal-solutions.co.uk> wrote:
> I'm trying to reference a 2 dimensional array of strings using the 
following
>             <td valign="top">$Results[0][$velocityCount]</td>
> Unfortunately I just get [[Ljava.lang.String;@1684e26[0][x] where x is the
> $velocityCount.

Array notation is not part of the Velocity Template Language.

You can download Shinobu Kawai's ArrayTool to add support for arrays, or you 
can create your own custom tool.

http://wiki.apache.org/jakarta-velocity/ArrayTool

I played around with ArrayTool earlier today, and it seems to work fine.

$array.get($array.get($Results, 0), $velocityCount)

-Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message