factory层数据:
//取得返回flex前端Map数据的方法
public Map<String, List<StatVO>> getStatInfo(QueryVO queryVO) throws Exception {
log.info("INTO StatDomImpl.getStatInfo method!");
Map<String, List<StatVO>> map=new HashMap<String, List<StatVO>>();
listTrust=statDao.getStatInfo(queryVO);
map.put("trustList",listTrust);
List<StatVO> listEnd=new ArrayList<StatVO>();
listEnd=statDao.getStatInfo(queryVO);
map.put("endList",listEnd);
return map;
}
flex端:
private var list:ArrayCollection;
private var list1:ArrayCollection;
private var list2:ArrayCollection;
//解析Java返回的Map数据
private function getStatInfoResult(e:ResultEvent):void
{
list=e.result as Object;
list1=list.trustList;
list2=list.endList;
for each (var obj:Object in list1)
{
Alert.show(obj.trustNum);
}
}
Attention:返回类型一定要转换为Object类型。StatVO中存放字段trustNum。
//取得返回flex前端Map数据的方法
public Map<String, List<StatVO>> getStatInfo(QueryVO queryVO) throws Exception {
log.info("INTO StatDomImpl.getStatInfo method!");
Map<String, List<StatVO>> map=new HashMap<String, List<StatVO>>();
try{
//
List<StatVO> listTrust=new ArrayList<StatVO>();listTrust=statDao.getStatInfo(queryVO);
map.put("trustList",listTrust);
List<StatVO> listEnd=new ArrayList<StatVO>();
listEnd=statDao.getStatInfo(queryVO);
map.put("endList",listEnd);
return map;
}
flex端:
private var list:ArrayCollection;
private var list1:ArrayCollection;
private var list2:ArrayCollection;
//解析Java返回的Map数据
private function getStatInfoResult(e:ResultEvent):void
{
list=e.result as Object;
list1=list.trustList;
list2=list.endList;
for each (var obj:Object in list1)
{
Alert.show(obj.trustNum);
}
}
Attention:返回类型一定要转换为Object类型。StatVO中存放字段trustNum。