There is a new release of the XPages Mobile Controls project which demonstrates how to take data from a Domino database offline on smartphones with webkit browsers.

The app stores the last ten view entries and full blog entries on the OpenNTF blog locally and switches to the local store when offline. The synchronization happens asynchronously in the background when the client is online. The document user interface can be implemented via standard XPages techniques like data sources and out of the box controls. For offline usage the whole documents are cached as HTML on the client.

There are a couple of interesting techniques used in this code. For example the code shows how to disable the Dojo that comes with Domino and also to disable all default stylesheets. Instead a custom Dojo build is used that also contains the Dojo 1.5 Mobile code in one JavaScript file that can be cached locally.



You can try an offline app under http://208.85.188.19/niklas/MobileControls200.nsf/m.xsp (shorter URL currently difficult). It's the OpenNTF blog app as under http://i.openntf.org but with additional offline capabilities. I've tested it on iPod Touch, Android <2.1, Safari and Firefox.

Here is an animated gif demonstrating the offline functionality.

Here is a video that also describes how this functionality has been implemented:



Here is the project, here the documentation and here the direct download link.

comments powered byDisqus