[英]how to update datatable from managed bean jsf2 primefaces
我想從managedBean更新數據表
此數據表位於p:tab
內p:tabView
內h:form
內p:dialog
我測試了這個:但是沒有更新:
RequestContext.getCurrentInstance().update("tabView:lesarticles");
這是對話框:
<p:dialog id="dialogc" modal="true" header="Nouveau Article"
widgetVar="dlgc">
這是表格(在對話里面):
<h:form prependId="false" id="formdialogc">
tabView和datatable:
<p:tabView id="tabView" style="font-size: 14px;">
<!-- ajouter elements -->
<p:tab id="info_produit" title="Produits">
<p:dataTable id="lesarticles" var="car" widgetVar="carsTable"
rowKey="#{car.ligneCommandeFournisseurId}"
value="#{commandeMB.commande.ligneCommandeFournisseurs}">
有什么辦法可以解決這個問題
先感謝您
好吧,這應該很簡單:
<p:commandLink action="#{bean.getList}" update=":dataTableForm"/>
在getList方法中,我假設您正在刷新p:dataTable
顯示的列表:
<h:form id="dataTableForm">
<p:dataTable/>
</h:form>
只需確保您不嵌套表格即可將它們分開,並讓它們完成自己的工作。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.