Zdeno
5 Mar 2010, 4:01 AM
I've got tool refresh with following handler function on my treepanel:
handler: function() {
userteamsstree.getRootNode().reload();
userteamsstree.expandAll();
}
Everything is fine until user press this button fast... then i see error on row 50201 in ext-js-debug.js coz cs is null. So if cs is null then this.childNodes is null too. And really when i close firebug i see only one node in treepanel ( no childnodes ) and every refresh ending with those error.
..
expandChildNodes : function(deep){
var cs = this.childNodes;
for(var i = 0, len = cs.length; i < len; i++) {
cs[i].expand(deep);
}
},
..
Next error is on line 8667
..
fxUnwrap : function(wrap, pos, o){
8662 var dom = this.dom;
8663 fly(dom).clearPositioning();
8664 fly(dom).setPositioning(pos);
8665 if(!o.wrap){
8666 var pn = fly(wrap).dom.parentNode;
8667 pn.insertBefore(dom, wrap);
8668 fly(wrap).remove();
8669 }
8670 },
..
Ofc everytime i get following JSON structure:
[{"text":"Team","id":"team_29","iconCls":"team","draggable":false,"children":[{"text":"User Name","id":"user_310","leaf":true,"iconCls":"user"}]}]
handler: function() {
userteamsstree.getRootNode().reload();
userteamsstree.expandAll();
}
Everything is fine until user press this button fast... then i see error on row 50201 in ext-js-debug.js coz cs is null. So if cs is null then this.childNodes is null too. And really when i close firebug i see only one node in treepanel ( no childnodes ) and every refresh ending with those error.
..
expandChildNodes : function(deep){
var cs = this.childNodes;
for(var i = 0, len = cs.length; i < len; i++) {
cs[i].expand(deep);
}
},
..
Next error is on line 8667
..
fxUnwrap : function(wrap, pos, o){
8662 var dom = this.dom;
8663 fly(dom).clearPositioning();
8664 fly(dom).setPositioning(pos);
8665 if(!o.wrap){
8666 var pn = fly(wrap).dom.parentNode;
8667 pn.insertBefore(dom, wrap);
8668 fly(wrap).remove();
8669 }
8670 },
..
Ofc everytime i get following JSON structure:
[{"text":"Team","id":"team_29","iconCls":"team","draggable":false,"children":[{"text":"User Name","id":"user_310","leaf":true,"iconCls":"user"}]}]