有没有办法检测“背部”? Java EE Web 应用程序的按钮?
环境:
- Spring最新
- 使用Spring Web flow 2
- Spring MVC
- Jetty服务器
在调用缺少所需参数的webflow的情况下,我想为开发人员打印一条消息(我通过子类化FlowController来完成此操作)。当网络流完成并且用户点击后退按钮时,问题就会出现。在这种情况下,我想重定向到另一个页面(静态)。
如果这是在流程中,我将使用侦听器来执行此操作,但网络流程已结束。因此,按后退按钮会产生尝试启动另一个网络流的效果。
有没有办法检测网络流之外的“后退按钮”?
或者任何其他建议都会有帮助。
Environment:
- Spring latest
- Using Spring Web flows 2
- Spring MVC
- Jetty server
In the situation where evoking the webflow with required parameters missing I want to print a message for the developers (I have done this by subclassing FlowController). The problem comes in when the webflow is complete and the user hits the back button. In this case I would like to redirect to another page(static).
If this were in the flow I would use a listener to perform this action, but the webflow has ended. So pressing the back button has the effect of trying to start another webflow.
Is there a way to detect the "back button" outside of the webflow?
Or any other suggestions would be helpful.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不是检测反向导航,而是将 Webflow 的最后部分设置为不启动新流,而是进行重定向。
Rather than detecting the back-navigation, instead set up the last part of the webflow to not start a new flow, but instead do the redirect.