-
26 Dec 2011 7:19 AM #1
Unanswered: Update a memory type proxy store with new data?
Unanswered: Update a memory type proxy store with new data?
Hi, I have a local variable with JSON data which I modify realtime. I load this variable as data in a NestedList component via store.
This is the variable:
This is my TreeStore:Code:var UInavPanel = {text:'My nav',items:[{text:'item1'},{text:'item2'}]};
This builds the NestedList with only the initial data, it doens'update it when a change in UInavPanel happens. How could be this done? I need when I modify the JSON data in UInavPanel, the nestedlist to rebuilds itself with the new data.Code:var leftPanelstore = new Ext.data.TreeStore({ model: 'LeftPanelListItem', root: UInavPanel, //autoSync:true, autoLoad: true, proxy: { type: 'memory', reader: { type: 'json', root: 'items' } } });
-
26 Dec 2011 8:10 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
- Answers
- 3156
Have you tried using loadData to load new data into the Store?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
26 Dec 2011 11:50 PM #3
Yes, I've tried, but it seems TreeStore doesn't have loadData method.
-
28 Dec 2011 7:39 AM #4
-
29 Dec 2011 3:01 AM #5
I solved it, but the solution seems dirty. The TreeStore has a method setRootNode(). I use it to load the changed object.


Reply With Quote