-
Bug
-
Resolution: Fixed
-
Normal
-
2.1.2
-
None
after dragging an event in month mold to another day and onEventUpdate event is called...
when ignoring the event on the serverside (maybe after deciding it is forbidden to move that event to the new day) the dragged event will disappear from its previous position, and only re-appear on the next update on that day.
@Command("updateEvent") public void onUpdateEvent(@BindingParam("event") CalendarsEvent event) { if(forbiddenToMove(event)) { //this notification could be removed, and just return to not handle the event Clients.showNotification("Not allowed to move event here", Clients.NOTIFICATION_TYPE_ERROR, null, null, 500); //workaround for the problem: when dragging a node out of a month, it does not reappear after ghosting BindUtils.postNotifyChange(null, null, this, "calendarModel"); return; } SimpleCalendarEvent calendarEvent = (SimpleCalendarEvent)event.getCalendarEvent(); calendarEvent.setBeginDate(event.getBeginDate()); calendarEvent.setEndDate(event.getEndDate()); calendarModel.update(calendarEvent); }
workaround is currently:
BindUtils.postNotifyChange(null, null, this, "calendarModel");