【问题标题】:How to Refresh adf table after insert a new row插入新行后如何刷新 adf 表
【发布时间】:2015-12-28 09:47:23
【问题描述】:

您好,我有两个页面:第一个是“creer dossier.jsf”,我可以在其中添加新行,第二个页面是“listdossier.jsf”,其中我有一个只读表,其中包含第一个记录页。 当我在第一页中创建记录时,它会保留在数据库中,但只有在我重新部署应用程序时才会出现在表中。 我想在不重新部署应用程序的情况下获得最新记录。有人可以帮我吗? 要创建表,我只需将其从数据控件中拖动。 我使用 EclipseLink JPA 作为 ORM 和 web 逻辑 我尝试使用persistanc.xml 和 em.refresh() 删除缓存,但问题始终相同 这是我的桌子:

<af:table value="#{bindings.dossierFindAllParDepartementDBTE.collectionModel}"
var="row" rows="#{bindings.dossierFindAllParDepartementDBTE.rangeSize}"
emptyText="#{bindings.dossierFindAllParDepartementDBTE.viewable ? 'No data to display.' : 'Access Denied.'}"rowBandingInterval="0"
fetchSize="#{bindings.dossierFindAllParDepartementDBTE.rangeSize}" id="t2"
partialTriggers="l1" width="796px"
immediate="false" binding="#{backingBeanScope.BeanDatabase.t2}">
<af:column headerText="ID_Dossier" id="c5" width="150"
inlineStyle="background-color:#b5ffde">
<af:link actionListener="#{bindings.setCurrentRowWithKeyValue.execute}"
 text="#{row.idDossier}"
 disabled="#{!bindings.setCurrentRowWithKeyValue.enabled}" id="l1"action="GoEditDossierBTEDEP1" inlineStyle="background-color:#b5ffde"/>
</af:column>
<af:column headerText="Client" id="c6" width="150"
inlineStyle="background-color:#b5ffde">
<af:outputText value="#{row.client}"
shortDesc="#{bindings.dossierFindAllParDepartementDBTE.hints.client.tooltip}"
id="ot6"/>
</af:column>
<af:column headerText="Ingénieur" id="c7" width="150"
inlineStyle="background-color:#b5ffde" headerClass="skin1.css">
<af:outputText value="#{row.ingAff}"shortDesc="#{bindings.dossierFindAllParDepartementDBTE.hints.ingAff.tooltip}"id="ot7"/>
</af:column>
<af:column headerText="Probléme" id="c8" width="300" inlineStyle="background-color:#b5ffde">
<af:outputText value="#{row.descriProb}"
 shortDesc={bindings.dossierFindAllParDepartementDBTE.hints.descriProb.tooltip}"
    id="ot8"/>
</af:column>
</af:table>

【问题讨论】:

  • 是否可以将只读表的数据缓存在某个会话范围的 bean 中?

标签: jpa oracle10g ejb oracle-adf weblogic12c


【解决方案1】:

在两个页面之间导航的任务流中,粘贴一个调用查询的方法活动,并在返回第一页之前重新执行它。

【讨论】:

  • 感谢您的帮助!!!但是每个页面都在不同的任务流程中,因为我将它们用作菜单!!!!
【解决方案2】:

您可以通过两种方式做到这一点:

  1. 在提交第一页时刷新页面或第二页的特定组件。
  2. 在第一页提交值后刷新迭代器和VO

【讨论】:

    猜你喜欢
    • 2014-08-11
    • 2012-04-27
    • 1970-01-01
    • 2020-01-03
    • 1970-01-01
    • 2013-12-02
    • 1970-01-01
    • 1970-01-01
    • 2014-09-06
    相关资源
    最近更新 更多