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”它没有制定出
它可以怎么做?
在此先感谢