Marcel Ruff wrote:
Hi,
i need to reset the page index of
994 Cars found, displaying 10 cars, from 1 to 10. Page 99 / 100
If i watch page 99 and program some filter so that after reload max
page is only
20 the current page 99 is far behind the end.
How can i programmatically reset the current page to 0 ?
Thanks
Marcel
Ok, i solved it by reloading the page when 'search' is clicked
and not reloading it when one of the navigation buttons is clicked.
This is controlled by this (my Search Button):
<h:commandButton action="#{myBacker.searchActionToViewId}"
actionListener="#{myBacker.searchActionEvent}"
value="Search" />
The myBacker.searchActionToViewId() returns 'null' when
navigations buttons where clicked (thus the current page index
is preserved)
and it returns "go_home" which reloads the page (via my
examples-config.xml),
i hope this helps others,
Marcel