How to register keyhandler on CellTable?

14 views
Skip to first unread message

membersound

unread,
Feb 15, 2013, 11:32:49 AM2/15/13
to google-we...@googlegroups.com
Hi,

I have a CellTable with Columns represented by EditTextCell.

Now, if I'm not in edit mode but hit a certain key while an entry is just selected, I want to perform a specific action. Like deleting the whole row on DEL key.

Problem is: I can catch the event if I extend EditTextCell and override onBrowserEvent, then checking the event.getKeyCode().
But what can I do thereafter to modify the list of the CellTable where the EditTextCell is inside?

class CellTableWrapper {
  private CellTable<Foo>;
  private ListDataProvider<Foo>;
}

class ExtendedTextCell extends EditTextCell {
 @Override
 onBrowserEvent(..) {
   //how to modify listdataprovider on certain events??
 }
}

Reply all
Reply to author
Forward
0 new messages