facelets
  1. facelets
  2. FACELETS-240

UIRepeat 'value' attribute and Collection types

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Incomplete
    • Affects Version/s: Facelets 1.1
    • Fix Version/s: early access
    • Component/s: impl
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      240

      Description

      I encountered a problem attempting to set the ui:repeat "value" attribute to an
      instance that was a subclass of java.util.Set (specifically Hibernate's
      PersistentSet class): the UIRepeat class treated it like a scalar object.

      An iteration tag like ui:repeat should work with all Collection types in my
      opinion. In the UIRepeat.getDataModel() method it's possible to detect an
      instance of Collection and make use of the ArrayDataModel by invoking the
      toArray() method on the instance. In this way a new DataModel implementation
      isn't needed. I've made this change in my own copy of Facelets and it works
      beautifully.

      Hibernate happens to use Sets quite a bit, so this was important to me. I'd be
      happy to submit a patch.

      This issue occurs in Facelets 1.2 as well.\

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              facelets-issues
              Reporter:
              rwhitsell
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: