/* Removes the event from the data source and fires change event. */ private void deleteCalendarEvent() { BasicEvent event = getFormCalendarEvent(); if (dataSource.containsEvent(event)) { dataSource.removeEvent(event); } removeWindow(scheduleEventPopup); }
/* Adds/updates the event in the data source and fires change event. */ private void commitCalendarEvent() throws CommitException, ValidationException { scheduleEventFieldGroup.commit(); BasicEvent event = getFormCalendarEvent(); scheduledEventBinder.writeBean(event); if (event.getEnd() == null) { event.setEnd(event.getStart()); } if (!dataSource.containsEvent(event)) { dataSource.addEvent(event); } removeWindow(scheduleEventPopup); }