Sep 30

Use flowchart.js and raphael.js in XPages – problem and solution

I came across a weird problem today. The task was to use flowchart.js in an XPage to create a flowchart like this:


So I downloaded flowchart.js, added it to the WebContent folder of the NSF and included it to the XPage using this code:


Since flowchart.js is using raphael.js I did the same with Raphaël’s library. Pretty straigtforward, isn’t it?

Unfortunately, it simply didn’t work. Chrome’s console simply told me something about “Raphael is not defined”. So there was some problem with loading the raphael.js, obviously.

First I thought about a charset problem. raphael.js is using some special chars, but the file I downloaded was coded in UTF-8, so it should be fine. On the other hand, when opening raphael.js from the NSF with an URL like “http://host/path/db.nsf/rapahel.js”, Chrome told me it’s in a Windows codepage and there were lots of weird characters.

So I did various tests to investigate further, but to no end. Wether I saved the raphael.js file in Mac or Windows, stored it in WebContent or as file resource or in Domino’s HTML folder, the problem remained.

The customer for which I’m working at the moment found something about the “Raphael is not defined” message at stackoverflow, and the cure should be to use AMD module loading. Due to the charset weirdness I didn’t thought about that proposal very much and continued with the charset investigation… but in the end, I was wrong.

Indeed, raphael.js seems to have problems when loaded after other JavaScript libraries. The following code was suggested at the raphael site:

define([ "path/to/raphael" ], function( Raphael ) {
  console.log( Raphael );

Unfortunately, that does not work in XPages wit Dojo. But this combination of traditional loading and Dojo’s AMD loader works for me:


and in the body of the XPage:

After the require the Raphael object exists just fine and can be used by flowchart.js.

I admit that I don’t fully understand what’s going on, since I didn’t used Dojo’s AMD loading much yet. Perhaps someone can shed some more light on this topic 🙂

Sep 23

Some more recent changes in DominoToGo

Beside the multiple category filter feature DominoToGo evolves in other areas, too:

  • The architecture has been re-engineered to use require() and be ready for future Titanium SDK versions (where the Ti.include() call will not be available anymore).
  • When creating a NotesDocument locally in the app, DominoToGo will create a local XML representation of that NotesDocument automatically. You don’t need to upload the data to Domino and download the NotesDocument from Domino in order to work with the NotesDocument in the app.
  • Support for Notes views where documents are displayed multiple times. They can be synchronized for offline usage as every other Notes view now.
  • Improvements for uploading attachments to a Notes document in Domino (for example, take a photo and upload to Domino).
  • As always, even more performance improvements. DominoToGo is the fastest way I’m aware of to synchronize a lot of data to a mobile app.
  • Complete new documentation.

Plus there is a full UI framework for Titanium Alloy now as an option. The framework offers ready-to-use controls for a Domino view, picker dialogs, form fields, validation and more. The documentation for that UI framework starts here.

So, there are new features and improvements – but what’s most important is that the core of DominoToGo is still very stable and reliable. If you want offline first mobile apps, DominoToGo is the way to go.

Sep 23

New in DominoToGo: filter view data by multiple categories

In Notes and XPages you can filter a view by one category using the single category feature. In the most recent version of DominoToGo, one can now use multiple categories to filter a view – again a feature that Notes and XPages don’t offer!

When synchronizing the data of a Notes view to the mobile app, you can now use something like this:

var db = new NotesDatabase("", "dbid");
var view = db.getView("dataByName");
var callback = function(success, e) {
DTG.log("update completed");
view.update(callback, true, "", {
singleCategory: ["Ben Sisko", "Elim Garak", "Worf", "Odo"]

Using this feature, you have way more possibilities to filter the data you want to synchronize to the mobile app for offline usage. I wish I would have this feature in Notes and XPages, too 🙂

See the documentation for more.

Jul 14

World Cup! Congratulations to the German Soccer Team!

It’s the proof that a team is more than the sum of it’s individuals. After the hilarious 7:1 game against Brazil, our german team had to do a hell of a fight against Argentina yesterday. Both teams had their chances, but one scene changed it all, 7 minutes before the end of the after play time:

But it was not over then. Argentina still fought, and in the very last minute there even was a free kick situation quite near the german goal. But Messi missed! What a intense, suspenseful game! Or as a Klingon would put it: there will be an opera composed about that game (just as for the 7:1 win against Brazil before).

Thanks to the team for a really remarkable Word Cup!

Jul 10

I will reduce using US based services. Guess why.

I always was aware that the NSA does some spying even at friends, and I already wrote about serving company data to the NSA on a silver plate when using cloud services years ago. And so far I thought “that’s the world how it is, if a company uses cloud stuff, they should know the risk, but at least my private stuff is save”.

But I have to admit that I didn’t thought that the US does that much spying on all of us. That users who are running a TOR node gets on black lists. That even the german government (and most probably other european governments as well) are infiltrated by US spies.

I mean, everyone knows that there are spies from other, non-allied countries. But being a friend means trusting each other, doesn’t it? There are so many real threats in the world out there, why wasting resources with spying friends?

I know that there are many people in the US who are embarrassed about their government and intelligence apparatus. But in more than a year there is no sign that any official authority understands why more and more people in Europe are getting mad about the US.

And that’s a pity. Because the US and Europe, and US and Germany in particular, are friends and should continue to be friends. But all that spying stuff simply means: the authorities in the US do not trust us. They do not see us as friends. They see us as targets. They get company secrets from us to give US companies advantage. They get government secrets from us to get an advantage in negotiations.

People in US intelligence say we are naive. That may be their outlook to the world. But I simply think that friends should work together, not against each other.

And since money is the best way to make a statement, I will cancel using services from US companies as much as I can. Since there are (european) alternatives to Google, Dropbox and so on, that’s relatively easy.

Do you see? Betraying friendship between countries lead to scattered regionalism. It’s exactly the wrong thing to do.

And most probably I just got on some NSA black list right now just because I wrote this blog posting. That’s frightening, isn’t it?


Jul 01

Quote about DominoToGo

“Thank you for continued hard work. Domino to Go is becoming an indispensable tool for mobile Notes development and it’s getting better with each release.” – a DominoToGo customer


Jun 30

New DominoToGo documentation released!

In preparation for the upcoming DominoToGo Version 3 release I’ve created a new documentation using JSDuck. It’s more complete, contains some best practices and is much easier to use. Have a look at!

(Note: the URL redirects to a URL at the moment)

Jun 30

One-Day tutorial for Titanium Alloy

You know, to develop mobile apps for IBM Notes and Domino I’m recommending Appcelerator Titanium together with DominoToGo.

Appcelerator Titanium has a pretty cool MVC framework named Alloy. Fokke Zandbergen, a well known Titanium consultant from The Netherlands, published a one-day tutorial for Alloy. Have a look!