Bonjour,

Je galère toujours avec mon dijit.Tree et mon JsonRestStore.
Je voudrais ajouter un noeud à mon Tree. J'ai suivi le tuto ici (chapitre "Programmatic Data Changes").
J'ai également suivi ce tuto pour la création de mon arbre.

Je vois bien qu'il est écrit pour dojo 1.6. J'utilise dojo 1.7, est-il compatible ?
Voici donc comment je procèdes pour le mettre à jour :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
var store = this.planItemsStore;
this.planItemsStore.get(selectedObject.id).then(function(selectedObject){
	alert("PUSH");
	// add a new child
	selectedObject.children.push({
		name: "New child",
		id: "new-child-id"
	});
	// save it with a put(). The tree will automatically update the UI
	store.put(selectedObject);
});
"PUSH" ne s'affiche jamais. Il ne passe pas dans ma méthode.
Pour info, "this.planItemsStore.get(selectedObject.id)" renvoi un "[Trial] dojo.Deferred {}" d'après firebug...