是否有会话超时后触发的事件?
为了定义我自己的侦听器,我使用以下属性禁用了默认侦听器:
<property as="xs:boolean" name="oxf.xforms.show-error-dialog" value="false"/>
我正在使用的 Java 脚本是:
ORBEON.xforms.Events.orbeonLoadedEvent.subscribe(function(eventName, eventData) {
var test=eventData.details;
alert(test);
});
我希望在发生会话超时时执行此脚本?我怎样才能执行这个?
最终,我想要实现的是我想在会话超时后显示我自己的错误消息。
In order to define my own listener, I have disabled the default one using the following property:
<property as="xs:boolean" name="oxf.xforms.show-error-dialog" value="false"/>
The Java Script I am using is:
ORBEON.xforms.Events.orbeonLoadedEvent.subscribe(function(eventName, eventData) {
var test=eventData.details;
alert(test);
});
I want this script to get executed when a session timeout occurs ? How can I execute this ?
Eventually, what I wanto achieve is that I want to display my own error message after a session timeout..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
发生会话超时时,不会发生客户端事件。这是严格发生在服务器上的事情。
如果您试图防止会话超时,
如果您尝试检测会话何时过期,并将用户重定向到另一个页面,您可以通过注册自己的 JavaScript 错误处理程序。
There is no client-side event happening when a session timeout occurs. This is something that happens strictly on the server.
If you are trying to prevent a session timeout, the session heartbeat feature should go a long way. In a nutshell, as long as users keep a page open, it will ensure that their session doesn't expired on the server.
If you are trying to detect when a session expired, and redirect users to another page, you can do so by registering your own JavaScript error handler.