Skip to Content
avatar image
Former Member

how to use jQuery.sap.registerModulePath

  • 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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • 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.

    Add comment
    10|10000 characters needed 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 :(

  • Aug 18, 2017 at 04:36 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded