-
31 Oct 2012 9:26 AM #1
Unanswered: Nested List Refresh
Unanswered: Nested List Refresh
Scenario:
I have a nested list which loads from a store (via proxy). I want to be able to refresh the list every hour and on pull down. I have the timer and the pull down set up but I'm having trouble with the actually reload.
Problem:
If you just get the store and call .load(), then it refreshes the list, but if you are anywhere but the root of the list it leaves you with a blank screen. So far the only way round this I've found is to use another function to return to the root of the list before refreshing, something like this:
This is in a controller function which gets called:This is in either the pull down refresh function or the timer function:Code:this.getProductlist().goToNode(Ext.getStore('ProductStore').getRoot());but this is a workaround, I don't want it to go back to the root at all.Code:Ext.getStore('ProductStore').load();
So my question is this, how do I refresh a NESTED LIST, from anywhere inside the nested list structure, without it leaving me with a blank screen.
-
2 Nov 2012 5:09 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,107
- Vote Rating
- 453
- Answers
- 3155
If you are on a list and load the treestore again doesn't mean that the child store is going to get the updated data.
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.


Reply With Quote