0

I want to use

<ui:repeat >

to trace over a collection of type 'Set', but unable to do so. If anybody has a solution, please tell.

Ammar
  • 1,811
  • 5
  • 26
  • 60

1 Answers1

2

ui:repeat can't iterate over a java.util.Set

You can overcome it by doing something like this (convert your set into list and use it in your ui:repeat)

public List retrieveListAsSet(Set set) {
   return new ArrayList(set);
}

Or implemet your own repeater like described in this blog Bozho's tech blog : How to Iterate Over java.util.Set in JSF

Daniel
  • 36,833
  • 10
  • 119
  • 200