Created
January 28, 2014 13:52
-
-
Save ArnaudBuchholz/8668033 to your computer and use it in GitHub Desktop.
[ExtJS] Control Ext.data.Batch start for multiple stores serialization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var batch = new Ext.data.Batch(); | |
batch.start = function () {}; | |
// Sync your stores | |
myStore.sync({ | |
batch: batch | |
}); | |
// When done | |
delete batch.start; | |
batch.start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
By setting start at the object level, you override the prototype member and make sure that the batch won't start until you want it to start.
Once done, deleting the object member restores the prototype one visibility.