0

I have a store that I call like this:

var store = Ext.getStore('mysotreid');

mystoreid matches with mycomponent.mystore.

then I create a new instance of the store like this:

var newStore = Ext.create('mycomponent.mystore', {
            autoDestroy: true
        });

then I call the load for newStore like this:

newStore.load({
            callback: function(items) {
              ...
            }
);

The thing is that if I call var store = Ext.getStore('mysotreid') it is not the oldone store, but newStore. How can I load newStore without modifying the old store?

assembler
  • 3,098
  • 12
  • 43
  • 84

1 Answers1

1

The second one Ext.create('Ext.data.Store') with same storeId override reference. After that Ext.getStore('storeIdentifier'); has reference to last.

Look on fiddle: https://fiddle.sencha.com/#view/editor&fiddle/2sas

norbeq
  • 2,923
  • 1
  • 16
  • 20