velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rich Garabedian" <r...@autorevenue.com>
Subject RE: List of Object Arrays
Date Mon, 06 Mar 2006 20:40:39 GMT
Hey Bill.

Thanks so much for the note.

I don't think that code skeleton will for me because the objects in the
object array will be different. The List of object arrays is coming to me
from hibernate and in this particular scenario I'll have three different
beans. What I really want to do is something like this:

#foreach ($array in $arrayList)
    #set($table1 = $array.get(0))
    #set($table2 = $array.get(1))
    #set($table3 = $array.get(2))

    ## Do stuff with $table1
    ## Do stuff with $table2
    ## Do stuff with $table3
#end

But I couldn't get that to work

-----Original Message-----
From: Bill Rishel [mailto:illusyn@gmail.com] 
Sent: Monday, March 06, 2006 3:06 PM
To: Velocity Users List; richg@autorevenue.com
Subject: Re: List of Object Arrays

#foreach ($array in $arrayList)
    #foreach ($item in $array)
       $item ## do something with  $item
    #end
#end


Bill


On 3/5/06, Rich Garabedian <rich@autorevenue.com> wrote:
>
> Greetings Users List.
>
> Is there any way to loop through a List of Object Arrays in Velocity? In
> other words:
>
> Iterator i = myList.iterator();
>
> while(i.hasNext())
> {
>     Object[] configArray = (Object[]) i.next();
>
>     //Do something with object array
> }
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>



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