我使用dynatree并且一切正常但如果一个节点有大量项目我会收到错误。我已经阅读了有关设置enableUpdate(false);
功能的内容,但它也没有帮助。有什么想法吗?
var serviceParams = { Type: this._fieldName };
$("#tree").dynatree({
autoFocus: false,
clickFolderMode: 1,
initAjax: {
url: tree._serviceUrl + "/top",
data: jQuery.serializeJSON(serviceParams),
type: "POST",
contentType: "application/json; charset=utf-8",
dataType: "json"
},
onLazyRead: function(node) {
//this.enableUpdate(false);
var serviceParamsForChildren =
{
Type: tree._fieldName,
parentId: node.data.key,
includeDescedants: false
};
node.appendAjax({
url: tree._serviceUrl + "/Children",
data: jQuery.serializeJSON(serviceParamsForChildren),
type: "POST",
contentType: "application/json; charset=utf-8",
dataType: "json"
});
//this.enableUpdate(true);
},
onActivate: function(node) {
tree._selectedNode = node;
}
});
答案 0 :(得分:2)