页面重新加载后PrimeFaces ViewExpiredException [英] PrimeFaces ViewExpiredException after page reload
问题描述
我有包装 PrimeFaces.ajax.AjaxResponse
来处理ViewExpiredException(重新加载页面):
I have wrapper PrimeFaces.ajax.AjaxResponse
to handle ViewExpiredException (reloading the page):
var handleViewExpired = function (viewId) {
window.alert('${msg.ajax.viewExpired}');
window.location.reload();
};
然而,有时我在尝试点击调用AJAX请求的任何内容后反复出现该错误site:
However, sometimes I got that error over and over again after trying to click anything invoking AJAX requests on the site:
javax.faces.application.ViewExpiredException: /tree.xhtmlNo saved view state could be found for the view identifier: /tree.xhtml
at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:128)
我是否以错误的方式刷新?如何调用整页重新加载,例如在浏览器中单击重新加载?我是否需要删除cookie(JSESSIONID,oam.Flash.RENDERMAP.TOKEN)?
Am I doing refresh in wrong way? What should I do to invoke full page reload, such as clicking reload in browser? Do I need to remove cookies (JSESSIONID, oam.Flash.RENDERMAP.TOKEN)?
我正在使用PrimeFaces 3.5和在WebSphere 7.0上运行的MyFaces 2.0.7。 / p>
I'm using PrimeFaces 3.5 with MyFaces 2.0.7 running on WebSphere 7.0.
推荐答案
如果您在会话中同时打开了许多(> 15)页/视图/帧,那么,以下可能很有用。
If you have many (>15) pages/views/frames that are concurrently opened in the session, then, the following may be useful.
您需要查看:
1。 numberOfViewsInSession:定义支持后退按钮操作的(顶级)视图状态(页面)的数量
1. numberOfViewsInSession: defines the number of (top-level) view states (pages) to support back button operation
2。 numberOfLogicalViews:定义页面中可以显示的逻辑视图(帧)的数量(每个顶级视图)
2. numberOfLogicalViews: defines the number of logical views (frames) that can present in a page (per top-level view)
快速操作以确保它是否与将这些数字设置为500,并查看
如果相关,则可以在以下链接中找到更多信息:
A quick action to make sure if it's relevant is to set those numbers to 500, and see If they are relevant, then, you can find more information in the following links:
http://www.java.net/node/681211
numberOfViewsInSession和多个标签的问题
这篇关于页面重新加载后PrimeFaces ViewExpiredException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!