cancel
Showing results for 
Search instead for 
Did you mean: 

Error while loading JS libraries for UI5 and I5 Grid together

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Private_Member_14935
Active Participant
0 Kudos

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

Answers (2)

Answers (2)

agentry_src
Active Contributor
0 Kudos

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

former_member185280
Active Contributor
0 Kudos

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

HariCS23
Contributor
0 Kudos

Hi Christian and Ria ,


How to deploy sap ui5 component in netweaver ? I am using openui5 and VIZ is not available with openui5 .


i can't access http|s://<host>:<port>//sapui5/resources/sap-ui-core.js. I am getting "Requested resource does not exist "


Thanks

Hari




Private_Member_14935
Active Participant
0 Kudos

Hi Hari,

You should download the UI5 SCA for your Netweaver version, which would be something like this: UISAPUI5JAVA*.SCA

Then deploy this sca and then you should be able to access the http|s://<host>:<port>//sapui5/resources/sap-ui-core.js

Thanks and Best Regards,

Ria

HariCS23
Contributor
0 Kudos

Thanks Ria for quick response.

I tried to find the sca with the name pattern you mentioned. but i found one with different name . Can you please validate whether i am looking at right component ?

Thanks

Hari