@Override public void selectReservation(Reservation selectedObject, PopupContext context) { ApplicationEventContext editContext = new EditApplicationEventContext<>(Collections.singletonList(selectedObject)); final ApplicationEvent activity = new ApplicationEvent( ReservationPresenter.EDIT_ACTIVITY_ID, selectedObject.getId(), context, editContext); eventBus.fireEvent(activity); logger.info("selection changed"); }
@Override /** ASYNC */ public void updateContent() { Promise<Collection<Reservation>> resultPromise = model.queryReservations(model.getTimeIntervall()); resultPromise .thenAccept( (result) -> { logger.info(result.size() + " Reservations loaded."); view.update(result); }) .exceptionally( (e) -> { logger.error(e.getMessage(), e); return null; }); }