Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/270.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Extjs 4存储同步问题_Php_Extjs_Extjs4 - Fatal编程技术网

Php Extjs 4存储同步问题

Php Extjs 4存储同步问题,php,extjs,extjs4,Php,Extjs,Extjs4,我有以下代码: 商店: 网格具有以下属性: 在控制器中,我有一个监听器,用于在每次单元更新时同步存储 但是在我更新时执行的PHP文件中,如果我打印$\u POST,则发送的记录是正确的,但它从不发送编辑行的id。从服务器发送记录时,是否发送id?通过添加一列数据索引进行验证:“id”好的,在我的模型中id是“id”,而id中的上限I不起作用,我已将其更改为下限I并正确发送id,谢谢。@SensacionRC如果您希望字段是“id”而不是“id”,请使用您模型的配置“idProperty”。

我有以下代码:

商店:


网格具有以下属性:


在控制器中,我有一个监听器,用于在每次单元更新时同步存储


但是在我更新时执行的PHP文件中,如果我打印
$\u POST
,则发送的记录是正确的,但它从不发送编辑行的id。

从服务器发送记录时,是否发送id?通过添加一列数据索引进行验证:“id”好的,在我的模型中id是“id”,而id中的上限I不起作用,我已将其更改为下限I并正确发送id,谢谢。@SensacionRC如果您希望字段是“id”而不是“id”,请使用您模型的配置“idProperty”。
Ext.define('strClientesRECO', {
    extend: 'Ext.data.Store',
    model: 'mdlClientesRECO',
    autoLoad: false,
    proxy: {
        type: 'ajax',
        pageParam: undefined,
        startParam: undefined,
        limitParam: undefined,
        api: {
            read: 'some url',
            create: 'some url',
            update: 'some url',
        },
        reader: {
            type: 'json',
            root: 'data',
            successProperty: 'success',
            messageProperty: 'message'
        },

        writer: {
            root: 'records',
            encode: true,
            writeAllFields: false
        }
    }
});
selModel: Ext.create('Ext.selection.CheckboxModel'),
selType: 'cellmodel',
plugins: [{
   ptype: 'cellediting',
   clicksToEdit: 2
}],
Ext.ComponentQuery.query('viewGridClientesRECO')[0].getStore().addListener('update', this.onUpdateRecords, this);
onUpdateRecords: function() {
    var storeGridClientes = Ext.ComponentQuery.query('viewGridClientesRECO')[0].getStore();
    storeGridClientes.sync();
},