I have a custom action (ItemTrackingAction) on a datagrid. After the action item changes, but then i cannot remove it unless i refresh the items in datagrid. How can i refresh the items in datagrid from the custom action.
My action execute method
@Override
public void execute() {
checkTarget();
Booking booking = target.getSingleSelectedItem();
if (booking == null) {
throw new IllegalStateException(String.format("There is not selected item in %s target", getClass().getSimpleName()));
}
dialogs.createOptionDialog()
.withHeader(messages.getMessage(CancelReservationAction.class, "cancelReservationAction.confirm.title"))
.withText(messages.getMessage(CancelReservationAction.class, "cancelReservationAction.confirm.message"))
.withActions(
new DialogAction(DialogAction.Type.YES).withHandler(e -> {
bookingService.cancel(booking);
}),
new DialogAction(DialogAction.Type.NO))
.open();
}