I'm building an application using Ext Js MVC approach.
I have a couple of combos on different views bound to one store. The store is set to query: remote and autoLoad: false and loads its data from server.
The problem every time I change the view (the old view is destroed) and expand the combo, the store will reload its data. Is there any way to force the store to load its data only once ? When the store is once loaded it will not reload it again even the bound combo is destroed.
There are ways to do this on the combobox itself but I think the easiest way for you is to subscribe to the load event of the store and check if the store contains records, if so abort the loading.
store.on('beforeload', function(s){
return !s.count() > 0;
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With