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

property getter is not called when initializing map property of a managed bean

    XMLWordPrintableJSON

Details

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

    Description

      From the spec document page 5-12
      "For <map-entries>:
      1. Call the property getter, if it exists.
      2. If the getter returns null or doesn't exist, create a java.util.HashMap, otherwise use the returned java.util.Map.
      3. Add all entries defined by nested <map-entry> elements in the order they are listed, converting key values defined by nested <key> elements to the type defined by <key-class> and entry 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 <valueclass> if necessary. If <key-class> and/or <value-class> are not defined, use java.lang.String. Add null for each <null-value> element.
      4. If a new java.util.Map was created in step 2), set the property by calling the setter method, or log an error if there is no setter method."

      MyFaces is skipping step 1 and creates a new HashMap 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: