[ 
https://issues.apache.org/jira/browse/WW-3485?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12925374#action_12925374
 ] 

Topsy Kretts commented on WW-3485:
----------------------------------

I just had a similar problem, and figured out what is the solution:

I tried to access this map: 

private Map<Long, String> propertiesMap; 

In the jsp originally used the struts tag like this:

<s:textarea name='propertiesMap["%{#attribute.id}"]' 
id="propertiesMap_%{#attribute.id}" label="%{#attribute.attributeName}"/>

With the Struts version 2.2 I got null in the Action, so I changed the the line 
above:

<s:textfield name="propertiesMap[%{#attribute.id}]"  
id="propertiesMap_%{#attribute.id}" label="%{#attribute.attributeName}"/>

And then it works.
The notable change between the two lines is, there aren't quotes in the second 
one.

Doesn't work with Struts 2.2: 
name='propertiesMap["%{#attribute.id}"]' 

Does work with Struts 2.2: 
name="propertiesMap[%{#attribute.id}]"

I don't really know if it is a bug, but I think you can use this solution.

I hope this helped.

> Map of beans mapping behaviour in Struts 2.2 seems to have changed from 
> 2.1.8.1
> -------------------------------------------------------------------------------
>
>                 Key: WW-3485
>                 URL: https://issues.apache.org/jira/browse/WW-3485
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.2.1
>         Environment: Struts 2.2.1
>            Reporter: Denis Cabasson
>         Attachments: WW-3485-test.zip, WW-3485.patch
>
>
> The usage of a map of String * Bean which was working fine with Struts 
> 2.1.8.1 is broken with Struts 2.2.1. I read all the documentation relating to 
> conversions and parameters and did not find any hint of a change in behavior 
> of Struts 2.2 against 2.1, except for the changes in OGNL.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to