Hi all, i have a problem with my store that have autosync=true, i mean, when i add a new record my grid does not refresh.
i'm working at the same time with extjs 4.1.1 with another project and all works perfectly, but extjs 4.2.1 does not let me refresh my grid. this is a 4.2.1 bug?
Code:
Ext.define('siccar.store.storeListaAcreditados', {
extend: 'Ext.data.Store',
requires: [
'siccar.model.modelListaAcreditados',
'Ext.data.proxy.Ajax',
'Ext.data.reader.Json',
'Ext.data.writer.Json'
],
constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
autoLoad: false,
autoSync: true,
model: 'siccar.model.modelListaAcreditados',
storeId: 'storeListaAcreditados',
proxy: {
type: 'ajax',
afterRequest: function(request, success) {
if (request.action == 'create')
{
var jsonMsg = (request.operation.params.data.idsocio);
var vMsg=jsonMsg.msg; //msg :viene del Archivo PHP
Ext.Msg.alert('Actualizado',vMsg);
}
},
actionMethods: {
read: 'POST'
},
api: {
create: 'controller_acreditados/insertAcreditados',
read: 'controller_acreditados/readListaAcreditados',
update: 'controller_acreditados/updateAcreditados',
destroy: 'controller_acreditados/deleteAcreditados'
},
reader: {
type: 'json',
idProperty: 'idsocio',
root: 'data'
},
writer: {
type: 'json',
dateFormat: 'Y-m-d',
encode: true,
root: 'data'
}
}
}, cfg)]);
}