on 12-03-2014 1:14 PM
Hello all,
The design time of our project involves creating a SAPUI5 project in eclipse; and then we share the project in the SAP ABAP repository to create a BSP application.
Now, instead of loading all the library files(like sap.ui.commons, sap.ui.ux3) in the index.html; i am trying to load the the files on demand in my application code using the loadLibrary method provided by the sap.ui.core.Core. But it throws an error message "Uncaught TypeError: undefined is not a function".
Also, if i debug and watch the value of sap.ui.getCore().loadLibary("sap.ui.table"), it returns a correct response.
Have you encountered such issue?
Alternatively, i have tried using the jQuery.sap.require("sap.ui.table"), when i observe the Network in the debugger mode in Chrome I observe that the library files gets loaded but it gives the same error.
Regards,
Jagannathan R
Hi,
An alternative method to load the libraries dynamically(instead of using the sap.core' loadLibrary()) can be done the following way:
jQuery.sap.registerResourcePath("","resources/");
jQuery.sap.require("sap.ui.table.Table");
Regards,
Jagannathan R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jagannathan,
I am facing issue while loading the resource in dynamic way, using following code
jQuery.sap.registerResourcePath("com.abc.abd","http://hostName:port/path");
jQuery.sap.require("com.abc.abd");
its registering the "path" discarding the host-Name and port,only in fiori launchpad please kindly help me
Regards,
Shrinidhi K.
hi,
i am not sure, but have you tried giving the reference of the same file in mime.xml of ABAP repository?
or is that same file got loaded properly?
where as in ABAP repository, where ever you are giving reference the path should be like this"
../../../../../sap-ui-core.js"
regards,
Prasad.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.