[Seaside] Re: refreshing events on JQFullCalendar

Paul DeBruicker pdebruic at gmail.com
Tue Jan 15 18:48:31 UTC 2013

Hi Davide,

I don't know.  It looks like you could instead return a json array of
events and run the renderEvent method on each of them.  See
I don't know if that means you'll end up with two duplicated events of
different color or not.

Or use #updateEvent:
(http://arshaw.com/fullcalendar/docs/event_data/updateEvent/) method
after using some jQuery to find the changed events in the client and set
their new CSS properties.  Have your callback make a Dictionary with the
keys the id of each modified event and the values the revised CSS rules.
 then emit that as json and iterate over it on the client finding the
EventObject and change its CSS.

Seems like there are mechanisms there to only update specific events but
I haven't done it before.

Good luck and sorry I can't be more help


On 01/15/2013 10:28 AM, Davide Varvello wrote:
> Hi Paul,
> I have another question on JQFC.
> I'm trying to refresh events periodically, they should change their
> background color when some condition shows.
> I'm adding to your JQFullCalendarExampleCalendar this bit of code:
> html script: (  ( (html jQuery ajax) callback: [ :ignored | self
> changeEventColor ] json: '';
>  script: [ :s | s << (s jQuery id: 'calendar') replaceWith: [ :h | self
> renderCalendar: h ] ]) interval: 10 seconds ).
> As you can see, every ten seconds I poll the server and send the message
> changeEventColor that controls the condition and change the color of my
> events.
> But, unfortunately, to update the color of events I find nothing else
> than refreshing the entire calendar (self renderCalendar: h).
> Is there a way to repaint single events?  
>  Davide

More information about the seaside mailing list