Unfortunately, the forEach
tag does not support Iterable
as the items source. It does support:
- Arrays
Collection
Iterator
Enumeration
Map
- Comma-separated list of values given in a
String
(relevant source code: ForEachSupport)
Of these, it's probably best to use an Iterator
as the forEach
source when you wish to fetch items from your own class.