我使用 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;
}
});