Struts2的后退按钮和链接 [英] Struts2 back button and linking

查看:205
本文介绍了Struts2的后退按钮和链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Struts 2.1.6使用Dojo插件,整个应用程序具有AJAX链接(SX:A)。

I am using Struts 2.1.6 with Dojo plugin, whole app has ajax links (sx:a).

有没有人成功实现后退按钮功能和链接到特定内容?

Did anybody succeed to implement back button functionality and linking to certain content?

没有任何人有任何经验,如何实现?我计划执行(如果没有很好的解决办法的话)像这样:

Does anybody have any experience how to implement? I am planning to implement (if there is no good solution already) something like so:


  • 与JS,我可以读取并得到适当的内容,然后用notifyTopics发布它改变(添加参数)地址栏中的链接。

或者我应该只是改变整个应用程序使用jQuery插件?做jQuery的有后退按钮好的解决办法和AJAX页面链接?

Or should I just change whole app to use jQuery plugin? Do jQuery has good solutions for back button and linking on ajax pages?

推荐答案

我曾尝试使用Struts 2道场和实施的后退按钮。你已经大大超过Struts 2中的Ajax实现的负责人。他们主要使用并写来写简单快捷的ajax函数调用,而不是非常适合更广泛的用途。另外,当你一切都做得那么:头主题='阿贾克斯'标签;支柱将导入每个Ajax JS文件你'五一'需要杀死加载时间。

I have tried to use Struts 2 with dojo and implement the back button. You are already way over the head of Struts 2's ajax implementation. They mainly used and wrote it to write simple and quick ajax function calls and is not very well suited for more extensive uses. Plus when you do s:head theme='ajax' tag; struts will import every ajax js file you 'may' need which kills load time.

我建议要么1.了解Dojo和利用图书馆的独立支柱2或者2的获取jQuery的,我能够实现一个后退按钮功能比较简单(更何况那么Struts 2的主题='AJAX')。

I would suggest either 1. Learn dojo and use the library independent of struts 2. Or 2. Get jQuery, I was able to implement a back button functionality relatively simple (more so then struts 2 theme='ajax').

这篇关于Struts2的后退按钮和链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆