I am using the following code to render a dijit.Tree, as you can see from the picture I have these issues:
- The folder are marked with the "plus icon", but not children are present for any node.
- If I click on a folder the "plus icon" disappear (should never be there in first place).
Could you please tell me what am I doing wrong here?
this._tree = new Tree({
model: this._model,
showRoot: false,
autoExpand: false,
persist: false,
getLabel: function (item) {
return item.name;
}
});
this._tree.placeAt(this.node);
this._tree.startup();

This is due to the method
mayHaveChildrenof the model.You have to override this method to make it "smarter"... See : https://dojotoolkit.org/documentation/tutorials/1.6/store_driven_tree/
You can refer to this for an example:
Dijit Tree filtering and search not working on ObjectStoreModel