Thursday, July 30, 2009

Using the gwt ClickHandler instead of TableListener

private ClickHandler listenToTableClick(final FlexTable table)
{
return new ClickHandler()
{

public void onClick(ClickEvent event)
{
//instead of casting the former sender as a FlexTable, use the original table

Cell cell = table.getCellForEvent(event);
int row = cell.getRowIndex();
int col = cell.getCellIndex();

//original code here

}
}