extjs4 添加树节点
来源:互联网 发布:abc算法流程图 编辑:程序博客网 时间:2024/06/06 12:31
var menuTree = Ext.create('Ext.tree.Panel', {
region: 'west',
id:'tree-panel',
title: 'title,
width: 180,
minSize: 150,
maxSize: 200,
split: true,
autoScroll: true,
autoHeight: false,
collapsible: true,
rootVisable: false, //不显示根节点
listeners: {
'itemclick': function(view, record, items, index, event, options){
event.stopEvent();
if (record.data.id == "20") {
window.location.href = './userexit.jsp';
}
else {
var node = record.data;
var module_html = index.html;
for (var k = 0; k < module.list.length; k++) {
if (node.id == module.list[k].id) {
module_html = '<iframe scrolling="no" frameborder="0" width="100%" height="100%" src="' + module.list[k].html + '"></iframe>';
}
}
var n = contentPanel.getComponent(node.id);
if(node.id!='root'){
if (!n) {
n = contentPanel.add({
'id': node.id,
'title': node.text,
closable: true,
html: module_html
});
}
}
contentPanel.setActiveTab(n);
}
}
},
root: ({
id: 'root',
text: '信息资源管理系统',
iconCls:'home',
draggable: false,
expanded: true
})
});
//通过root添加节点
var root=Ext.getCmp('tree-panel').getRootNode();
for( var i=0;i<module.list.length;i++ )
{
for( var j=0;j<permission_id.length;j++ )
{
if( module.list[i].id == permission_id[j] )
{
var childN = {
id: module.list[i].id,
text: module.list[i].name,
icon: module.list[i].icon,
leaf:true
}
root.appendChild(childN);
}
}
}
- extjs4 添加树节点
- extjs4 appendChild 添加节点后不显示问题的解决
- ExtJS4.1 树的单个节点刷新
- extjs4 treepanel、 树、节点的操作
- extjs4 treegrid动态增加树节点
- ExtJS4 树节点checkbox选中问题
- ExtJS4 添加行提醒
- extjs4自动选择子节点。
- extjs4 tree 节点选中问题
- 添加节点
- 添加节点
- 添加节点
- 创建节点、添加节点
- 创建节点添加节点
- ExtJS4 树
- Extjs4---grid添加搜索功能
- EXTJS4 tabpanel添加网页标签
- extjs4为列添加quicktips
- 在部署OLAT到myeclipse,数据库配置正确的情况下,出现异常:Error with hilo in NHibernate - “could not read a hi value - you
- 美国影视演员协会选择了Windows Azure
- 查看winxp系统多少位
- JS屏蔽功能类(屏蔽F5,退格键,空格键......)
- Unity 的Drawcalls
- extjs4 添加树节点
- OpenFileDialog类
- awk字符串中输出单引号
- 小任务:展示系列故障日志
- mplayer configure选项中文注释(MPlayer-1.0rc2)
- 组合(Composite)模式
- Magento An error occurred while saving the URL rewrite (索引刷不了怎么办)
- running a 32bit executable on a 64 ubuntu lucid
- 模板代码的组织方式