What's new? | Help | Directory | Sign in
Google
gwt-advanced-table
GWT Advanced Table - GWT table widget supporting paging, sorting and filtering
  
  
  
  
    
Search
for
Updated Aug 20, 2007 by svetlin.nakov
AdvancedTable  

AdvancedTable

AdvancedTable is GWT table widget that supports data paging, filtering and column sorting. Paging, filtering and sorting are done by the server side. The table uses a data provider, the class TableModelService.

How to use it

AdvancedTable table = new AdvancedTable();
TableModelServiceAsync someTableService =
    <create table model service async>;
table.setTableModelService(usersTableService);
RootPanel.get().add(table);

Comment by ptomblin, Oct 08, 2007

I would like to make the Refresh button optional, because in my normal use it's not reasonable to expect the user to know when the backend data has changed. The backend should be signalling the change itself and the program refreshing the data without user intervention.

I would also like some way of setting the width of columns, preferably in "em" units.

Comment by jpenguin, Feb 07, 2008

I added a feature to it and hope you can consider incorporating it. Also could you let me join the project?

My change is to allow table rows to have a customized CSS style even if they are not selected, the style is decided by the underlying data for that row. For example a message table could have warning messages as yellow and errors as red.

Here is the changed method:

private void redrawSelectedRow() {

RowFormatter? gridRowFormatter = grid.getRowFormatter(); for (int row=1; row<= Math.min(this.pageSize, pageRows.length); row++) {

if (row == this.selectedRowIndex) {
gridRowFormatter.setStyleName(row, SELECTED_ROW_STYLE);
} else {
String customStyle = getRowStyle(pageRows[row-1]); gridRowFormatter.setStyleName(row, customStyle == null ?

DEFAULT_ROW_STYLE : customStyle);

}
}
}

/
  • Override this to customize row styles
  • @param rowData values in the cells (columns) of the row
  • @return
protected String getRowStyle(String[] rowData) {
return null;
}

Thanks !


Sign in to add a comment