ExtJs sends multiple XHR requests for each item when I delete delete

I have ExtJs (v3.1) `Ext.grid.GridPanel, which loads some records from its repository and allows editing.

If I select several records and I click the "Delete" button, it sends several DELETE requests, overloads the server, which ultimately deletes some of them, returns 404 for the rest.

I don’t understand why he sends the second or third request before the first one has failed, he just didn’t return.

this is the delete button handler

function onDelete() {
 var recs = userGrid.getSelectionModel().getSelections();
 userGrid.store.remove(recs); //delete multiple selections one at a time

}

and storage based

// Typical Store collecting the Proxy, Reader and Writer together
var store = new Ext.data.GroupingStore({
    proxy: proxy,
    reader: reader,
    writer: writer,
    sortInfo: { // Default sort by day decsending grouped by week
        field: 'day',
        direction: "DSC"
    }, groupField: 'week',


     batch: false, // update each record with an individual XHR request, the server doesnt process batch requests
});

this is a screenshot of firebug after i selected 5 entries and clicked delete

Screenshot of firebug after highlighting 5 records and clicking delete

+3
source share
2 answers

Give this line:

 batch: false, // update each record with an individual XHR request, the server doesnt process batch requests

, ... , , Ext, , .

( , HTTP-, , .)

+4

, , onCommitChanges() .

0

All Articles