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,721
  • 4
  • 25
  • 58

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,273
  • 9
  • 115
  • 187