[ 
http://issues.apache.org/jira/browse/MYFACES-623?page=comments#action_12330633 
] 

Bill Dudney commented on MYFACES-623:
-------------------------------------

Hi Sean,

I can't repeat this error in a cactus test.

All three of these tests pass;

        public void testSetValueSimpleMap() {
                facesContext.getExternalContext().getRequestMap().put("foo", 
new HashMap());
                ValueBinding binding = 
application.createValueBinding("#{foo['baz']}");
                Integer value = new Integer(14);
                binding.setValue(facesContext, value);
                assertEquals(14, value.intValue());
        }

        public void testSetValueSimpleBeanInRequestMap() {
                TestBean bean = new TestBean(new HashMap());
                facesContext.getExternalContext().getRequestMap().put("bean", 
bean);
                ValueBinding binding = 
application.createValueBinding("#{bean.map['baz']}");
                Integer value = new Integer(14);
                binding.setValue(facesContext, value);
                assertEquals(14, value.intValue());
        }

        public void testSetValueSimpleBeanInSessionMap() {
                TestBean bean = new TestBean(new HashMap());
                facesContext.getExternalContext().getSessionMap().put("bean", 
bean);
                ValueBinding binding = 
application.createValueBinding("#{bean.map['baz']}");
                Integer value = new Integer(14);
                binding.setValue(facesContext, value);
                assertEquals(14, value.intValue());
        }

Am I not doing something that you are?


> setValue() method of ValueBindingImpl does not behave properly
> --------------------------------------------------------------
>
>          Key: MYFACES-623
>          URL: http://issues.apache.org/jira/browse/MYFACES-623
>      Project: MyFaces
>         Type: Bug
>   Components: JSR-127
>     Versions: 1.1.0
>     Reporter: sean schofield

>
> According to section 5.1.4 of the specification (p. 5-4) ...
> If you have #{expr-a[value-b]}  where value-a is a Map then ...
> call value-a.put(value-b, newValue).
> The MyFaces implementation is coercing newValue into String which is 
> incorrect behavior.  
> NOTE: I discovered the problem while using a bean that was programatically 
> added to the session map.  So there is is no class defined in 
> faces-config.xml.  I don't think this should matter but I thought I would 
> mention it.

-- 
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