[EMAIL PROTECTED] wrote:
>
> Hi,
>
> I have been having problems accessing a vector of objects stored in the
> context. I am able to make a vector of strings, put this in the context and
> then access each with #foreach in the vm template, but when I try to add a
> vector of objects and access the different get methods on that object I get
> the following error in the velocity log:
>
That's a known bug. To fix for now, one workaround is to do something
like :
#set $foo = $vector.firstElement()
$foo.methodCall()
Of course, access the element in the vector any way you want, not just
firstElement()...
geir
> Wed Nov 29 13:30:04 GMT+00:00 2000 [warn]
> org.apache.velocity.runtime.exception.ReferenceException: reference:
> $prod.getName() is not a valid reference. [line 39,column 21]
>
> Do I need to put the prod class in any particular place?
>
> I am using tdk1.1a9 and have also tried using the velocity nightly build
> from 29 Nov.
>
> Many thanks for any help.
>
> Jon
>
--
Geir Magnusson Jr. [EMAIL PROTECTED]
Dakota tribal wisdom: "when you discover you are riding a dead horse,
the best strategy is to dismount."
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]