velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shinobu Kawai <shinobu.ka...@gmail.com>
Subject Re: "For each" on an object?
Date Thu, 03 Mar 2005 08:48:46 GMT
Hi Evan,

> I guess its just a usability thing.  To be able to pass a single string
> would avoid careless errors, that's all. I may settle for what you suggest
> though.

You can make a custom Uberspect to get what you want.  :)
   http://jakarta.apache.org/velocity/api/org/apache/velocity/util/introspection/Uberspect.html#getIterator(java.lang.Object,%20org.apache.velocity.util.introspection.Info)

ie. getIterator returns a one-item iterator for non-iterative objects.

Best regards,
-- Shinobu

--
Shinobu Kawai <shinobu.kawai@gmail.com>

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