Skip to Content
Author's profile photo Former Member

You need to load the necessary lib manually in JsView

Problem:
A customer is developing a custom UI5 tile in HANA studio according to the links below:
Custom UI5 Tiles
Creating custom tiles with SAP HANA UI Integration Services (UIS)

But he got an error in browser’s F12 console:
“2016-10-04 15:22:55 The view instantiation resulted in js errorTypeError: Cannot read property ‘ui’ of undefined – ”

His code looks like:

Root cause:
The error occurs because sap.suite is not loaded.

Solution:
The code examples shown on the Creating custom tiles with SAP HANA UI Integration Services (UIS) are done as XML view. The xml namespace is parsed by the XML preprocessor and the sap.suite.ui.commons lib is loaded automatically. If a JsView is used, this step needs to be done manually.
“sap.ui.getCore().loadLibrary(“sap.suite.ui.commons”);”

This loads the suite-ui-commons lib.

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.