Until JSF 2.2, the supported types for the
<h:dataTable> tag contains
javax.faces.model.DataModel, null (or empty list), and types used as scalar values.
Starting with JSF 2.2, we can also use
java.util.Collection. This is especially useful to Hibernate/JPA users, who are usually using the
Set collections for entity relationships. Therefore, nothing can stop us from using a
LinkedHashSet set for feeding our JSF tables.
The next example is like a test case for the most-used Java collections. First, let's declare some collections of
Players as follows:
java.util.ArrayList: This library implements