Skip to Content
0

how to use jQuery.sap.registerModulePath

Aug 18, 2017 at 11:07 AM

66

avatar image
Former Member
  • 1.There is a BSP Application/Project – MDG_LIB_BP.

This has fragments for views.

  • 2.The standard fiori app calls the MDG_LIB_BP application from the component in the below manner.
  • 1.Now I want to call the MDG_LIB_BP in my custom application in similar fashion.

Please help.

Useful reference: UI5 Demokit

1.png (122.6 kB)
2.png (98.0 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Sergio Guerrero Aug 18, 2017 at 02:21 PM
-1

an alternate solution... this is something I have done on my controller.js files

jQuery.sap.require("path.to.your.other.jsLibrary");

Another option is if you use the script tag in your html and reference the external library.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hello,

I tried the same in my controller as well as component, but i get the result as undefined.

jQuery.sap.registerModulePath("sap.fcg.mdg.lib.bp", "/sap/bc/ui5_ui5/sap/MDG_LIB_BP/sap/fcg/mdg/lib/bp")

undefined

The standard app has exactly the same path and is able to load the library, but i am not :(

0
Sharath M G Aug 18, 2017 at 04:36 PM
0

It is to refer to the folder in which all your views, controllers, fragments etc. are stored. Once mapped, you use the relative path to the inside folders, which invoking the views/controllers/fragments.

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Agreed, But i am unable to load the library

0

You mean the SAP UI5 library?

0