velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shinobu Kawai <shinobu.ka...@gmail.com>
Subject Re: Using foreach loops on String[][]
Date Mon, 11 Apr 2005 16:51:01 GMT
Hi Jason,

> I didn't see this in the Velocity documentation but can string arrays of
> string arrays be iterated through via typical foreach handling or is it
> necessary to enumerate everything out. On that note, if I use
> Arrays.asList(String[][]) to put a List into the context, can I then
> access the individual String arrays as $Foo[0] $Foo[1]?

Is there a difference between your phrases "iterated through" and
"enumerate everything out"?  To me, it sounds the same, and yes, I
believe you can nest #foreach loops for that purpose.

As for getting the elements directly, check out the ListTool.  :)
    http://wiki.apache.org/jakarta-velocity/ListTool

Best regards,
-- Shinobu

--
Shinobu Kawai <shinobu.kawai@gmail.com>

---------------------------------------------------------------------
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