Using a HTML5 Canvas to capture a signature on the iPad from XPages

One of the nice things about the ipad is being able to use your finger or a stylus to ‘draw’ your signature in an app and then have it captured. There are some easy to use frameworks to do this in native apps but if you are building XPage application then you can’t use those frameworks unless you plan to create hybrid apps using PhoneGap or Titanium.

However the iPad and other touchscreen devices all use HTML5 compliant browsers and with HTML5 there is a new canvas tag that sets up a drawing area. Using the touch events you can figure out where the persons finger is and then draw on the canvas as they move it around. As the signature is being drawn you can also capture the X Y coordinates used by the canvas and store them in an input field so when the form is submitted you have all the information required to regenerate the signature.

Using these concepts I’ve build an XPages custom control that you can test out here. Once I’ve tidied it up a bit and tested it some more I’ll release it on OpenNTF. This control works on both touchscreen devies and on your desktop machine using your mouse to draw the signature. The large blocks of data you see in the view in the test application is the jsonified array of coordinates used to save the signature.

Enjoy!

Tagged with: , ,
Posted in None

Source Control for the Domino Developer at Lotusphere 2012

The Lotusphere abstract notifications were yesterday and I’m pleased to announce that the abstract that I submitted was accepted. It is a great topic that I hope attendees will be interested in.

Tagged with:
Posted in Uncategorized

A new version of fileSendr has been released.

A new version of fileSendr has been released on OpenNTF. It features a new multi-file upload control based on jQuery Uploadify that should resolve a lot of the issues people have had with fileSendr in Internet Explorer in the previous versions.

I’ve also reworked the custom messages that can be sent as part of the notification to the recipients so that they are now using the richtext CKEditor field and if your running the beta of Domino 8.5.3 then you can also use the new oneUI V2.1 styles right from the application configuration.

There have also been lots of bug fixes and tweaks that will make the application more user friendly and additional security checking to hide uploaded files away from people who don’t have the correct urls to the files.

One thing to note is that due to the new upload system the Amazon S3 support has been disabled in this version for the time being.

Access the OpenNTF project here :

Tagged with:
Posted in None

Single Copy XPages Design

Introduced in 8.5.2 there is a feature called Single Copy XPages Design ( or SCXD ) that hasn’t really had a lot of press. Not to be confused with Single Copy Template ( SCT ) this is a feature that can save you a lot of disk space and increase XPages performance if you have a lot of XPages application that all use the exact same template.

To get SCXD working correctly you need two versions of your application template. Lets call them SCXD Master Template and SCXD Servent Template. The SCXD Master Template will contain all the Xpages design elements, forms, views, resources, themes, css files etc. The SCXD Servent Template will just contain the forms and views and a single blank XPage so that you can point the database launch properties to something.

The next stage is quite simple. Create a database from the SCXD Master Template. Then in the SCXD Servent Template set the Application XPages properties to enable the SCXD system and point it to the SCXD Master Database that you just created.

Now for each of your XPage application that use the common template you can replace the design with the SCXD Servent Template.

Once you have finished replacing the design of the databases you need to issue a ‘Restart Task HTTP’ so that the XPages processor can start using the new SCXD database.

If you have lots of databases using this single template you get lots of benefits. The first being disk space saving, you don’t have to have all those xpages design elements and resources in multiple databases. Secondly is the XPage renderer only needs to load these design elements and java classes into memory once so you get rid of that small delay that sometimes happens when opening a XPage app for the first time ( this can be made even faster with the XPagesPreLoad option coming in 8.5.3 being pointed to the SCXD Master Database).

I started looking at SCXD because we’re developing a system where there will be a couple of thousand ( about 35,000 ) NSFs all using the same design. By being able to remove the XPage design elements we see an instant disk-space saving of over 90Gb and I’m sure the users won’t be complaining about the performance increase also.

There are more details about SCXD on the Domino Dev Wiki @

Tagged with:
Posted in None
Archives