2017-04-12 40 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。

回答

相关问题