Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pagination in GWT

Tags:

gwt

Is pagination supported in GWT? Does GWT provide a GWT GUI element?

like image 711
Santos Avatar asked Dec 11 '10 18:12

Santos


2 Answers

If you need table pagination, you can try the GWT Widget called "CellTable". It is a customizable table which supports pagination easily.

You can find more info here (javadoc page) : http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/cellview/client/CellTable.html

And this is an example of how use it: http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellTable

like image 199
Sergio Trapiello Avatar answered Sep 21 '22 15:09

Sergio Trapiello


As @caarlos0 mentioned, CellTable is a good start. You can also take a look of GWT SimplePager and AsyncDataProvider. Basically a SimplePager will be bind to a CellTable (or any Cell widget) and AsyncDataProvider. If there is a page change event fired (like user click next page), the onRangeChanged() will be called inside AsyncDataProvider, and you can customize the paging behavior in that function.

like image 29
wilson100 Avatar answered Sep 17 '22 15:09

wilson100