Alfresco 共享页面状态历史记录
如何管理共享(冲浪?)中的页面状态历史记录,以便我记住哪个 yui 选项卡处于活动状态以及寻呼机位于哪个页面上?
我注意到,露天共享在表单提交后会执行类似的操作。您将被重定向到与之前完全相同的页面网址。如果任何“ajax 状态”(不知道它们叫什么)参数在像 #something=asdf 这样的 url 中,您会得到相同的 url。
但是,当使用手动导航(例如浏览网站页面)时,这些参数不会保存。
这是个好主意吗?例如,要在会话中保存页面状态?
How can I manage page state history in share (surf?) so that I remember for example which yui tab was active and on which page the pager was on?
I noticed that alfresco share does something like that after form submit. You get redirected to the exact same page url where you were before. If any "ajax state" (don't know what they are called) parameters are in url like #something=asdf you get the same url.
But when using manual navigation like moving through site pages those parameters aren't saved.
Is this even a good idea to do? To save page state in session for example?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有些页面支持传入的 URL 参数。在这些情况下,会使用浏览器历史记录,例如,我们在全页面元数据视图中编辑元数据,用户将被发送回他来自的页面。这是通过在表单提交后调用
window.history.go(-1)
在 javascript 中完成的,但仅在通过 URL 设置/检索参数时有效。文档库实现了页面特定的 javascript,用于设置 URL 并从中解析参数。在某些地方,Alfresco 使用偏好服务来永久存储不同页面之间的用户设置。例如,这在文档库中用于“显示文件夹”和“简单/缩略图视图”按钮。以下是来自文档库 javascript 设置首选项的一些示例代码:
属性的评估通常在共享组件网页脚本中完成,您可以在
share\WEB-INF\classes\alfresco\site- 中查看webscripts\org\alfresco\components\documentlibrary\include\documentlist.lib.js
为例。无论如何,您都必须在浏览器和共享层中深入研究 Alfresco 的 javascript 代码,以了解如何实现它。
Some pages have support for URL parameters that are passed in. In those cases the browser history is used, e.g. we editing metadata in the full page meta data view the user is send back to the page he is coming from. This is done in javascript by calling
window.history.go(-1)
after form submit but only works when parameters are set/retrieved by URL. The document library implements page specific javascript for setting the URL and parsing parameters from it.I some places Alfresco uses the preference service to store user settings between different pages permanently. For example this is used in the document library for the "show folders" and "simple/thumbnail view" buttons. Here is some sample code from the document library javascript setting a preference option:
The evaluation of the properties is usually done in the Share component webscripts, you can have a look in
share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\documentlibrary\include\documentlist.lib.js
for an example.In any case you have to dig into Alfresco's javascript code in the browser and the share tier to see how to implement it.
您可以在firebug(firefox插件)中检查表单提交后发送到服务器端的参数,然后您可以使用相同的参数。
也许你应该使用 yui 历史管理器:
You could check parameters sended to the server side after form submiting in the firebug (firefox plugin) and then you could use the same parameters.
Also perhaps you should use yui history manager: