Buy me a coffee :)

Wicket - jQuery UI

jQuery UI integration in Wicket 6.x, Wicket 7.x , Wicket 8.x & Wicket 9.x

Calendar: custom events

Components / Samples


This sample shows how the Calendar deals with custom beans (CalendarEvent).


package com.googlecode.wicket.jquery.ui.samples.jqueryui.calendar;

import java.time.LocalDateTime;
import java.util.List;

import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.util.lang.Generics;

import com.googlecode.wicket.jquery.core.Options;
import com.googlecode.wicket.jquery.ui.calendar.Calendar;
import com.googlecode.wicket.jquery.ui.calendar.CalendarEvent;
import com.googlecode.wicket.jquery.ui.calendar.CalendarModel;
import com.googlecode.wicket.jquery.ui.panel.JQueryFeedbackPanel;

public class CustomCalendarPage extends AbstractCalendarPage
	private static final long serialVersionUID = 1L;

	private final List<CalendarEvent> events;

	public CustomCalendarPage()
	{ = Generics.newArrayList(); CalendarEvent("1", "Today's event",; CalendarEvent("2", "Another event",;


	private void initialize()
		// FeedbackPanel //
		final FeedbackPanel feedback = new JQueryFeedbackPanel("feedback");

		// Calendar (read only) //
		this.add(new Calendar("calendar", this.newCalendarModel(), new Options("theme", true)));

	private CalendarModel newCalendarModel()
		return new CalendarModel() {

			private static final long serialVersionUID = 1L;

			protected List<CalendarEvent> load()
				// Loads events from the data access layer, using:
				// Date start = this.getStart();
				// Date end = this.getEnd();

				return events;
<!DOCTYPE html>
<html xmlns:wicket="">
	<title>Wicket jQuery UI: calendar / custom events</title>
	<div id="demo-panel">
		<div wicket:id="calendar"></div>
		<div wicket:id="feedback"></div>