EasyUI Forum
April 19, 2024, 08:59:11 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: User combotree return json string problem  (Read 17566 times)
mars610
Newbie
*
Posts: 13


View Profile Email
« on: July 19, 2011, 07:26:47 PM »

Hi, I use combotree to show tree data, I found combotree receive json string like this:
[{
   "id":1,
   "text":"Folder1",
   "iconCls":"icon-ok",
   "children":[{
      "id":2,
      "text":"File1",
      "checked":true
   },{
      "id":3,
      "text":"Folder2",
      "state":"open",
      "children":[{
         "id":4,
         "text":"File3",
         "attributes":{
            "p1":"value1",
            "p2":"value2"
         },
         "checked":true,
         "iconCls":"icon-reload"
      },{
         "id": 8,
         "text":"Async Folder",
         "state":"closed"
      }]
   }]
},{
   "text":"Languages",
   "state":"closed",
   "children":[{
      "id":"j1",
      "text":"Java"
   },{
      "id":"j2",
      "text":"C#"
   }]
}]


but our project framework used 'Struts2' and struts2-json-plugin return json string , and data like this:
{"data":[{"children":[],"id":6,"text":"org6"}]}

the return json string add 'data' key, How should I let it parse the data, or return to the format defined
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!