`
topbox163
  • 浏览: 51962 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

后台 JAVA 接收 Flex 参数转为 MAP 类型

阅读更多

Main.mxml 部分代码

private function insert() : void {

var d : ArrayCollection = new ArrayCollection([
{name : "Lucy",nickName : "Jack.Daoson", role : "管理员", pwd : "123456", created_time : "2012-05-15 13:39"}
]);
rmDelData.convertMap(d); //rmDelData 为 RemoteObject ID
}

<fx:Declarations>

<s:RemoteObject id="rmDelData" destination="userDao"
result="rmDelData_resultHandler(event)"/>
</fx:Declarations>

Util.java
//转换为Map
public static void convertMap(ArrayCollection arrayCollection) {
try {
for (Object obj : arrayCollection) {
Map hashMap = (HashMap) obj;
Set setKey = hashMap.keySet();
for (Iterator it = setKey.iterator(); it.hasNext();) {
String key = it.next().toString();
System.err.println(key+"="+hashMap.get(key));
}
}
} catch (Exception e) {
e.printStackTrace();
}
}

有疑问,联系QQ:123296959
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics