Skip to Content

External 'js' files could not be included in SAPUI5 app - Getting SignaturePad is not defined error.

Hi all,

I have implemented signature functionality in my UI5 app.I have used default Fiori MAster-Detail template available in WEBIDE. I was able to achieve signature pad when i run the app locally. Here's my project structure.

When I run the app from Overview page, I am not able to get that signature functionality.

It throws me an error stating "Uncaught ReferenceError: SignaturePad is not defined".

In my controller page also it shows error.

I have referred various blogs and tried including the code 1."com/work/manager/WorkManager/model/signature_pad.min" in component.js and

2."", "id_signpad", onload, onerror);


But nothing worked for me.. I am not able to call external 'js' files in my application.

Can someone help me with this?

projstruct.png (16.9 kB)
sign.png (13.9 kB)
Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Sep 05, 2018 at 01:49 PM

    Is that a custom control or just a JS lib?

    If it's a js lib you can include them inside your manifest.js as you would do with CSS file. Just look for the "resources" key and add to it:

    "js": [ {"uri": "/your/lib/name.js" } ] 
    Add comment
    10|10000 characters needed characters exceeded

    • I think that you should just need to include inside your manifest file and access them as you would do in a normal web browser. You don't need to require another time that file.

      So, just add them to the manifest and use the global variable that reference to the library directly (don't require them in your code).