我有下一个问题,我从数据表上传了一些数据,当进程完成时,它会出现一个p:对话框,显示有错误的记录。当我点击p:commandbutton" ok!"它必须清除所有列表(这个过程我在调试模式下检查并清除它)但数据表名为" sellosTable"它没有更新,我尝试了很多我在堆栈上找到的替代品。
<p:panel id="pnlMayor">
<h:form id="frm" enctype="multipart/form-data">
<p:dataTable id="sellosTable" value="#{cargarSellosBean.listadoSellos}" var="sellos" widgetVar="sellTable" paginator="true" rows="10"
paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
paginatorPosition="bottom" filteredValue="#{cargarSellosBean.filteredSellos}"
rowStyleClass="#{sellos.repeated.equals('repetido')?'rowbackgorundOnRepeated':''}"
rowsPerPageTemplate="5,10,15" lazy="false"
selection="#{cargarSellosBean.selectedSellos}" rowKey="#{sellos.secuencial}" style="margin-bottom:0">
<p:column selectionMode="multiple" style="text-align: center"/>
<p:column headerText="Sellos" filterBy="#{sellos.inv_sello}" filterStyle="display:none" filterMatchMode="contains">
<h:outputText value="#{sellos.inv_sello}"/>
</p:column>
<p:column headerText="N° Seguridad" filterBy="#{sellos.inv_seguridad}" filterStyle="display:none" filterMatchMode="contains">
<h:outputText value="#{sellos.inv_seguridad}"/>
</p:column>
<p:column headerText="Indicador" filterBy="#{sellos.repeated}" filterStyle="display:none" filterMatchMode="contains">
<h:outputText value="#{sellos.repeated}"/>
</p:column>
</p:dataTable>
<p:commandButton id="guardarSellos" style="position: relative; left: 450px; top: 5px; width: 20%" value="Guardar"
actionListener="#{cargarSellosBean.guardarListadoSellos()}"
oncomplete="PF('failBox').show();" update="failsDialog"
/>
<p:dialog id="basicDialog" resizable="false" header="Por favor espere...." widgetVar="dlg2" modal="true" closable="false" onShow="startProgressBar();">
<p:progressBar id="progressBarLoad" widgetVar="pbClient" style="width:300px" />
</p:dialog>
<p:blockUI block="pnlMayor" trigger="guardarSellos" />
</h:form>
<p:dialog id="failsDialog" resizable="false" header="Informe de Registros Fallidos" widgetVar="failBox" modal="true"
closable="true" closeOnEscape="true">
<h:form id="frmDialog">
<p:dataTable id="tblFailSellos" value="#{cargarSellosBean.failedSellosList}" var="failed" widgetVar="sellTable" paginator="true" rows="5"
paginatorTemplate="{RowsPerPageDropdown} {FirstPageLink} {PreviousPageLink} {CurrentPageReport} {NextPageLink} {LastPageLink}"
rowsPerPageTemplate="5,10,15" lazy="false" paginatorPosition="bottom" style="width:600px;height: 300px">
<p:column headerText="Sello">
<h:outputText value="#{failed.inv_sello}"/>
</p:column>
<p:column headerText="N° Seguridad">
<h:outputText value="#{failed.inv_seguridad}"/>
</p:column>
</p:dataTable>
<p:commandButton style="position: relative; left: 450px; top: 5px; width: 20%" value="Ok!"
actionListener="#{cargarSellosBean.clearFailedList()}"
update="@all"
oncomplete="PF('failBox').hide();">
</p:commandButton>
</h:form>
</p:dialog>
</p:panel>
有什么建议吗?
答案 0 :(得分:0)
只是一个猜测,但尝试显式更新这样的数据表
update="@([id$=sellosTable])"