Mobile Calendar Application shows the way how to use the FullCalendar (http://arshaw.com/fullcalendar/) in xPages environment. Provided database is full-featured, standalone application that works as is to allow quick adoption but is also as clear as much in design to help developer understand how the things work like and how to use it in his own application. 

 

<strong>SOME FEATURES:</strong></div>

a) kudos to FullCalendar authors .. really - it really great calendar product with huge documentation and localization options <a href="http://arshaw.com/fullcalendar/">http://arshaw.com/fullcalendar/</a></div>

b) calendar looks nice on mobile devices (tested Blackberry, iPhone/iPad and Android phones) as well as in desktop browsers

c) calendar has a great localization options so its very easy to adapt for the other languages ... ( we speak czech :-) )

d) uses JSON for data sources so its very easy to integrate with LN

e) support for multiple calendars listed in the one calendar view (calendars have different colors)

&nbsp;

<strong>TECHNICAL BACKGROUND:</strong></div>

a) JQuery &amp; JQuery Mobile for mobile user interface <a href="http://jquerymobile.com/">http://jquerymobile.com/</a><br/>
-(we prefer it for great compatibility, documentation and easy usage in xPages) - this app is also the proof how easy it is to integrate with xPages<br/>
&nbsp;</div>

b) datasource is created in JAVA (we prefer it as better option than SSJS for larger codes<br/>
- honestly we use JAVA for almost everything in xPages as better option)</div>

<br/>
c) JODD utility library <a href="http://jodd.org">http://jodd.org</a><br/>
- we use this library as the source of many helpers when working with Strings, Arrays, Dates and many, many others. And they have really great documentation that allows fast adoption. (formerly we were using well known Apache Commons libraries but we have encoutered some issues with xPages see here <a href="http://www-10.lotus.com/ldd/xpagesforum.nsf/topicThread.xsp?documentId=FD4D84A98FD9E23E8525791700338154&amp;action=openDocument">http://www-10.lotus.com/ldd/xpagesforum.nsf/topicThread.xsp?documentId=FD4D84A98FD9E23E8525791700338154&amp;action=openDocument</a> )</div>

<br/>
d) GSON <a href="http://code.google.com/p/google-gson/">http://code.google.com/p/google-gson/</a> - easy to use JSON converter</div>

<br/>
e) managed bean is being involved<br/>
- its just an option we made to show, how easy it is in xPages to use this mechanism :-)</div>

&nbsp;

<strong>QUICK Q&amp;A:</strong></div>

Q: Why to use another calendar when we have Traveler or iNotes?

A: I can see many situations where the custom calendar is great and easy to use option for xPages application

a) you want to integrate data not coming from user calendar into your application

b) you want to show users calendar entries in your custom application

&nbsp;

Q: Why you don&#39;t package this calendar app into the one, easy to use, standalone xPages control?

A: I believe, that there are situations, where mixing GUI, code and some glue code into one control is not the good practice. &nbsp;This app wants to make things clear so user/developer can easy adopt this into own application with having the full control over the result. &nbsp;

&nbsp;

<strong>INTERNALS:</strong></div>

1. xPages used in application

a) calendar_user.xsp - shows items from users calendar (requires used is logged into application)

<br/>
b) calendar_demo.xsp - shows items dynamically generated - its just and showcase how to view calendar options gathered/created in java code</div>

<br/>
c) calendar_data.xsp - its the agent-like xpage that works as a glue between calendar in browser(that uses ajax to gather data) and backing bean that returns the data</div>

&nbsp;

2. Managed bean in action (use package explorer here)

There is a managed bean involved in process. There are probably easier ways(e.g. using static methods) to access calendar bean but its so easy in Domino to use managed bean ... so why not to use it here ...

&nbsp;

You can find Managed bean configuration in package explorer here:

WebContent\WEB-INF\faces-config.xml

&lt;managed-bean&gt;

&nbsp; &lt;managed-bean-name&gt;Calendar&lt;/managed-bean-name&gt;

&nbsp; &lt;managed-bean-class&gt;calendar.CalendarServices&lt;/managed-bean-class&gt;

&nbsp; &lt;managed-bean-scope&gt;request&lt;/managed-bean-scope&gt;

&lt;/managed-bean&gt;

&nbsp;

2. Localization

Application contains script library called &#39;calendar.js&#39;

This file uses all required JS code with options easy to use in localization process. And when not sure, look at <a href="http://arshaw.com/fullcalendar/docs/text/">http://arshaw.com/fullcalendar/docs/text/</a></div>

&nbsp;

3. Calendar backing bean (use package explorer here)

JAVA class name: calendar.CalendarServices

&nbsp;

public methods:

<span style="font-family:courier new,courier,monospace;">public String getUserCalendarAsJSON(String start, String end)<br/>
- lists entries from user&#39;s calendar and converts them to JSON</span></div>

<br/>
<span style="font-family:courier new,courier,monospace;">public String getDemoItemsInJSON(String start, String end)<br/>
- generates demo entries for requested date interval - its very easy to adopt this method for your own purposes</span></div>

&nbsp;

&nbsp;

<strong>HOW TO USE IT: </strong>(requires Domino 8.5.2 and higher)</div>

a) download the database

c) sign it

d) update the ACL

e) open in browser