标签:
真的日了狗了的难忘经历....
自己根据官网进行遍历获取children节点,勉强能用,后面各种bug...
然后发现...用extJS可以直接根据id、pid生成树。日了狗了!!!
加上extJS,然后后台直接返回一个json数组即可。
[ { "createdatetime": "2014-02-19 01:00:00", "cstate": 0, "description": "用户列表", "icon": "icon-btn", "iconCls": "icon-btn", "id": 131, "name": "列表", "pid": 13, "resourcetype": 1, "seq": 0, "url": "/user/dataGrid" }, { "createdatetime": "2014-02-19 01:00:00", "cstate": 0, "description": "用户查看", "icon": "icon-btn", "iconCls": "icon-btn", "id": 135, "name": "查看", "pid": 13, "resourcetype": 1, "seq": 0, "url": "/user/view" } ]
就是这么简单。。。
标签:
原文地址:http://my.oschina.net/u/2259804/blog/478879