내가 알 수있는 바로는 직접 호출에 대해 Ajax.abort()
이 작동하지 않습니다 (서버에 전송 된 요청이 직접 엔진에서 자체적으로 처리하므로 서버에서 보낸 요청과 다릅니다).
/**
* A proxy class that ensures only the reponse to the last read request is
* processed.
*
* A quick user actions may result in more than one request sent to the server,
* but it is possible for the server to return a response to the second request
* before returning that of the first request. This will mean the the store
* will be populated with records that do not correspond to the latest user
* action.
*
*/
Ext.define('Ext.data.proxy.SerialDirect', {
extend: 'Ext.data.proxy.Direct',
alternateClassName: 'Ext.data.DirectSerialProxy',
alias: 'proxy.serialdirect',
doRequest: function(operation, callback, scope) {
this.callParent(arguments);
// Store the last read request
if (operation.request.action == "read") {
this.lastReadRequest = operation.request;
}
},
processResponse: function(success, operation, request, response, callback, scope) {
// abort if the request is a read one and does not correspond to the
// last read request
if (request.action == "read" && request != this.lastReadRequest)
return;
this.callParent(arguments);
}
});
TNX :
내가 직접 질문에 대답하고있어 확실하지 않다하지만
, 나는 솔루션과 같이되는 비슷한 시나리오를했다. 여기에 구현 완료 : http://code.tonytuan.org/2014/03/extjs-abort-store-connection-request.html – avidenic