Additional Blog Posts by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
9,679

Recently I had been asked, if it is possible to capture user's signature on mobile device and store it on the server. It is of course possible to do so using some open source tools such as "szimek/signature_pad · GitHub". What would be interesting to know is how do we integrate it seamlessly with SAPUI5?

Here is a SAPUI5 custom control wrapper around the Signature Pad, which can make it easy for you to use this in your respective SAPUI5 / Fiori applications.

The demo can be seen here https://jsfiddle.net/rahulchoudhary/a3pz4go5/

If you dont want to use open source tools, you can still create your very own implementation using SAPUI5 custom control by attaching mouse / touch listeners to the canvas elements.

This dirty demo was written in hurry to help a colleague, hence there are lack of code comments. Feedback is always welcome to improve the implementation.

11 Comments
0 Kudos

Thanks for the article Rahul. This is indeed an unexplored area in SAPUI5 custom controls.

former_member182710
Participant
0 Kudos

Great work Rahul, keep up the innovation and developmen!

Former Member
0 Kudos

good job rahul.. thanks for the jsfiddle code.

Christian_Hoffm
Product and Topic Expert
Product and Topic Expert
0 Kudos

I like!

aruna_ar
Associate
Associate
0 Kudos

Good one ! like it

Sai_Nithesh_G
Contributor
0 Kudos

If it is view controller, it is working fine. But not working in the fragment.
I want to use signature pad in the fragment. 
I am facing rendering issue, as the controller is loaded first before the fragment is called.

Please help me out on this issue.

DanielBDNguyen
Explorer
0 Kudos

This was posted quite a while ago but thought I might as well response for future readers.

Assuming you’re using custom control, be sure to declare a namespace for it it inside your fragment. Like so:

<core:FragmentDefinition 
xmlns="sap.m"
xmlns:core="sap.ui.core"
xmlns:control="path.to.your.control">
...
</core:FragmentDefinition>

Then when the controller calls the fragment, the custom control will be loaded along with it.

Former Member
0 Kudos
Thank you Rahul, this is excellent.

 

But how to save this signature on my server to use it later?
Former Member
0 Kudos
Hi Rahul,

Thanks. Great Job.
Its working fine in my SAPUI5 Application, but when I deployed my app to FIORI Launchpad the I am draw signature on signature pad (CANVAS). Do you have any idea why it is happening. There is no error in console at all.
Thanks
former_member188396
Participant
0 Kudos
Hi Shakti,

 

Did you get it to work from the Fiori launchpad?

 

@rahulchoudhary: Do you know why it is not working from Fiori launchpad and just working outside? What do we need to do to make it work from Fiori launchpad?

 

Thanks,

Bhavik
rporpino-netzsch
Explorer
0 Kudos
Hi rahulchoudhary

do you have a clue why this code does not work anymore -- even in fiddle? I have a similar requirement, but I am stuck and posted the details here. It would be great to have your input. I thank you in advance.