Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3773

ui:repeat with offset and size does not behave as expected

    XMLWordPrintableJSON

Details

    Description

      Looking for minor issues in JSF spec I found this one:

      https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1058
      VDL Docs Need Correction/Clarification For ui:repeat size Attribute

      "... Currently, the VDL docs say this for ui:repeat "size" attribute:

      "Read-write property setting the size of the collection to iterate. If this value is less than the actual size of the collection, a FacesException must be thrown."

      However, the purpose of the size attribute is to specify the number of elements or items to iterate over in the overall collection. So, for example:

      overall collection size = 10
      u:repeat size="5"
      should iterate over the first 5 items of the collection.

      ..."

      This issue was fixed in Mojarra as:

      https://java.net/jira/browse/JAVASERVERFACES-2425

      but we have been struggling on this for a long time too. See:

      https://issues.apache.org/jira/browse/MYFACES-3183
      https://issues.apache.org/jira/browse/MYFACES-3034

      The current behavior for 2.0.x and 2.1.x is the same as Mojarra before fix JAVASERVERFACES-2425, but in practice we need to fix this one for all branches. The current behavior is clearly inconsistent and if it was fixed in Mojarra, in this case we should do the same too.

      Attachments

        Activity

          People

            lu4242 Leonardo Uribe
            lu4242 Leonardo Uribe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: