dedoz
21 Jun 2012, 11:45 PM
hi , with this code
this.store1 = Ext.create('MUI.store.persona');
this.store1.getProxy().extraParams = {scope : 'minimal'};
this.store1.load();
this.store2 = Ext.create('MUI.store.persona');
this.store2.load(); // sends scope:minimal
so setting the extraParams for the first instance (store1), will set that extraParam for all new instances ?
thats sad D:
also loading 1 record using model load method, will have the same extraParams
MUI.store.persona.load(1); /// sends extraParams other stores/model instances setted
so all instances of a model share the same instance of the proxy ?
in the code u dont know if someone else (instance) setted params or not, and if u set the extraParam = {} to be sure nothing else is sent, then u delete other instances params D:
each store cant have its own extraParams ? D: its not the same as doing store.load({params:...}) because this way those params are lost.
or im doing something wrong ? should i set extraParams for each instance in another way ? should i declare a new proxy config for each time i create a store instance of the same model ? wich is ugly :d
this.store1 = Ext.create('MUI.store.persona');
this.store1.getProxy().extraParams = {scope : 'minimal'};
this.store1.load();
this.store2 = Ext.create('MUI.store.persona');
this.store2.load(); // sends scope:minimal
so setting the extraParams for the first instance (store1), will set that extraParam for all new instances ?
thats sad D:
also loading 1 record using model load method, will have the same extraParams
MUI.store.persona.load(1); /// sends extraParams other stores/model instances setted
so all instances of a model share the same instance of the proxy ?
in the code u dont know if someone else (instance) setted params or not, and if u set the extraParam = {} to be sure nothing else is sent, then u delete other instances params D:
each store cant have its own extraParams ? D: its not the same as doing store.load({params:...}) because this way those params are lost.
or im doing something wrong ? should i set extraParams for each instance in another way ? should i declare a new proxy config for each time i create a store instance of the same model ? wich is ugly :d