Reputation: 3387
In Java, I'm able to use for-loops to iterate over ArrayLists or Iterables. In RichFaces, I can use the facelet "repeat" tag to iterate over ArrayLists, but not Iterables. The error messages I get from using an Iterable are that the attributes or methods of the items in the Iterable cannot be found. How should I code an Iterable so that RichFaces sees the items in it as their proper class, just as Java itself does?
Upvotes: 2
Views: 930
Reputation: 6766
Based on org.richfaces.component.UISequence#createFacesModel
valid types for value attribute of a4j:repeat (and other RichFaces data iteration components (rich:list, rich:dataTable, etc.)) are the following:
javax.faces.model.DataModel
java.util.List
java.lang.Object[]
java.sql.ResultSet
javax.servlet.jsp.jstl.sql.Result
So, in your case iterables should implement java.util.List
interface.
Upvotes: 4