View Full Version : Allow tree node to be reloaded after a tree loader loadexception

27 Mar 2009, 7:54 AM
If the loader fails loading of a node, it leave the loading icon and you cannot reload the node. I suggest when you do get a load exception you use this extension and call this method:

Ext.apply(Ext.tree.TreeNodeUI.prototype, {
revertLeavedState : function() {
this.wasLeaf = true;
var expandable = this.node.attributes.expandable;
this.node.attributes.expandable = true;
this.node.expanded = false;
this.node.attributes.expandable = expandable;
this.node.loaded = false;
this.node.loading = false;

It returns the node to being collapsed and allows the node to be expanded & reloaded again.