1、前台
<br> $(function(){<br> $('#tt').tree({<br><br> url:'menu2_find',<br> lines:true,<br> });<br> });<br>
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);
大概这样
在跳到含有树的jsp的action中拼装json,url的值为传到jsp页面的值为json串的变量,在action中你可以参考[url]http://zyn010101.iteye.com/blog/955989[/url]