View Full Version : Add a tree item to an other & REST

5 Dec 2011, 6:26 PM

I have defined an Ext.data.Model with a proxy type 'rest'. So I can create a new element based on that model and call the save method. That works!

Based on that model, I have a TreeStore that loads well too...

My problem is that I don't know how to bind the new element to the tree.
The best solution for me would be something like : adding the element to the tree and thanks to an autoSave option (or a custom listener) on the tree, it would send the post/put requests automatically.

I know how to get the selected item from the tree. But what I got is a model, not a store and I didn't found any method to append a child...

Hope my problem is clear enough...
I just want to add an item to the children of the selected tree item (or root if not selected) and that this one is automatically saved if possible.

6 Dec 2011, 7:49 AM
So, nobody knows how to add a tree item to another ? :s