Config.java@JsonRawValue prevents double-escaping of JavaScript callback text, @JsonIgnore hides internal Wicket models from serialization, and @JsonProperty controls field naming.Seven callback models use IModel<String> — Wicket's model abstraction for dynamic values. Each callback getter is annotated with @JsonRawValue, which tells Jackson to insert the model's string content directly into the JSON output without quoting. This is critical because the callback strings are JavaScript function bodies (e.g., function(event, delta, revertFunc) { ... }) and must appear as raw code in the FullCalendar initialization, not as double-quoted strings. The setter methods provide convenience (setEventDrop(String) wraps in Model.of()) and advanced (setEventDropModel(IModel) for dynamic models).
The use of IModel for callback scripts enables dynamic script generation — critical because these scripts contain Wicket Ajax callback URLs that change between requests (due to anti-cache tokens and page versioning). The setupCallbacks() method in FullCalendar.java populates these models with generated script text, and Wicket's model resolution mechanism ensures fresh values on each render.
Uses Joda-Time types (LocalTime for minTime/maxTime) that are serialized via the custom serializers in AbstractFullCalendar. The ColumnFormat enum maps to FullCalendar's column header format options for day, week, and month views.
The add(EventSource) method returns this, supporting chained configuration. Multiple event sources can be added fluently: new Config().add(holidaysSource).add(meetingsSource).
| Commit | What changed |
|---|---|
868d6abb7 through ceb63e8a1 | Six annual copyright header updates. The configuration model has been stable — all FullCalendar settings needed by the application are captured in this class, and no new configuration options have been required beyond the initial design. |