0

少し問題があります。今回は、Ext.grid.plugin.RowEditing で行を更新するたびに sql でコンサルトを行うことにしました。問題がある場所にコードの一部を貼り付けます。

   var gridTablaConsulta = Ext.create('Ext.grid.GridPanel', {
    title:'Consulta Tabla lotes',
    store: storeTabla,
    columns: [
        Ext.create('Ext.grid.RowNumberer'),
        {text: "NRBE", width: 60, sortable: true, dataIndex: 'NRBE'},
        {text: "APLIC", width: 60, sortable: true, dataIndex: 'APLIC'},
        {text: "FORM", width: 60, sortable: true, dataIndex: 'FORM'},
        {text: "VERFOR", width: 60, sortable: true, dataIndex: 'VERFOR'},
        {text: "FECLOT", width: 60, sortable: true, dataIndex: 'FECLOT'},
        {text: "HORLOT", width: 60, sortable: true, dataIndex: 'HORLOT'},
        {text: "TIPPAPLO", width: 60, sortable: true, dataIndex: 'TIPPAPLO'},
        {text: "TAMPAP", width: 60, sortable: true, dataIndex: 'TAMPAP'},
        {text: "FECINIIM", width: 60, sortable: true, dataIndex: 'FECINIIM'},
        {text: "FECINIOB", width: 60, sortable: true, dataIndex: 'FECINIOB'},
        {text: "ESTLOT", width: 60, sortable: true, dataIndex: 'ESTLOT'},
        {text: "TOTPAGGE", width: 60, sortable: true, dataIndex: 'TOTPAGGE'},
        {text: "TOTPAGIM", width: 60, sortable: true, dataIndex: 'TOTPAGIM'},
        {text: "DESLOT", width: 60, sortable: true, dataIndex: 'DESLOT'},
        {text: "TIPDIF", width: 60, sortable: true, dataIndex: 'TIPDIF', editor: {xtype:'textfield', allowBlank:false}},
        {text: "DIADIF", width: 60, sortable: true, dataIndex: 'DIADIF', editor: {xtype:'textfield', allowBlank:false} },
        {text: "FECALT", width: 60, sortable: true, dataIndex: 'FECALT'},
        {text: "FECMOD", width: 60, sortable: true, dataIndex: 'FECMOD'},
        {text: "TERMOD", width: 60, sortable: true, dataIndex: 'TERMOD'},
        {text: "HORMOD", width: 60, sortable: true, dataIndex: 'HORMOD'}
    ],
    selType: 'rowmodel',
    plugins: [
        Ext.create('Ext.grid.plugin.RowEditing', {
            clicksToEdit: 2
        })
    ],

    listeners: {
        edit: function(e){
            Ext.Ajax.request({
                url: 'http://localhost:8080/MyMaver/ServletTablaLotes',
                method: 'POST',

                params: {
                    Funcionalidad: 'Modificar',
                    DPNrbe: Ext.getCmp('DPNrbe').getValue(),
                    DPAplic: Ext.getCmp('DPAplic').getValue(),
                    DPForm:Ext.getCmp('DPForm').getValue(), 
                    DPVersFor: Ext.getCmp('DPVerFor').getValue(),
                    DPFecLot: Ext.getCmp('DPFecLot').getValue(),
                    DPHorLot: Ext.getCmp('DPHorLot').getValue(),
                    DPTippApl: Ext.getCmp('DPTippApl').getValue(),
                    DPTamPap: Ext.getCmp('DPTamPap').getValue(),
                    DPFecinIm: Ext.getCmp('DPFecinIm').getValue(),
                    DPFeciNio: Ext.getCmp('DPFeciNio').getValue(),
                    DPEstLot: Ext.getCmp('DPEstLot').getValue(),
                    DPTotPagge: Ext.getCmp('DPTotPagge').getValue(),
                    DPTotPagim: Ext.getCmp('DPTotPagim').getValue(),
                    DPDesLot: Ext.getCmp('DPDesLot').getValue(),
                    DPTipDif: Ext.getCmp('DPTipDif').getValue(),
                    DPDiaDif: Ext.getCmp('DPDiaDif').getValue(),
                    Entorno:  Ext.getCmp('Entorno').getValue()
                 },
                success: function(){

                      var text = response.responseText;
                        // process server response here
                      respuestaModificacion(text);

                    },
                    failure:  function (){
                    alert("Desde failure");
                    },
                    exception: function (){
                   alert("Desde exception");
                 }
            });
        }
    }


});

更新をプッシュするときにroxで行った変更を保存する必要がある部分に問題があります。この DPNrbe: Ext.getCmp('DPNrbe').getValue(), は間違っていると思いますが、SQL コンサルトを修正するためにここに入力する必要があります。

次に SQL でコンサルトを行う必要があるため (変更値を使用した更新)、変更されていないキャンプであっても、行のすべての値を保存する必要があります。

ありがとうございました。

4

1 に答える 1