on 09-27-2014 1:11 AM
Hello Experts,
I am trying to load JavaScript libaries for UI5 (OpenUI5 SDK) and I5 Grid (from bootstrap.js).
My requirement is to create UI5 as well as I5 Chart/Grid components in the IRPT pages.
Development environment is MII 14.0 sp04 .
I have added a JS link for my UI5 library as follows, in my IRPT page.
<script src="/XMII/CM/DCMS_Master/UI5Library-1.22.8/resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.m, sap.ui.table, sap.ui.commons"
data-sap-ui-theme="sap_bluecrystal">
<script>
sap.ui.localResources("/XMII/CM/DCMS_Master/UI5Library-1.22.8/resources");
</script>
Afer this Include, I have loaded the I5 component JS library like this:
<SCRIPT type="text/javascript" src="/XMII/JavaScript/bootstrap.js" data-libs="i5Chart,i5Grid"></SCRIPT>
However, I get an error on the console as follows
Failed to load resource: the server responded with a status of 404 (Not Found)
<MII Server Host>:50000/XMII/CM/DCMS_Master/UI5Library-1.22.8/resources/JSONListBinding.js
Uncaught Error: found in negative cache: 'sap/ui/model/json/JSONModel.js' from /XMII/CM/DCMS_Master/UI5Library-1.22.8/resources/sap/ui/core/library-preload.json/sap/ui/model/json/JSONModel.js: Error: failed to load 'JSONListBinding.js' from /XMII/CM/DCMS_Master/UI5Library-1.22.8/resources/JSONListBinding.js: 404 - Not Found sap-ui-core.js:80
Uncaught Error: "Element sap.ui.commons.layout.MatrixLayout#matrix4" is not valid for aggregation "content" of ManagedObject sap.ui.core.UIArea#headerSelection sap-ui-core.js:134
Does that mean that I5 JS libs and UI5 libs cannot be imported together?
Any help will be appreciated.
Best,
Arihant Kothari
Hi Arihant,
The i5component JS library internally loads the SAP UI5 library that you are trying to load explicitly. If you intend to use both MII i5 components and SAP UI5 components together then you can just use the following:
<SCRIPT type="text/javascript" src="/XMII/JavaScript/bootstrap.js" data-libs="i5Chart,i5Grid"></SCRIPT>
And for sure you would have deployed SAP UI5 library on your MII server right.. ? In that case you load the UI5 library with the following script tag:
<script src="/sapui5/resources/sap-ui-core.js" id="sap-ui-bootstrap"data-sap-ui-libs="sap.m, sap.ui.table, sap.ui.commons" data-sap-ui-theme="sap_bluecrystal">
<script>
In case you choose to use only SAP UI5 components/controls then you can use only the above script tag so that the MII i5 components don't get loaded.
To check if SAP UI5 is deployed on your server you can try to access the following link:
http|s://<host>:<port>//sapui5/resources/sap-ui-core.js
And to check the SAP UI5 version you can type the following in browser console: sap.ui.version
Hope this helps!
Thanks and Best Regards,
Ria
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thread is now locked to prevent necromancy (look it up or read the Rules of Engagement in the Getting Started link at the top right).
Cheers, Mike (Moderator)
SAP Technology RIG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Arihant,
If you want to use the MII ui5 libs with the openui5 libs you will probably have to make your own copy of the /XMII/JavaScript/bootstrap.js file and modify the loadUI5Core() function to point to the location of your openui5 libs. I think you will still have problems thou because I don't think the charting libs (sap.viz) that the MII libs are dependent on are included as part of openui5 yet. Your best bet is to install and use the standard ui5 libs from SAP.
Regards,
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.