static/ext/src/data/Connection.js
function(request, xdrResult) {
        var me = this,
            options = request.options,
            result,
            success,
            response;

        try {
            result = me.parseStatus(request.xhr.status);
        } catch (e) {
            // in some browsers we can't access the status if the readyState is not 4, so the request has failed
            result = {
                success : false,
                isException : false
            };

        }
        success = me.isXdr ? xdrResult : result.success;

        if (success) {
            response = me.createResponse(request);
            me.fireEvent('requestcomplete', me, response, options);
            Ext.callback(options.success, options.scope, [response, options]);
        } else {
            if (result.isException || request.aborted || request.timedout) {
                response = me.createException(request);
            } else {
                response = me.createResponse(request);
            }
            me.fireEvent('requestexception', me, response, options);
            Ext.callback(options.failure, options.scope, [response, options]);
        }
        Ext.callback(options.callback, options.scope, [options, success, response]);
        delete me.requests[request.id];
        return response;
    }
function(request, xdrResult) {
        var me = this,
            options = request.options,
            result,
            success,
            response;

        try {
            result = me.parseStatus(request.xhr.status);
        } catch (e) {
            // in some browsers we can't access the status if the readyState is not 4, so the request has failed
            result = {
                success : false,
                isException : false
            };

        }
        success = me.isXdr ? xdrResult : result.success;

        if (success) {
            response = me.createResponse(request);
            me.fireEvent('requestcomplete', me, response, options);
            Ext.callback(options.success, options.scope, [response, options]);
        } else {
            if (result.isException || request.aborted || request.timedout) {
                response = me.createException(request);
            } else {
                response = me.createResponse(request);
            }
            me.fireEvent('requestexception', me, response, options);
            Ext.callback(options.failure, options.scope, [response, options]);
        }
        Ext.callback(options.callback, options.scope, [options, success, response]);
        delete me.requests[request.id];
        return response;
    }
function ( request , xdrResult ) { var me = this , options = request . options , result , success , response ; try { result = me . parseStatus ( request . xhr . status ) ; } catch ( e ) { // in some browsers we can't access the status if the readyState is not 4, so the request has failed result = { success : false , isException : false } ; } success = me . isXdr ? xdrResult : result . success ; if ( success ) { response = me . createResponse ( request ) ; me . fireEvent ( 'requestcomplete' , me , response , options ) ; Ext . callback ( options . success , options . scope , [ response , options ] ) ; } else { if ( result . isException || request . aborted || request . timedout ) { response = me . createException ( request ) ; } else { response = me . createResponse ( request ) ; } me . fireEvent ( 'requestexception' , me , response , options ) ; Ext . callback ( options . failure , options . scope , [ response , options ] ) ; } Ext . callback ( options . callback , options . scope , [ options , success , response ] ) ; delete me . requests [ request . id ] ; return response ; }
To be called when the request has come back from the server
@private
@param {Object} request
@return {Object} The response
To be called when the request has come back from the server