[FullCalendar 2] RunCalendarRefetchEvents seems not to be working

Forge Component
(24)
Published on 29 Mar by Daniel Filipe
24 votes
Published on 29 Mar by Daniel Filipe

Hi all,

I am trying to use the FullCalendar2 component to create and remove some events from a Calendar. On the "FullCalendarSelect" action I have the following flow:

However, every time that I click on a date from the Calendar, the event is saved in the DB, but the "RunCalendarRefetchEvents" seems to not be working properly, since the event is not shown in the Calendar. This only appears in the Calendar when I refresh the screen. Using the following follow, everything seems fine:

You can see both examples (CalendarTest_Bad and CalendarTest_Good) in the OML attached.

The second option is not viable, because the context of the all page is lost. The preferable option is the first one because I just want to do an "Ajax Refresh" of the Calendar.

Can you please help me on this?

Thanks.

Best Regards,

Miguel Pinto


Hi Miguel,

I guess you're missing the Ajax Refresh here.
I've solved this by just adding another entry in the JSON that's feeding the calendar with the appointments and then refreshing it.
This is the flow I'm using:

  • Creating the Database entry
  • Feedback for the user
  • Assign the returned/calculated and verified values to the "Event" local variable (as done in the loop in the preparation of the screen)
  • Appending this dataset to the "Events" list
  • Converting it to the json, adding the "events:" at the beginning to make it digestable by the calendar ;)
  • and finally updating the container that contains the calendar.


Best Regards,

Christoph