Xpage 文档打开一段时间不保存 [英] Xpage document is not saved if opened for some time

查看:20
本文介绍了Xpage 文档打开一段时间不保存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果任何文档在编辑模式下保持打开一段时间(例如 10 分钟或更长时间),然后在此之后尝试保存,则保存将被丢弃,文档只是刷新并以阅读模式打开.如何防止这种情况,因为它会导致用户丢失输入的数据.

If any document remains opened for some time (example 10 mins or more) in edit mode and then tried to save after that then save is discarded and document is just refreshing and opened in read mode. How to prevent this as it causes user to loss the entered data.

推荐答案

听起来您的页面已从存储的页面列表中删除.XPage 在内存或磁盘中存储有限数量的页面,具体取决于如何为应用程序设置服务器页面持久性.所以我的猜测是您正在单独的浏览器选项卡中从应用程序打开其他页面.

It sounds like your page is removed from the list of stored pages. XPages stores a limited number of pages in either memory or on disk depending on how server page persistence is set up for your application. So my guess is that you are opening other pages from the application in separate browser tabs.

一旦达到限制,页面将按出现顺序从列表中删除.这意味着 XPage 不知道不再存储的特定页面的组件树.这解释了为什么您的更改被丢弃"以及页面重新加载的原因.

Once you hit the limit pages are removed from the list in order of appearence. This means that XPages has no knowledge of the component tree for the particular page which is no longer stored. This explains why your changes are 'discarded' and why the page is reloaded.

默认存储页数在 8.5.x 中仅为 4,在 9.0.x 中为 16.

The default number of stored pages is only 4 in 8.5.x and 16 in 9.0.x.

我的建议是通过更改 Xsp 属性的持久性选项卡上的服务器页面持久性设置来增加此数字.

My recommendation is that you increase this number by changing the server page persistence settings on the Persistence tab of Xsp Properties.

您还应该了解通过将 xp:view 组件上的 viewState 属性设置为 "nostate" 来标记特定 XPage 以不存储状态的选项.这对于只读页面和不需要存储状态的xagents"很有用.

You should also be aware of the option to mark specific XPages to not store state by setting the property viewState to "nostate" on the xp:view component. This is useful for readonly pages and for 'xagents' that do not need to store state.

注意:keepSessionAlive 控件在这里没有帮助,因为您需要保持组件树处于活动状态" - 而不是会话.

Notice: the keepSessionAlive control will not help here as you need to 'keep the component tree alive' - not the session.

这篇关于Xpage 文档打开一段时间不保存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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