[英]Redirect to other view after timeout
I´ve implemented a proxy with a listener with the next exception : 我用下一个例外实现了一个带有侦听器的代理:
listeners: {
exception: function () {
Ext.Msg.alert(BB.Text.getText('ERROR_TIMEOUT_TITLE'), BB.Text.getText('ERROR_TIMEOUT_MSG') + '' + PROXY_TIMEOUT, Ext.emptyFn);
Ext.redirectTo('http://www.google.es'); //for example
}
}
After the message I would like to redirect to other page / view but It is not working correctly 收到消息后,我想重定向到其他页面/视图,但无法正常工作
What am I doing wrong?? 我究竟做错了什么??
Thanks. 谢谢。
For Sencha Touch 对于Sencha Touch
You probably want to read the documentation: 您可能想阅读文档:
Documentation 文档
http://docs.sencha.com/touch/2.4/apidocs/#!/api/Ext.app.Application-method-redirectTo
Quote 引用
Redirects the browser to the given url. 将浏览器重定向到给定的URL。 This only affects the url after the '#'. 这只会影响“#”之后的网址。
Read the second part very carefully. 仔细阅读第二部分。 By the way this is the same as : 顺便说一下,这与 :
MyApp.app.redirectTo('http://www.google.es')
It take it from your post that you want to redirect to a different page inside a webapp . 您需要从您的帖子中重定向到Webapp内的其他页面。 Can be found here 可以在这里找到
WebApp: window.location.href = "http://www.google.es"
我认为以下内容可以解决您的目的。
Ext.app.Application.redirectTo('http://www.google.es');
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.