On 27/01/2009, at 4:57 AM, Matthew Seaborn wrote:

As I have grid of checkboxes I am currently trying to use embedded maps as arguments in Struts 2, for example using

@CreateIfNull( value = true )
@Element( value = HashMap.class )
public Map<Integer, Map<Integer, Boolean>> getTestMap() {
return testMap;
}

Using

/testAction.action?testMap[1][2]=true

Although it places the value in the right place, it is always

ognl.noConversionPossible



Hi Matt,
I haven't tried this myself, but I'd take the following steps to try to isolate it:

1. instantiate the empty map of maps yourself prior to the params getting set. Erasure may be preventing OGNL from instantiating the inner map because it can't determine the type.

2. I'd try quoting those numbers so it's unambiguous that it's addressing an entry and not an index. Shouldn't matter though, but I don't trust it.




Reply via email to