当我使用休闲功能创建子节点时,新创建的节点不在树节点中查看。但使用按 F5 键重新加载页面。在树节点中显示新创建的节点如何在不重新加载网页的情况下查看节点?
createSubCategory: function() {
dt = new Date();
id = dt.format('U');
name = 'New Sub-Category'
if(this.treepanelSkillCat.selModel.selNode == null)
{
Ext.MessageBox.show({
buttons: Ext.MessageBox.OK,
icon:Ext.MessageBox.ERROR
});
return false;
}
var parent = this.treepanelSkillCat.selModel.selNode.id;
var newNode = new Ext.tree.AsyncTreeNode({id: id, text: name, leaf: false});
form_data = {'SKL_CAT_ID': id , 'SKL_CAT_NAME' : name, 'PARENT_SKL_CAT_ID' :parent };
this.nodeAction = 'addtotree';
this.selNode = newNode;
this.submitNode(form_data,'addtotree');
this.treepanelSkillCat.selModel.selNode.appendChild(newNode);
},