I have to customize calendar events windows, I have tried to use handlers but they don’t work for what i have to do
In specific I have for example to show a confirm window before execute delete event operation, how can i do this???
Thanks
I have to customize calendar events windows, I have tried to use handlers but they don’t work for what i have to do
In specific I have for example to show a confirm window before execute delete event operation, how can i do this???
Thanks
re
Hi, u can try with removeListener like that:
private void addRemoveEventListener(final Calendar calendar) {
calendar.addEventRemovedHandler(new EventRemovedHandler() {
public void onEventRemoved(CalendarEventRemoved event) {
//you have here Calendar object so u might add some Panel etc.
CalendarEvent calendarEvent = event.getEvent();
mypackage.client.data.Calendar calendar = new mypackage.client.data.Calendar();
calendar.setId(calendarEvent.getEventId());
calendar.setEventName(calendarEvent.getName());
calendar.setDescription(calendarEvent.getDescription());
calendar.setStartDate(calendarEvent.getStartDate());
calendar.setEndDate(calendarEvent.getEndDate());
calendarService.removeCalendar(calendar, new AsyncCallback() {
public void onFailure(Throwable caught) {
Window.alert("Blad przy usuwaniu zadania");
}
public void onSuccess(Object result) {
}
});
}
});
}
sorry, can you be more clear?
I have to use a confirm dialog to give the user the possibility to confirm the deletion of the event or to cancel the deletion
So I have to kept delete event before event is cancelled