maneljn
14 Jun 2012, 9:20 AM
i have this store in mvc structure
// Store para las aplicaciones definidas
Ext.define('esicontrol.store.aplicaciones', {
extend: 'Ext.data.Store',
model: 'esicontrol.model.aplicacion',
autoLoad: false,
remoteSort: true,
pageSize: 50,
proxy: {
type: 'direct',
paramAsHash: true,
extraParams: {
buscar: null
},
api: {
read: Ext.esinubeDirect.esicontrol_aplicaciones.getAplicacionesTodas
},
// Los datos llegan en json
reader: {
type: 'json',
root: 'data',
idProperty: 'apl_id',
totalProperty: 'total',
successProperty: 'success'
}
}
});
If i create multiple instances like this, it works fine, because in Storemanager, each instance is added separatedly.
But the problem is that the extraparams, is shared between all instances
store: Ext.create('esicontrol.store.aplicaciones', { id: Ext.id() } )
// Store para las aplicaciones definidas
Ext.define('esicontrol.store.aplicaciones', {
extend: 'Ext.data.Store',
model: 'esicontrol.model.aplicacion',
autoLoad: false,
remoteSort: true,
pageSize: 50,
proxy: {
type: 'direct',
paramAsHash: true,
extraParams: {
buscar: null
},
api: {
read: Ext.esinubeDirect.esicontrol_aplicaciones.getAplicacionesTodas
},
// Los datos llegan en json
reader: {
type: 'json',
root: 'data',
idProperty: 'apl_id',
totalProperty: 'total',
successProperty: 'success'
}
}
});
If i create multiple instances like this, it works fine, because in Storemanager, each instance is added separatedly.
But the problem is that the extraparams, is shared between all instances
store: Ext.create('esicontrol.store.aplicaciones', { id: Ext.id() } )