Oops
"dbatcn" wrote:
I looked at the link that Pete pointed out and the way I read Gavin's comment in there I didn't see why @DataModelSelection shouldn't work. If true, enlightenment appreciated.
Are there any thoughts on a tag, or some adapter built into Seam, that helps to iterate over a java.util.Set? I figured this one would have gotten far enough under your skin, Gavin, that you would scratch at it until JSF bled ;)
While we are on the topic, are we allowed to bash the JSF spec for not including support for basic java.util.Collection iteration?
You are absolutely allowed to back JSF for this, but doesn't the facelets ui:repeat tag support Sets?
Believe the ui:repeat tag uses the standard JSF data model classes, none of which includes a Set wrapper, unfortunately.
Guess the best bet maybe to use the ui:repeat tag with a customized facelet function to convert the set to Object[]
e.g.
<ui:repeat value="#{fn:toArray(setCollection)}" var="each">
...
</ui:repeat>
This is what I use:
http://sfjsf.blogspot.com/2006/03/usings-sets-with-uidata.html#links
rewritten as a facelets function for ease.