Paging issues with rich:dataScroller and dynamic row count
Issue
Wrong number of rows is displayed when using rich:dataTable with dynamic rowCount.
Example:
<h:selectOneMenu value="#{myBean.batchRows}">
<f:selectItem itemLabel="10" itemValue="10"/>
<f:selectItem itemLabel="20" itemValue="20"/>
<f:ajax render="table table-ds" />
</h:selectOneMenu>
<h:panelGroup>
<rich:dataTable id="table" rows="#{myBean.batchRows}" ... >
...
</rich:dataTable>
</h:panelGroup>
<rich:dataScroller id="table-ds" for="table"/>
Behaviour with 21 elements
1. Choose 20 from the menu input.
2. 20 elements will be displayed
3. Go to page 2, 1 element is displayed
4. Choose 10 from the menu input.
5. Just one element is still displayed, but 10 should be displayed.
Environment
- RichFaces 4.3.5 and older
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.