Sencha Touch 2: Insert into TreeStore/NestedList
I'm using a NestedList with a underlying TreeStore. Now I want to add items to the NestedList as leafs. How can I do this? Currently my code (Controller, onAddButtonTapped) looks like this: var store = Ext.getStore('menuStore'); var customerAreaNode = store.getRoot().getChildAt(1); customerAreaNode.appendChild({name: "text", leaf:true}); customerAreaNode.expand(); store.sync(); This code results in two new empty listentries on leaf level (behind the correct node) and one new listentry on node level. Every new entry has no names shown in the NestedList but every item contains "text" in their