1 2 Previous Next 19 Replies Latest reply on Jan 31, 2007 5:12 AM by pmuir Go to original post
      • 15. Re: Seam - iterator tag?
        pmuir

        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.


        My reasoning was (unchecked so may be wrong).

        Seam DataModel Databinder delegates find the selected row to ListDataModel. ListDataModel has the selected row set by UIData broadcast method. ui:repeat isn't UIData so won't do this.

        Gavin does seem to indicate the opposite though.

        • 16. Re: Seam - iterator tag?
          dan.j.allen

          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?

          • 17. Re: Seam - iterator tag?
            gavin.king

            You are absolutely allowed to back JSF for this, but doesn't the facelets ui:repeat tag support Sets?

            • 18. Re: Seam - iterator tag?

              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>

              • 19. Re: Seam - iterator tag?
                pmuir

                This is what I use:

                http://sfjsf.blogspot.com/2006/03/usings-sets-with-uidata.html#links

                rewritten as a facelets function for ease.

                1 2 Previous Next