我有包装PrimeFaces.ajax.AjaxResponse
处理ViewExpiredException(重新加载页面):PrimeFaces ViewExpiredException页面重载后
var handleViewExpired = function (viewId) {
window.alert('${msg.ajax.viewExpired}');
window.location.reload();
};
不过,有时我得到的错误一遍又一遍的尝试点击任何东西在网站上调用AJAX请求后:
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)?
我在运行WebSphere 7.0的MyFaces 2.0.7上使用PrimeFaces 3.5。
请看看这个http://stackoverflow.com/questions/4992526/how-to-handle-session-expiration-and-viewexpiredexception-in-jsf-2 – 2013-03-08 18:18:28