
|
If you were logged in you would be able to see more operations.
|
|
|
|
Environment:
|
OS X 10.5.8 and Windows XP, Java 5
|
|
|
With the following Java:
private Map<String, List<String>> testMap = new BasicMap<String, String[]>(new HashMap<String, String[]>(2));
:
:
testMap.put("key1", new String[] {"val11", "val12", "val13"});
testMap.put("key2", new String[] {"val21", "val22", "val23"});
:
:
public Map<String, String[]> getMap() {
return testMap;
}
public void setMap(Map<String, String[]> map) {
testMap = new BasicMap<String, String[]>(map);
}
and the AS:
private function getHashHandler(event:ResultEvent):void {
var map:IMap = ResultEvent(event).result as IMap;
}
:
:
var map:IMap = new BasicMap();
map.put("fromFlex", String["d1", "d2", "d3"]);
sessionService.setMap(map);
:
:
Getting the map in Flex (remote call to getMap) seems to work fine. However,
setting the map from Flex (remote call to setMap) doesn't. Specifically,
debugging the Java shows the map with a String key (good), but an Object[] for
the value. The latter is not good. Any attempts to consume the value result in
coercion errors. Same issues appear to be with using the Collection classes specified in the generics.
|
|
Description
|
With the following Java:
private Map<String, List<String>> testMap = new BasicMap<String, String[]>(new HashMap<String, String[]>(2));
:
:
testMap.put("key1", new String[] {"val11", "val12", "val13"});
testMap.put("key2", new String[] {"val21", "val22", "val23"});
:
:
public Map<String, String[]> getMap() {
return testMap;
}
public void setMap(Map<String, String[]> map) {
testMap = new BasicMap<String, String[]>(map);
}
and the AS:
private function getHashHandler(event:ResultEvent):void {
var map:IMap = ResultEvent(event).result as IMap;
}
:
:
var map:IMap = new BasicMap();
map.put("fromFlex", String["d1", "d2", "d3"]);
sessionService.setMap(map);
:
:
Getting the map in Flex (remote call to getMap) seems to work fine. However,
setting the map from Flex (remote call to setMap) doesn't. Specifically,
debugging the Java shows the map with a String key (good), but an Object[] for
the value. The latter is not good. Any attempts to consume the value result in
coercion errors. Same issues appear to be with using the Collection classes specified in the generics.
|
Show » |
Sort Order:
|