我有一个使用多个会话 Bean 运行的 JSF 2.1 (MyFaces) 应用程序(所有 bean 都是会话 bean)。超时在 web.xml 中定义如下:
<session-config>
<session-timeout>3600</session-timeout>
</session-config>
转换为 1 小时。
问题是在正常使用中我得到了No Saved View...
异常:
SEVERE: An exception occurred
javax.faces.application.ViewExpiredException: /mainPanel.jsfNo saved view state could be found for the view identifier: /mainPanel.jsf
at org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:128)
bean 目前在 faces-config.xml 中定义,以便与 Eclipse 的 ide 兼容。
我不确定是什么原因造成的,而且绝对不会超时。任何想法可能是什么问题?
如果我可以提供任何进一步的信息,请告诉我..
谢谢!
PS - 没有jsf-2.1
标签
更新 1我只是想 60 意味着 1 分钟!:-) 这可能是问题所在。如果结果是这样,我会结束这个问题
更新 2不是这样......更多信息可能会有所帮助:
- 虽然错误是专门针对 的
/mainPanel.jsf
,但这实际上是 xhtml 使用的组合<ui:include>
- 仅当我单击应用程序中的一个特定点时才会发生这种情况。作为点击结果运行的代码是:
Jquery
代码:
$(document).ready(function() {
$("#someTable tr:not(:first)").click(function(event) {
var someValue = $(this).find("input:hidden").val();
$('#currently_selected').val(someValue );
$('#currently_selected').change();
});
});
JSF 2
代码:
<h:form prependId="false" class="hide">
<h:inputText value="#{someBean.someBeanValue}">
<f:ajax event="change" listener="#{someBean.someBeanValueChanged}" render=":anotherForm"
onevent="ifCompleteSetWindowHash" />
</h:inputText>
</h:form>