Extjs示例中的静态加载如何换为动态加载?
Extjs有这样一个例子,下面是加载数据代码,但这里使用的是静态数据,我想换为动态加载,但不知道怎么办。
ApiPanel = function() {
ApiPanel.superclass.constructor.call(this, {
id:'api-tree',
region:'west',
split:true,
header: false,
width: 280,
minSize: 175,
maxSize: 500,
collapsible: true,
margins:'0 0 5 5',
cmargins:'0 0 0 0',
rootVisible:true,
lines:false,
autoScroll:true,
animCollapse:false,
animate: false,
collapseMode:'mini',
loader: new Ext.tree.TreeLoader({
preloadChildren: true,
clearOnLoad: false
}),
root: new Ext.tree.AsyncTreeNode({
text:'ROOT',
id:'root',
expanded:true,
children:[Docs.classData]
}),
collapseFirst:false
});
// no longer needed!
//new Ext.tree.TreeSorter(this, {folderSort:true,leafAttr:'isClass'});
this.getSelectionModel().on('beforeselect', function(sm, node) {
return node.isLeaf();
});
};
ApiPanel = function() {
ApiPanel.superclass.constructor.call(this, {
id:'api-tree',
region:'west',
split:true,
header: false,
width: 280,
minSize: 175,
maxSize: 500,
collapsible: true,
margins:'0 0 5 5',
cmargins:'0 0 0 0',
rootVisible:true,
lines:false,
autoScroll:true,
animCollapse:false,
animate: false,
collapseMode:'mini',
loader: new Ext.tree.TreeLoader({
preloadChildren: true,
clearOnLoad: false
}),
root: new Ext.tree.AsyncTreeNode({
text:'ROOT',
id:'root',
expanded:true,
children:[Docs.classData]
}),
collapseFirst:false
});
// no longer needed!
//new Ext.tree.TreeSorter(this, {folderSort:true,leafAttr:'isClass'});
this.getSelectionModel().on('beforeselect', function(sm, node) {
return node.isLeaf();
});
};
...全文
相关推荐
ExtJS 轻松搞定
初学者快速入门的书籍,轻松搞定ExtJS
ExtJs 实现动态加载grid完整示例
Ext3.3完整包 Ext3.3中文文档 数据表的结构是:数据表table > 记录record > 字段 store的结构是: Ext.data.Store > Ext.data.Record>Ext.dataDataField store 首先驱动 DataProxy 加载数据 ,DataProxy加载完成会驱动 DataReader时行解析,最终获得Record对象。 1.bean : 代码如下: package com.leo.bean; public class Person { private String name; private int age; private Strin
ExtJS静态使用示例
ExtJS示例,Grid的使用,Panle的使用,树的使用
extjs4.x tabpanel 动态加载panel和html例子
js代码,实现了 extjs4.x tabpanel 动态加载panel和html的功能
extjs实现动态树加载菜单
extjs实现动态树加载菜单


