I am using Extjs 4.0 , and I need a callback method for store.sync() method? Does anyone have a solution? Thanks a lot!
This should work starting from 4.1:
store.sync({
            success: function()
            {
                console.log("success!!");
            },
            failure: function()
            {
                console.log("failed...");
            },
            callback: function()
            {
                console.log("calling callback");
            },
            scope: this
        });
                        you can catch the result of each method in your store with
Ext.define('AM.store.AdreessStore', {
    extend:'Ext.data.Store',
....
   onCreateRecords:function (records, operation, success) {
   },
    onUpdateRecords:function (records, operation, success) {
    },
    onDestroyRecords:function (records, operation, success) {
    }
...
}
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With