initial load of the tree load root node (possibly hidden) and it's children
this.model.getRoot( dojo.hitch(this, function(item){ var rn = this.rootNode = new dijit._TreeNode({ item: item, tree: this, isExpandable: true, label: this.label || this.getLabel(item) }); if(!this.showRoot){ rn.rowNode.style.display="none"; } this.domNode.appendChild(rn.domNode); this._itemNodeMap[this.model.getIdentity(item)] = rn; rn._updateLayout(); // sets "dijitTreeIsRoot" CSS classname // load top level children this._expandNode(rn); }), function(err){ console.error(this, ": error loading root: ", err); } );