return;
if (!appointmentStart.before(appointmentEnd))
return;
if (appointmentTitle == null || appointmentTitle.length() < 1)
return;
SimpleScheduleModel model = (SimpleScheduleModel) scheduleBean
.getModel();
DefaultScheduleEntry appointment = new DefaultScheduleEntry();
//we need a unique id, let's take the current time in milliseconds
appointment.setId(String.valueOf(System.currentTimeMillis()));
appointment.setStartTime(appointmentStart);
appointment.setEndTime(appointmentEnd);
appointment.setTitle(appointmentTitle);
appointment.setSubtitle(appointmentLocation == null ? ""
: appointmentLocation);
appointment.setDescription(appointmentComments == null ? ""
: appointmentComments);
model.addEntry(appointment);
model.refresh();
appointmentStart = new Date();
appointmentEnd = new Date();
appointmentTitle = "";
appointmentLocation = "";
appointmentComments = "";