예제 #1
0
  private CalendarEvent createNewEvent(Date startDate, Date endDate) {

    BasicEvent event = new BasicEvent();
    event.setCaption("");
    event.setStart(startDate);
    event.setEnd(endDate);
    event.setStyleName("color1");
    return event;
  }
예제 #2
0
  /* 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);
  }