EventSource.javaEventProvider) and its visual representation in the calendar. Each event source has appearance properties (colors, CSS class), behavioral flags (editable, all-day default, timezone handling), a JSON-raw events model (the JavaScript callback that fetches events), and metadata stored in a generic Map<String, Object> (title, UUID). The UUID is auto-generated on calendar initialization and serves as the source's identity for Ajax callbacks. Jackson annotations control serialization: @JsonRawValue for the events callback script, @JsonIgnore for internal references like the EventProvider and UUID/title getters (which serialize through the data map instead).Event sources have two identifier systems: an internally used EventProvider reference (Java object, not serialized to the client), and a UUID string stored in the data map under the key "fcxUuid". The UUID is the primary identifier for client-server communication — it's sent in Ajax callback parameters and used by EventManager for lookup. The title (stored under "fcxTitle") is a human-readable label shown in event source selector checkboxes. The constants class Const centralizes these map keys.
The events field is an IModel<String> whose value is a JavaScript function body — the callback that FullCalendar invokes to fetch events for this source. It is set by FullCalendar.setupCallbacks() using the template from FullCalendar.events.tpl. The @JsonRawValue annotation on the getter ensures this JavaScript code is embedded directly in the JSON configuration object without string quoting, which is necessary for FullCalendar to interpret it as executable code.
Two boolean flags control integration with EventSourceSelector: includeInSelector (whether the source appears in the UI checkbox list at all) and enableInSelector (whether its checkbox is interactable). This allows sources to be present but hidden, or visible but non-toggleable — useful for mandatory base calendars that should always be shown.
All setters return EventSource for fluent configuration, consistent with the rest of the FullCalendar model classes.
| Commit | What changed |
|---|---|
868d6abb7 through ceb63e8a1 | Six annual copyright header updates. The event source model has been stable — the UUID-based identity system, dual color/appearance properties, selector integration flags, and template-based events model cover all event source configuration needs. |