如何在struts 2中实现swf地址导航
我想在struts 2中实现swf地址导航,如twitter和facebook导航。我的意思是说,对于每个页面,用户导航页眉和页脚以及网站上的一些常见组件不会为每个用户导航加载。在像 twitter 和 facebook 这样的一些网站中,他们通过将“#”连接到每个用户导航所需的页面名称的当前 url 来完成 swf 地址实现。所以我想在 struts 2 中实现同样的事情。那么我该如何实现它。
I want to implment swf address navigation in struts 2 like twitter and facebook navigation. I meant to say for each page user navigation header and footer and some common components across the websites will not be loaded for each user navigation. in some sites like twitter and facebook they have done with swf address implementation by concatinating '#' to current url for each user navigation with required pagename.so i want to implement same thing in struts 2. So how can i implement it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不知道你所说的“swf”导航是什么意思;我只知道 swf 就是 Flash,Twitter 和 Facebook 都不用它来导航。
为什么您需要在网址中添加“#”?你认为它有什么作用?
无论如何,如果您真正问的是“如何在导航期间仅更新 UI 的某些部分”,那么答案就是 Ajax 或 iframe。 (就我个人而言,我认为 iframe 几乎总是错误的,尤其是在现代 JavaScript 和 CSS 允许的情况下,但它们有其用途。)
I don't know what you mean by "swf" navigation; I only know swf as Flash, which neither Twitter nor Facebook use for navigation.
Why do you want a "#" in the URL? What do you think it does?
In any case, if what you're asking is really "How do I get only some parts of the UI to update during navigation", the answer is either Ajax, or iframes. (Personally, I think iframes are almost always wrong, especially with what modern JavaScript and CSS allow, but they have their uses.)
首先,我不确定 SWF 地址导航 这个术语。对于实际执行此任务的库来说,哈希书签是一个更常见的短语。
这是客户端编程的问题,与 struts 2 无关。有一个很好的 jQuery 插件可以解决这个问题。它被称为 jQuery 历史记录插件。
您可以找到许多其他库,最佳选择取决于您的应用程序要求。
First of all I am not sure about the term SWF Address Navigation. Hash Bookmarking is a more common phrase for libraries that actually does this task.
This is a matter of client side programming and it has nothing to do with struts 2. There is a good jQuery plugin for that. It is called jQuery history plugin.
You can find lots of other libraries and the best choice depends on your application requirements.