Behandlung von <map-entries>- und <list-entries>-Elementen entspricht nicht den 
Vorgaben von JSR-127
----------------------------------------------------------------------------------------------------

         Key: MYFACES-587
         URL: http://issues.apache.org/jira/browse/MYFACES-587
     Project: MyFaces
        Type: Bug
  Components: JSR-127  
    Versions: 1.0.9m9    
 Environment: Windows XP, WSAD 5.1.2
    Reporter: Martin Winkelmann


Zur Initialisierung einer Map- bzw. List-Property wird scheinbar immer eine 
HashMap bzw. ArrayList verwendet.
Die in JSR-127 gemachten Vorgaben werden nicht umgesetzt.

Kopiert aus JSR-127 Version 1.1:
"The initialization bean properties from <map-entries> and <list-entries>
elements must adhere to the following algorithm, though any confirming
implementation may be used.
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.
Chapter 5 Value Binding and Method Binding Expression Evaluation 5-13
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.
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."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to