1、前台
<br>
$(function(){<br>
$('#tt').tree({<br><br>
url:'menu2_find',<br>
lines:true,<br>
});<br>
});<br>
请问jquery-easyui+struts2 实现tree的后台怎么实现
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
2条回答 默认 最新
- QiangGe2Dai 2013-07-29 11:10关注
public class Tree {
private int id;
private String text;
private boolean leaf;
private List children;
}Action:
List trees = new ArrayList();Tree root = new Tree(); root.setText("root"); root.setLeaf(false); root.setId(1); trees.add(root); List<Tree> childrenList = new ArrayList<Tree>(); benzList.add... childrenList.setChildren(childrenList); JSONArray jsonObject = JSONArray.fromObject(trees);
大概这样
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报