In one of my XPages projects there was the need of a calendar display of data. First stop was the Demo application of the OpenNTF Extension Library, which contains a calendar control.
After some attempts to get my data displayed in this control, I skipped it and moved to a JQuery plugin, FullCalendar. I was surprised by how the easiness to get everything up and running.
For this project I already used Bower to include all the required client side frameworks, I run Bower once again to install the full calendar files in my application. How to use Bower in your XPages application, see my blog about it.
Make it work
I added code to get my data and language from a Java Controller (2 and 3)
Last thing is to get the data as JSON from my Java Controller class. With the use of the build in ‘
com.ibm.commons.util.io.json.JsonJavaObject’ I build my JSON, every event entry is a entry of an array.
The JSON array entry should have as minimum the obviuos values like title, start and end date
title: ‘Click for Google’,
After the data is collected from my Java Contoller my entry data for the full Calendar looks like this
The final result looks, in my opinion very good.