public void fireDeleteEvent(Appointment appointment) { // fire the event to notify the client boolean allow = DeleteEvent.fire(this, appointment); if (allow) { appointmentManager.removeAppointment(appointment); refresh(); } }
/** * Removes an appointment from the calendar. * * @param appointment the item to be removed. * @param fireEvents <code>true</code> to allow deletion events to be fired */ public void removeAppointment(Appointment appointment, boolean fireEvents) { boolean commitChange = true; if (fireEvents) { commitChange = DeleteEvent.fire(this, getSelectedAppointment()); } if (commitChange) { appointmentManager.removeAppointment(appointment); refresh(); } }