我已经封装了PrimeFaces.ajax.AjaxResponse
以处理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)
我刷新页面的方式是否有误?如果要进行完全的页面重新加载(比如在浏览器中点击重新加载),我该怎么做?需要删除cookies吗(JSESSIONID,oam.Flash.RENDERMAP.TOKEN)?
我正在使用运行在WebSphere 7.0上的MyFaces 2.0.7和PrimeFaces 3.5。