PagingScrollTable - problem with readOnly Mode

1 view
Skip to first unread message

wolfgang

unread,
Oct 11, 2010, 7:35:53 AM10/11/10
to gwt-mosaic
I'm using the PagingScrollTable with the UiBinder and found out that
it's still replacing the cells with a TextBox although it's only
readable.
So I created my own MyPagingScrollTable (extending PagingScrollTable)
and overrode the editCell method to check for the readOnly flag.

public class MyPagingScrollTable<RowType> extends
PagingScrollTable<RowType> {

@Override
protected void editCell(int row, int column) {

DefaultTableModel<RowType> defaultTableModel =
(DefaultTableModel<RowType>) this.getTableModel();

if (defaultTableModel.isReadOnly()) {
return;
} else {
super.editCell(row, column);
}
}
}

Is there a better way to do this (without extending the class)?
Reply all
Reply to author
Forward
0 new messages