elstar IT

Fullstack | Java | Tech Speaker | Tech Coach | Frank van der Linden

  • About me
  • Blog license
  • My Open source projects

Quick XPages tip: add Fullcalendar plugin to your application

27-08-2015 4 responses flinden68 development

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.

 

Get started

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

In your XPages app, add the javascript file via the resource tags

[dropshadowbox align=”none” effect=”lifted-both” width=”400px” height=”” background_color=”#ffffff” border_width=”1″ border_color=”#dddddd” ]FullcalendarJSFile[/dropshadowbox]

 

Further down the page include a div tag, with the id of calendar (1). At the bottom of the page I included a script block, with the call to the full calendar javascript object. In the call I added some parameters to tell the code how to display the code and what to display. Documentation of all the parameters can be found on the website of the Fullcalendar plugin.

I added code to get my data and language from a Java Controller (2 and 3)

[dropshadowbox align=”none” effect=”lifted-both” width=”400px” height=”” background_color=”#ffffff” border_width=”1″ border_color=”#dddddd” ]FullcalendarScriptBlock[/dropshadowbox]

 

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’,

url: ‘http://google.com/’,

start: ‘2015-02-28’

end: ‘2015-02-28’

 

After the data is collected from my Java Contoller my entry data for the full Calendar looks like this

[dropshadowbox align=”none” effect=”lifted-both” width=”400px” height=”” background_color=”#ffffff” border_width=”1″ border_color=”#dddddd” ][/dropshadowbox]FullcalendarJSON

 

Final result

The final result looks, in my opinion very good.

[dropshadowbox align=”none” effect=”lifted-both” width=”600px” height=”” background_color=”#ffffff” border_width=”1″ border_color=”#dddddd” ]FullcalendarResult[/dropshadowbox]

 

 

 

 

 

 

 

Tags: development, quickstep, xpages

4 thoughts on “Quick XPages tip: add Fullcalendar plugin to your application”

  1. Patrick Kwinten says:
    27-08-2015 at 09:49

    nice! does your controller work with any default reservations NSF?

    Reply
    1. Frank van der Linden says:
      27-08-2015 at 12:14

      No,it is custom controller, which does more things then only the JSON output. But if you can get the entries in the controller, via a view lookup, the you should build the JSON

      Reply
  2. dsieyx says:
    22-01-2019 at 01:41

    Frank…thanks at first, i’m not sure u still work on with domino or not….I’m just searching how to get the data for “events” …LOL…. never know I can use javascript like this way….

    Reply
    1. flinden68 says:
      18-02-2019 at 11:00

      I must say that I did not do any Domino development the last 2 years. But if you need, let me know

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • « Quick XPages tip: Show validation status icon on bootstrap tabs
  • Lesson Learned: a Button need an id to trigger action »

Contact me

My name is Frank van der Linden and I am an independent software developer based in the Netherlands. The last 2 years I was awarded as IBM Champion. Also I am on the board of OpenNTF. My specialisations are Java, Web development and Domino.


If you want to hire me, please fill in the Contact form


IBM Champion web badge
Apache Logo

All the code on this blog are under the Apache License 2.0. For more details, see Apache License 2.0

Most recent posts

  • NL Portal, a open source project
  • 10th anniversary as a freelancer and more…
  • Engage 2020: Hello are you listening, There is stream for everything
  • Spring Cloud Function on Azure run locally
  • Deploy Spring Cloud Function to IBM Cloud

Latest reactions

  • Spring Cloud Function on Azure run locally - elstar IT on Deploy Spring Cloud Function to IBM Cloud
  • flinden68 on Quick XPages tip: add Fullcalendar plugin to your application
  • Rajesh samal on Quick tip: Swagger support for Spring Webflux
  • dsieyx on Quick XPages tip: add Fullcalendar plugin to your application
  • John on Named as IBM Champion 2019

Archive

  • November 2024
  • April 2024
  • March 2020
  • February 2020
  • January 2020
  • October 2019
  • September 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • January 2019
  • December 2018
  • October 2018
  • September 2018
  • May 2018
  • April 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • December 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014

Category

  • bluemix
  • business
  • cloudant
  • community
  • development
  • hrassistant
  • openntf
  • running
  • salesforce
  • Springboot
  • Tesla
  • trailrunning
  • Uncategorized
  • watson
  • OpenNTF
  • Collaboration Today
  • XSnippets
  • Stackoverflow
  • IBM Collaboration Solutions
  • Social Business Toolkit
  • About me
  • Dutch curriculum vitae
  • English curriculum vitae
  • Google+
  • LinkedIn profile
  • Twitter
  • Slideshare
  • Blog license
  • My open source projects