commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Lund <>
Subject [Jelly] Parallel arrays and array access
Date Thu, 25 May 2006 21:57:51 GMT
Hi. Sorry if this is a newbie question, but I can't find it on the 
mailing lists or anywhere.

I'm using Jelly within Maven, and I'm trying to access elements in two 
parallel arrays. My script looks something like this:

      <u:tokenize var="names" delim=",">${foo.names}</u:tokenize>
      <u:tokenize var="classes" delim=",">${foo.classes}</u:tokenize>
      <j:forEach items="${names}" var="name", indexVar="i">
             <ant:echo>name = ${name}, class = ${classes}[${i}]</ant:echo>

Obviously, the second part of my ant:echo line doesn't work, but my 
questions are:

1) How do you access an item in an array in Jelly - I can't seem to find 
anything that says what the syntax is

2) Is this the best way to handle parallel arrays in Jelly?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message