JSF -- <ui:repeat /> over a java.util.Set?
The easiest way to finish the deal at page without modifying the class is converting the set
to an array
like this.
<ui:repeat value="#{myBean.mySet.toArray()}" var="_myvar">
No, the ui:repeat
does not support Set, nor does h:dataTable
.
You should return a List from the Set, and use that instead.
public List<T> getListFromSet(Set<T> set) {
return new ArrayList<T>(set);
}
You should avoid using c:forEach
; here is an article on why.