Flex JAVA Map BlazeDS 参数的传递

 

1、java 返回Map
   
   public Map findFilesByFolderid(String folderid, PageInfo pageInfo) {
    Map map = new HashMap();
    String queryString = "from TFile t where t.folderid = ?";
    Object[] parameters = new Object[] {folderid};
    List fileList = this.findPageByQuery(queryString, parameters, pageInfo);
    map.put("pageInfo", pageInfo);
    map.put("fileList", fileList);
    return map;
   }
   
   flex解析
   fileArr = event.result["fileList"] as ArrayCollection;
   pageInfo = event.result["pageInfo"] as PageInfo;
   
   2、Flex构造Map调用Java
   java
   @RemotingInclude
   public Map testMap(Map map2) {
    Map map = new HashMap();
    map.put("string", "fuck you");
    
    List list = new ArrayList();
    list.add("1");
    list.add("2");
    map.put("list", list);
    return map;
   }
   
   flex构造Map
   public function moveFile_clickHandler(event:MouseEvent):void
   {
    var map:Object = new Object();
    map["A"] = "aaa";
    map["B"] = "bbb";
    testmap.token = fileWSImpl.testMap(map);
   }

你可能感兴趣的:(Flex,Flex,JAVA,Map,BlazeD)