Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example with Ext.ux.Deferred
var dfd1 = Ext.create('Ext.ux.Deferred'),
dfd2 = Ext.create('Ext.ux.Deferred'),
dfd3 = Ext.create('Ext.ux.Deferred');
Ext.Ajax.request({
url: 'your/url',
success: function (data) {
dfd1.resolve(data);
},
failure: function (err) {
dfd1.reject(data);
}
});
Ext.Ajax.request({
url: 'your/url2',
success: function (data) {
dfd2.resolve(data);
},
failure: function (err) {
dfd2.reject(data);
}
});
Ext.Ajax.request({
url: 'your/url3',
success: function (data) {
dfd3.resolve(data);
},
failure: function (err) {
dfd3.reject(data);
}
});
Ext.ux.Deferred.when(dfd1, dfd2, dfd3).then(function (data1, data2, data3) {
console.log(data1, data2, data3);
}, function (err1, err2, err3) {
console.log(err1, err2, err3);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.