|
HasAttribute
HasAttribute annotation overview
OverviewAnother extension of the EventBinding system is the @HasAttribute annotation. It is only valid for DomEvents. It filters events that have the specified attributes present. Example: @ViewHandler
@HasAttribute({"action", "index"})
protected void contactsTable$click(@Attribute Actions action, @Attribute Integer index) {
ContactDetails contactDetail = contactDetails.get(index);
if (action.equals(Actions.CLICK)) {
placeManager.go(EditContactPresenter.class, contactDetail.getId());
} else {
if (selectionModel.isSelected(contactDetail)) {
selectionModel.removeSelection(contactDetail);
} else {
selectionModel.addSelection(contactDetail);
}
}
}
| |