this.inherited(arguments); var children = this.getChildren(); if(children.length == 0){ this.isExpandable = false; this.collapse(); } dojo.forEach(children, function(child){ child._updateLayout(); });