hugoloza / google-web-toolkit-incubator

Automatically exported from code.google.com/p/google-web-toolkit-incubator
0 stars 0 forks source link

RFE: Add column filtering to gen2 table framework #171

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Add filter capabilities to the gen2 table framework.

Original issue reported on code.google.com by daniel.florey@gmail.com on 28 Oct 2008 at 5:51

GoogleCodeExporter commented 9 years ago
Attach you'll find patch and new classes. 
Extract filtersNewClasses.zip to com.google.gwt.gen2.table.client

Original comment by daniel.florey@gmail.com on 28 Oct 2008 at 5:55

Attachments:

GoogleCodeExporter commented 9 years ago
To use the filters in your ScrollTable you have to specify the proper filter 
for each 
column that should be filterable. If you have numbers in the first column and 
plain 
text in all other columns your code should look like this:

ScrollTable scrollTable = new ScrollTable(dataTable, headerTable) {
  protected ColumnFilter createColumnFilter(final int column) {
    if (column == 0) {
      return new ColumnNumberFilter(column);
    } else {
      return new ColumnTextFilter(column);
    }
  }
};

Currently number, date and text filters are available with simple client side 
filter 
capabilities, but you can implement your own filters by extending the abstract 
ColumnFilter class.
Server side filtering is available in the same way as for sorting columns.

Original comment by daniel.florey@gmail.com on 28 Oct 2008 at 6:02

GoogleCodeExporter commented 9 years ago
New event classes for table filtering. Please extract to 

com.google.gwt.gen2.table.event.client

Original comment by daniel.florey@gmail.com on 29 Oct 2008 at 10:04

Attachments:

GoogleCodeExporter commented 9 years ago
The attached path and classes are containing revised filters and 
PagingScrollTreeTable additions.
Patched rev 1177.

Original comment by daniel.florey@gmail.com on 31 Oct 2008 at 4:15

Attachments: