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

managed bean: <list-entries>handling does not follow the spec

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.1
    • 1.1.0
    • JSR-127
    • None

    Description

      From the spec document page 5-13:
      "For <list-entries>:
      1. Call the property getter, if it exists.
      2. If the getter returns null or doesn't exist, create a java.util.ArrayList, otherwise use the returned Object (an array or a java.util.List).
      3. If a List was returned or created in step 2), add all elements defined by nested <value> elements in the order they are listed, converting values defined by nested <value> elements to the type defined by <value-class>. If a value is given as a value binding expression, evaluate the reference and store the result, converting to <value-class> if necessary. If a <value-class> is not defined, use the value as-is (i.e., as a java.lang.String). Add null for each <nullvalue> element.
      4. If an array was returned in step 2), create a java.util.ArrayList and copy all elements from the returned array to the new List, wrapping elements of a primitive type. Add all elements defined by nested <value> elements as described in step 3).
      5. If a new java.util.List was created in step 2) and the property is of type List, set the property by calling the setter method, or log an error if there is no setter method.
      6. If a new java.util.List was created in step 2) and the property is a java array, convert the List into an array of the property type, and set it by calling the setter method, or log an error if there is no setter method.
      7. If a new java.util.List was created in step 4), convert the List to an array of the proper type for the property and set the property by calling the setter method, or log an error if there is no setter method."

      MyFaces skips Step 1 and creates a new ArrayList instance in any case.

      Attachments

        Activity

          People

            oros Oliver Rossmueller
            oros Oliver Rossmueller
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: