How to clear proxy?
I am loading a list from the store which is getting data from a search engine in JSON format.
To the list, I have implemented the "ListPaging" plugin and the pagination is working fine.
It appropriately increments the "start" attribute to get the right data.
I am having a problem, if I am trying to reuse and reload the list with another set of data. As I want to reset the "start" property to 0. The store data gets cleared appropriately, but I am not able to clear the proxy data.
How do I approach this? has the clear api depricated for the proxy?
this following code is there in my controller.
var store = Ext.StoreManager.get('Projects');
store.data.clear(); // this works fine
store.getProxy().clear(); // Gives me the error "Uncaught TypeError: Object [object Object] has no method 'clear'"
store.getProxy().setExtraParam('start', '0'); // this sets it at 0, but then the ListPaging stops working and the 'start' value does not increment any more.
Thank you for your help.
I'm a but unclear what you're trying to acheive here - I can't imaging a sitation where I wouldn't use the loadPage method on the store.
Sorry, If I was unclear..
The list component is in the view and not in the store. I am using the store to just load data into the list component. All this is done through a controller.
everything is working fine.. just trying to figure out on how to reset 'start' / 'startParam' to 0. When new set of data is loaded.
i am probably shooting in the dark with this answer. have you tried creating a blank json file and load the empty json file.
I believe the loadPage method is the right one. Just use loadPage(1,...) for example instead of the normal load().
Documentation : http://docs.sencha.com/touch/2-0/#!/...ethod-loadPage