extjs4.1 树形菜单问题
var Root = Ext.create("Ext.tree.Panel");Ext.Ajax.timeout = 60 * 60 * 60;Ext.data.Connection.timeout = 60 * 60 * 60;Ext.data.proxy.Server.timeout = 60 * 60 * 60;var treeNode = [];var webNode = { text: "网站相关", children: [ { text: "网站首页", leaf: true, id: "index"/*, handler: function () { window.open("/", "_blank"); }*/ }, { text: "网站基本信息", leaf: true, id: "basicInfo"/*, handler: function () { //MainPanel.add(createPanel()).show(); //MainPanel.doLayout(); }*/ } ]};treeNode.push(webNode);var cmsNode = { text: "信息网", children: [ { text: "网站首页", leaf: true, id: "index"/*, handler: function () { window.open("/", "_blank"); }*/ }, { text: "文章管理", leaf: true, id: "ArticleManage"/*, handler: function () { //MainPanel.add(createArticlePanel()).show(); //MainPanel.doLayout(); }*/ } ]};treeNode.push(cmsNode);var store = Ext.create('Ext.data.TreeStore', { root: { expanded: true, children: treeNode }});Root = Ext.create("Ext.tree.Panel", { title: "功能列表", rootVisible: false, store: store, listeners: { itemclick: function (view, record) { if (record.raw.handler) { record.raw.handler(); } else { ExtAlert("该节点未注册点击事件"); } } }});