Ext.tree.DWRTreeLoader
来源:互联网 发布:软件质量保证计划案例 编辑:程序博客网 时间:2024/06/09 18:59
Ext.tree.DWRTreeLoader = function(config) {
// Ext.apply(this,config);
Ext.tree.DWRTreeLoader.superclass.constructor.call(this, config);
};
Ext.extend(Ext.tree.DWRTreeLoader, Ext.tree.TreeLoader, {
requestData : function(node, callback) {
if (this.fireEvent("beforeload", this, node, callback) !== false) {
// todo
// var params = this.getParams(node);
var callParams = new Array();
var success = this.handleResponse.createDelegate(this, [node,
callback], 1);
var error = this.handleFailure.createDelegate(this,
[node, callback], 1);
callParams.push(node.id);
if (typeof this.baseParams == 'object') {
for (var p in this.baseParams) {
callParams.push(this.baseParams[p]);
}
}
callParams.push({
callback : success,
errorHandler : error
});
// todo: do we need to set this to something else?
this.transId = true;
this.dataUrl.apply(this, callParams);
} else {
// if the load is cancelled, make sure we notify
// the node that we are done
if (typeof callback == "function") {
callback();
}
}
},
processResponse : function(response, node, callback) {
try {
for (var i = 0; i < response.length; i++) {
var n = this.createNode(response[i]);
if (n) {
node.appendChild(n);
}
}
if (typeof callback == "function") {
callback(this, node);
}
} catch (e) {
this.handleFailure(response);
}
},
handleResponse : function(response, node, callback) {
this.transId = false;
this.processResponse(response, node, callback);
this.fireEvent("load", this, node, response);
},
handleFailure : function(response, node, callback) {
this.transId = false;
this.fireEvent("loadexception", this, node, response);
if (typeof callback == "function") {
callback(this, node);
}
}
});
- Ext.tree.DWRTreeLoader
- Ext 3 - Dwr 数据交互 DWRTreeLoader
- Ext tree
- Ext Tree
- Ext tree
- Ext----tree
- EXT TREE
- EXT tree
- DwrTreeLoader的使用
- Ext.data-Tree/Node
- Ext.widgets-Tree
- Ext tree实例
- Ext的tree
- Ext.data-Tree/Node
- Ext.widgets-Tree
- Ext.data-Tree/ Node
- Ext.widgets-Tree
- Ext.tree.TreePanel扩展
- 浙大PAT 1004题 1004. Counting Leaves
- 浙大PAT 1005题 1005. Spell It Right
- 数据包的读写---(九)
- eclipse执行编译后的类文件抛出Could not find the main class: 异常解决方案之一
- 开源 免费 java CMS - FreeCMS-数据对象-linkClass
- Ext.tree.DWRTreeLoader
- jdk内置工具(一)
- 浙大PAT 1006题 1006. Sign In and Sign Out
- 正则表达式30分钟入门教程
- 汇编-矩阵相乘
- 音乐播放器移植到开发板上
- 浙大PAT 1007题 1007. Maximum Subsequence Sum
- linux常用命令
- 函数调用中栈帧内容