Closed glebfox closed 3 years ago
Case:
Image
Table
ClickListener
@UiController("User.browse") @UiDescriptor("user-browse.xml") @LookupComponent("usersTable") @Route("users") public class UserBrowse extends StandardLookup<User> { @Autowired private GroupTable<User> usersTable; @Autowired private UiComponents uiComponents; @Autowired private Notifications notifications; @Subscribe public void onInit(InitEvent event) { usersTable.addGeneratedColumn("imgSend", entity -> { Image<?> image = uiComponents.create(Image.class); image.setSource(ThemeResource.class) .setPath("branding/app-icon-login.svg"); image.setHeight("16px"); image.setScaleMode(Image.ScaleMode.CONTAIN); image.addClickListener(clickEvent -> { notifications.create() .withCaption("Image clicked") .withDescription("isDoubleClick: " + clickEvent.isDoubleClick()) .withType(NotificationType.TRAY) .show(); }); return image; }); } }
AR:
IllegalArgumentException: entity or id is null
Hint: alter com.vaadin.v7.ui.Table#handleClickEvent so that it ignores clickEvents with no clickedKey.
com.vaadin.v7.ui.Table#handleClickEvent
clickEvent
clickedKey
Case:
Image
to aTable
ClickListener
to theImage
AR:
Hint: alter
com.vaadin.v7.ui.Table#handleClickEvent
so that it ignoresclickEvent
s with noclickedKey
.