[ https://issues.apache.org/struts/browse/WW-2046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42260 ]
Don Brown commented on WW-2046: ------------------------------- Try a later version like 2.0.11 and let us know if it is still a problem. > Radio map to map type conversion now fails > ------------------------------------------ > > Key: WW-2046 > URL: https://issues.apache.org/struts/browse/WW-2046 > Project: Struts 2 > Issue Type: Bug > Components: Views > Affects Versions: 2.0.8 > Environment: freemarker > Reporter: Jasper Rosenberg > Assignee: Don Brown > Fix For: 2.0.12 > > > Example: > Action has get/set for: > private Map<String, String> myMap = new HashMap<String, String>(); > Template: > <@s.radio name="myMap['name']" list='[EMAIL PROTECTED]@{"Opt.":"Opt.", > "Std.":"Std.", "":"N/A"}' theme="simple"/> > In struts 2.0.6, when I selected a value in the radio button, it would > correctly create a map from String to String. > In struts 2.0.8, when I selected a value in the radio button (any of the > three), it would incorrectly create a map from String to String[]. > Not sure if this is due to a change in 2.0.8, or in XWork 2.0.3. > I have a second case that again used to work in 2.0.6, that now fails in > 2.0.8 where the map key is also not converting correctly: > public class ReviewPicturesAction ... { > /** New picture status approve. */ > public static final String APPROVE = "A"; > /** New picture status deny. */ > public static final String DENY = "D"; > /** New picture status prefer. */ > public static final String PREFER = "P"; > private Map<Long, String> pictureMap = new HashMap<Long, String>(); > > // getter/setter > ... > } > <@s.set name="statusMap" value="[EMAIL PROTECTED]@[EMAIL > PROTECTED]@APPROVE:'A',@[EMAIL PROTECTED]:'P',@[EMAIL PROTECTED]:'D'}"/> > <@s.radio name="pictureMap[5]" list="statusMap" theme="simple" value='@[EMAIL > PROTECTED]'/> > In this case the key in the map ends up as "62051" (String) rather than > 62051L (Long), and the value is again a String[]. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.