content_image/990820.jpg
As shown in Figure 7-11, a custom widget enables the caseworker or customer to sign using his or her finger on the iPad, and then file that signature into the case. The custom widget enables the user to add a new image to the case and add a signature to the case. Adding a new image to the case is done using the standard IBM Content Navigator APIs. 

To create the custom widget that enables adding a signature to a case, follow these steps: 

1. Create a new dialog with a custom layout that will be built using Dojo. To support the signature functionality, add a Canvas element to the HTML template. 

2. The implementation of the signature was done using three specific Dojo libraries: 

– Dojo Touch 

– Dojo Gesture 

– Dojo DomGeometry 

These specific libraries were used to support the functionality both on desktops and mobile devices, while using other implementations will result in an unexpected behavior on different devices. 

3. When the user taps on the Save  button, an event is fired to the underlying widget from which the signature image file is added to the case. 

<img src='content_image/990820.jpg'>

