You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Va...@lntinfotech.com on 2002/03/12 20:48:55 UTC

Regd. how to access an array of objects

Hi,

    A method returns an array of objects, is it possible to call a method
of that object using the index in a template.

ex: of the template

#set  ( $Supplier = $Customer.getSuppliers())
#set ( $jIndex = 0 )
#foreach ( $Main in $MainSuppliers )
#if ($Supplier[$jIndex].getName() == $Main.getName())

#end
#end

$Supplier[$jIndex].getName() is not working... is there any alternative way
to do this in the template.

Thanks and Regards
Vanitha



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