Add mechanism to dynamically update calendars
I would like to be able to update calendars dynamically from a comet actor, adding/removing items without a full page rerender. In my current actor I have:
private def addCalendarItems(items:List[CalendarItem]) = {
JE.Call("CalendarMonthView.buildMonthViewCalendars", CalendarUtils.toJSON(items))
}
Unfortunately, after further testing, that doesn't seem to work. My actor receives an item, but doesn't appear to update the page. The JS I get back includes " around all of the item strings, which I suspect shouldn't be present in an expression given to partialUpdate().
It would be nice to have an addCalendarItems/removeCalendarItems method on each calendar view. Maybe even an updateCalendarItems method that either replaces each item, or that calls any calendar JS that may exist for changing existing items.
private def addCalendarItems(items:List[CalendarItem]) = {
JE.Call("CalendarMonthView.buildMonthViewCalendars", CalendarUtils.toJSON(items))
}
Unfortunately, after further testing, that doesn't seem to work. My actor receives an item, but doesn't appear to update the page. The JS I get back includes " around all of the item strings, which I suspect shouldn't be present in an expression given to partialUpdate().
It would be nice to have an addCalendarItems/removeCalendarItems method on each calendar view. Maybe even an updateCalendarItems method that either replaces each item, or that calls any calendar JS that may exist for changing existing items.
Leave a comment