CalendarResponse.java$('#calendarId').fullCalendarExt("command", args...)) and appends it to Wicket's AjaxRequestTarget. This is the server-to-client command channel for calendar manipulation: refreshing events, toggling event source visibility, removing events, navigating to dates, and clearing selections — all driven from server-side event handlers that react to user interactions.Every public method returns CalendarResponse for chaining. The pattern enables composing multiple calendar commands in a single callback handler:
response.clearSelection().gotoDate(date).refetchEvents();
The underlying mechanism generates JavaScript strings via execute(args...), which uses String.format to produce a jQuery selector targeting the calendar's Wicket markup ID, and appends the JavaScript to the AjaxRequestTarget. The q() helper wraps arguments in single quotes (or outputs null for null values).
refetchEvents() — tells FullCalendar to reload event data from all sourcesrefetchEvents(EventSource) — reloads a specific event source by toggling it off and onrefetchEvent(EventSource, Event) — placeholder for optimized single-event refresh (currently falls back to full source refresh with a TODO comment)toggleEventSource(EventSource, boolean) — enables or disables an event source's visibility checkboxremoveEvent(Event) — removes a specific event from the calendargotoDate(Date) — navigates the calendar view to a specific dateclearSelection() — clears the highlighted date range selectionThe refetchEvent method contains a TODO comment acknowledging the current unoptimized implementation (refetching the entire source). The comment outlines the planned optimization: searching for the affected event in the client-side buffer and refetching only that event. This is a recognized performance TODO for calendars with many events.
| Commit | What changed |
|---|---|
868d6abb7 through ceb63e8a1 | Six annual copyright header updates. The command set and fluent API have remained stable — the FullCalendar extension script's command vocabulary covers the needs of the calendar integration, and no new server-to-client commands have been required. |