add an error event to the rpc client

This commit is contained in:
Damien Churchill 2009-08-11 22:53:53 +00:00
parent 074c2f85a5
commit ba909ebcc9
1 changed files with 5 additions and 1 deletions

View File

@ -58,7 +58,9 @@ Ext.namespace('Ext.ux.util');
* Fires when the client has retrieved the list of methods from the server.
* @param {Ext.ux.util.RpcClient} this
*/
'connected'
'connected',
'error'
);
this.reloadMethods();
},
@ -109,6 +111,7 @@ Ext.namespace('Ext.ux.util');
} else {
options.failure(errorObj, response, requestOptions);
}
this.fireEvent('error', responseObj, response, requestOptions)
},
_onSuccess: function(response, requestOptions) {
@ -121,6 +124,7 @@ Ext.namespace('Ext.ux.util');
} else {
options.failure(responseObj, response, requestOptions);
}
this.fireEvent('error', responseObj, response, requestOptions)
} else {
if (Ext.type(options.success) != 'function') return;
if (options.scope) {