【问题标题】:jsf 2.1 a4j:commandButton does not render result table @ViewScopejsf 2.1 a4j:commandButton 不呈现结果表@ViewScope
【发布时间】:2016-08-15 12:28:03
【问题描述】:

我有一个使用 a4j:commandButton 的 Web 应用程序,如下所示:

<h:form>
<a4j:region id="search_form">
<a4j:commandButton render="ListOfPerson" action="personBean.search" value="search" execute="@form" status="ajaxStatus"/>
</a4j:region>
<a4j:outputPanel id="ListOfPerson" ajaxRendered="true">
  <rich:datatable>...</rich:datatable>
</a4j:outputPanel>
</form>

bean 使用@ManagedBean(faces package) 和@ViewScope 进行注释。当我将范围更改为@SessionScope 时,一切都按预期工作。有什么想法吗?

我正在使用以下导入:

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

【问题讨论】:

  • 检查导入。它应该是 javax.faces.bean.ViewScoped (和注解 @ViewScoped 而不是 ViewScope)
  • 我已经更新了帖子,已经在使用 faces.bean 中的@ViewScoped

标签: jsf-2 richfaces java-ee-6 ajax4jsf


【解决方案1】:

已解决,我删除了 a4j:commandButton 周围的 a4j:region 并且它可以工作。

【讨论】:

    猜你喜欢
    • 2015-11-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多