Reputation: 768
I have used cellTable named as 'table' in UIbinder and wish to check which cell is clicked. I have learnt on google that CellPreviewEvent can be used for this purpose. I used following syntax to catch the event in my Java code. but it fails with error: Field 'table' does not have an 'addCellPreviewEvent.Handler' method associated. I would appreciate if anybody can help me :
@UiHandler("table")
void tableclickedAddClick(CellPreviewEvent<?> e) {
Window.alert("tablickclicked");
}
Upvotes: 1
Views: 199
Reputation: 64561
@UiHandler
unfortunately relies on naming conventions to find the addXxxHandler
methods, and because the handler is named CellPreviewEvent.Handler
and not CellPreviewHandler
, it won't find the addCellPreviewHandler
(it looks for addCellPreviewEvent.Handler
).
That means that, in this case, you cannot use @UiHandler
and must call addCellPreviewHandler
yourself.
Upvotes: 0