问题
I have a project using GWT and it displays data in a table.
I need a Table for GWT that supports:
- sorting by particular column
- scrolling the data, while the header is immobile
- filtering rows for data searched in the table
The project is being created for internal purpose of the company, so I look for a solution that does not require commercial licensing for such uses.
回答1:
The standard CellTable supports sorting. (Hopefully more features will come soon.)
回答2:
Here is a table supporting sorting and filtering : http://code.google.com/p/gwt-advanced-table/
Google itself is working on it. Look at this example in the incubator which supports multi-column sorting and fixed header but unfortunately no filtering : http://code.google.com/p/google-web-toolkit-incubator/wiki/ScrollTable
Other grids and tables are available in the incubator at this address : http://code.google.com/docreader/#p=google-web-toolkit-incubator&s=google-web-toolkit-incubator&t=Tables
Ext GWT proposes a very nice table, but it is not free (in your case) : http://extjs.com/products/gxt/
回答3:
There is also EXT GWT (not to be confused with GWT EXT), build entirely in Java. You may have the pay for the license though. I do not known if you have to pay if the application is of internal use.
The Grid widget will do exactly want you want.
The rest of their widgets are also quite impressive.
回答4:
Just to keep this up to date: CellTable now supports paging and single column sorting: https://developers.google.com/web-toolkit/doc/latest/DevGuideUiCellTable?hl=de
You may want to adapt yout backend request for filtering, as this is usually more performant.
回答5:
GWT Ext provides a table that meets these requirements.
It provides a wrapper around the Ext javascript library, so its best to commit to using either only GWT Ext widgets, or GWT widgests. They can be combined, but sometimes don't play well with each other.
来源:https://stackoverflow.com/questions/161686/gwt-table-that-supports-sorting-scrolling-and-filtering