var tree=this.tree; var store=tree.model.store; if(this.node){ console.log(this.node) var children=this.node.getChildren(); for(var i=0;i<children.length;i++){ store.deleteItem(children[i].item) } var features=_featureset.features; for(var i=0;i<features.length;i++){ console.log(features[i].attributes[field]) var tdata={type:"feature",label:features[i].attributes[field],name: features[i].attributes[field],id:features[i]["oid"]+"("+i+")"}; store.newItem(tdata,{parent:node.item, attribute: 'children'}); } }