I have a richfaces extendeddatatable with a datascroller. We wrote an own class which extends the ExtendeddataModel.
Everything is working fine until the following scenario:
- Go to the last page of the datascroller
- Use any filter that leads to a smaller amount of data, so the last page does not exist any more
Result: the datascroller "jumps" to the right page, but datatable is still displayed empty
After some debugging I found out that the "walk()" method of the ExtendeddataModel-Implementation is called BEFORE the datascroller writes into the log:
The requested page isn't found in the model. Paging is reset to page...
We use filtering, sorting, a push mechanism for new data... so a kind of complex environment which I can't really post here, but I try to point out the most important parts.
<h:selectManyCheckbox value=#{controller.filter}>
<f:selectItems value="#{controller.filterOptions} />
<a4j:ajax render="table scroller" />
</h:selectManyCheckbox
<rich:extendeddatatable id="table" ... />
<rich:dataScroller for="table" id="scroller" renderIfSinglePage="false"
page="#{controller.page}"
Adding render="table" to the datascroller did not help. The only thing that helped was putting the rendering into two different requests, so first only datascroller is rendered and after this the datatable.
Is there a way to do this without 2 requests? Am I able to force a rendering order? Or do I simply miss something in the configuration of the dataScroller/ datatable, to render it after the scroller was reset...