How to reset a paginator on dataTable in primefaces 1.1?

UI Components for JSF
Post Reply
Loshmi
Posts: 5
Joined: 18 Nov 2010, 09:40

25 Nov 2010, 16:09

I got the problem with lazy loading data table. Namely after data has been changed (there was another search performed and has fewer results than the first one that was displayed) and the page that paginator was last on doesn't exist anymore, the paginator still thinks he is on the unexisting page. I need to reset it somehow. I've serached the forum and i've seen this:

DataTable dt = (DataTable)ComponentUtils.findComponent(FacesContext.getCurrentInstance(), "myTableId");
dt.setValue(null);
dt.setFirst(0);
dt.setPage(1);

And i tried it, but it doesnt work in JSF 1.2 and primefaces 1.1.

Is there something i can do to reset it with my settings?

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 27 guests