Skip to content Skip to sidebar Skip to footer

Extjs Restful Store, Sending Request In Batch?

I created a Grid component with the store configuration like this: //Create the store config.store = new Ext.data.Store({ restful: true, autoSave: false,

Solution 1:

Just for those who might wonder why it's not batch:

As for the documentation stated,

If Store is RESTful, the DataProxy is also RESTful, and a unique transaction is generated for each record.

Which is true if you look into the source code of Ext.data.Store in /src/data/Store.js

Line 309, in @constructor

// If Store is RESTful, so too is the DataProxyif (this.restful === true && this.proxy) {
    // When operating RESTfully, a unique transaction is generated for each record.// TODO might want to allow implemention of faux REST where batch is possible using RESTful routes only.this.batch = false;
    Ext.data.Api.restify(this.proxy);
}

And so this is why I realize when I use restful, my batch will never get changed to true.

Solution 2:

You read the docs correctly; it is supposed to work that way. It's something to consider whenever choosing whether to use RESTful stores on your grids. If you're going to need batch operations, RESTful stores are not your friends. Sorry.

Post a Comment for "Extjs Restful Store, Sending Request In Batch?"