I have rich:datascroller
for my rich:dataTable
which is working well except that when I am on any page number (let say 5) and do a search operation (or any operation which renders the dataTable). Pagination will still show page 5, but I want it to be reset to 1. page when the operation happens.
In this image, when I am going to Page 5 and hit Search again or do a clear and search again, the pagination is still set to Page 5, not back to Page 1.
Here's my code snippet:
<rich:datascroller id="prodDataScroller" for="prodClassificationOutputTable"
rows="100" maxPages="10" fastStep="3" renderIfSinglePage="false"
immediate="false" page="#{prodClassificationBean.firstPage}">
</rich:datascroller>
<rich:dataTable id="prodClassificationOutputTable" border="0"
width="100%" columnClasses="col" headerClass="column-header"
style="overflow:auto;" rowClasses="odd,even" align="center"
value="#{prodClassificationBean.outputClassificationWrappers}"
var="prodClassificationRow" rows="100" rowKeyVar="row" immediate="true">
<!-- ... -->
<rich:dataTable>
I checked other solutions. I tried to implement page
attribute for datascroller but it doesn't seem to be working. I created an attribute firstpage
in backing bean being set to "1" when search happens so that page attribute of datascroller will have value as 1. But it's not resolving the issue.
I would like to know where I am going wrong.