I am filtering the data in a datatable so the backing datamodel shrinks, but if a user has already paged past the first page and the size of the data is less then a single page, it appears that the datascroller stays on the second (or later) page.
For example, there are 15 items in the data model at first and we're showing 10 per page. Then the user clicks to the second page to see the last 5 items. Now if the user then searches at that point and the the result set is only say size 1, the list will be empty because it is still on page 2. If you click back a page, you'll see the item.
I have preserveDataModel="false" on the datatable.
Is there any trick to this that I might have missed?
Here's the definitions:
<x:dataTable
id="xTable"
binding="#{
xBean.aTable}"
value="#{xBean.y}"
var="x"
sortColumn="#{xBean.xListSortColumn}"
sortAscending="#{xBean.xListSortAscending}"
rowIndexVar="rowIndex"
rowCountVar="rowCount"
rows="#{xBean.numRowsPerPage}"
preserveDataModel="false"
>
<x:dataScroller id="scroll_1"
for=""
fastStep="10"
pageCountVar="pageCount"
pageIndexVar="pageIndex"
styleClass="scroller"
paginator="true"
paginatorMaxPages="9"
paginatorTableClass="paginator"
paginatorActiveColumnStyle="font-weight:bold;"
immediate="false"
binding="#{xBean.dataScroller}">
Travis
- Resetting DataScroller Travis Reeder

