0
在我的應用程序中,我們使用了許多網格和許多ajax請求,我的要求是,如果會話超時,向用戶說alert msg並重定向到登錄頁面。Extjs Ext.data.Connection在「requestcomplete」中停止繼續進行進一步處理
對於我已經使用自Ext.data.Connection(「requestcomplete」事件),像下面..
Ext.util.Observable.observeClass(Ext.data.Connection);
Ext.data.Connection.on('requestcomplete', function (dataconn, response, option) {
if (IsSessionTimedOut) // its sets true when Session TimedOut
{
Ext.MessageBox.alert('Responce Status', 'Your session has expired.', function() {
RedirectToLogin() //});
// i neeed to break here (i.e it should not proceed further from where the request is made(store or ajax))
}
});
例如,如果Ajax調用「requestcomplete」後的它涉及到AJAX的成功事件。我需要在requestcomplete事件本身中斷,它不應該在會話超時時進入成功事件。
我試圖通過「返回false」它沒有制定出
它可以怎麼做?
在此先感謝