2017-04-12 39 views
0

我有兩個rich:datatables,每個都有一個豐富的data:scroller。使用dataScroller在同一頁上使用兩個dataTable的錯誤

<rich:dataTable id="mainTable" 
       summary="#{i18n['br.com.petrobras.crud.datatable.summary']}" 
       styleClass="TableGrid" 
       value="#{bean1.objectDataModel}" 
       var="historicoItem" 
       first="#{bean1.jsfPagination.firstItemIndex}" 
       rows="#{bean1.jsfPagination.pageSize}"> 
</rich:dataTable> 

<rich:dataScroller id="**scrollerHistorico**" styleClass="Pagination" 
        for="mainTable" maxPages="1" fastControls="hide" 
        renderIfSinglePage="false" 
        page="#{bean1.jsfPagination.currentPageForView}"> 

</rich:dataScroller> 

<rich:dataTable id="anexoGridId" 
       summary="#{i18n['br.com.petrobras.crud.datatable.summary']}" 
       styleClass="TableGrid" 
       value="#{bean2.objectDataModel}" 
       var="anexoVar" 
       first="#{bean2.jsfPagination.firstItemIndex}" 
       rows="#{bean2.jsfPagination.pageSize}"> 
</rich:dataTable> 

<rich:dataScroller id="**scrollerAnexoTratamentoControle**" styleClass="Pagination" 
        for="anexoGridId" maxPages="1" fastControls="hide" 
        renderIfSinglePage="false" 
        page="#{bean2.jsfPagination.currentPageForView}"> 
</rich:dataScroller> 

但是當我打電話任何行動,以一個或下一個頁面的頁面只是刷新和ocurr日誌消息:

(好像我用同樣的參考兩個數據表,什麼是不對的

12/04/2017 18:59:48 org.richfaces.event.DataTablePreRenderListener processActiveDatascroller 
GRAVE: Datascroller components attached to component: formPrincipal:scrollerHistorico have different values of 'page' attribute : 
[formPrincipal:scrollerAnexoTratamentoControle: #{bean1.jsfPagination.currentPageForView}, 
formPrincipal:scrollerHistorico: #{tratamentoControleHistoricoBean.jsfPagination.currentPageForView}] 
12/04/2017 18:59:48 org.richfaces.event.DataTablePreRenderListener processActiveDatascroller 
GRAVE: Datascroller components attached to component: bean2have different values of 'page' attribute : 
[formPrincipal:scrollerAnexoTratamentoControle: #{anexoTratamentoControleBean.jsfPagination.currentPageForView}, 
formPrincipal:scrollerHistorico: #{tratamentoControleHistoricoBean.jsfPagination.currentPageForView}] 

對此的影響是,在動作(和日誌消息)之後,所有數據itens丟失了費用ID。

回答

相關問題