velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <ge...@adeptra.com>
Subject Re: "Could not determine type of iterator in #foreach loop"
Date Tue, 13 Aug 2002 12:27:10 GMT
On 8/13/02 7:39 AM, "lloyd" <subscr001@twilight-systems.com> wrote:

> I have a custom collection class named SparseList that returns a custom
> iterator.  When I try to use it in Velocity, I get this message in the log:
> 
> 
> [warn] Could not determine type of iterator in #foreach loop for
>       $revs at [25,57] in template revenues2.vm
> 
> The iterator is implemented as a private inner class of the collection,
> and an Iterator interface to it is returned to clients.  Do classes that
> implement Iterator to be used by Velocity have to be public?
> 
> I'd test it but don't have to code with me at the moment.  In the
> meantime - in general, are there any rules custom iterators must follow
> in order to work with Velocity?
> 

What that message means is that it couldn't even figure out how to get
something to iterate over.  Do you do  :


   context("revs", thingy.getIterator());


?

-- 
Geir Magnusson Jr. 
Research & Development, Adeptra Inc.
geirm@adeptra.com
+1-203-247-1713



--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message