Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3570

Problem Importing OpenUI5 into MII 12.2

$
0
0

Need some beginners help setting up the OpenUI5 in MII 12.2 workbench.

 

I have developed simple shop floor web pages using javascript, but no jquery experience. Not able to upgrade to new version of workbench, and would rather install library files locally instead of accessing them via the web.  I have created a Workbench OpenUI5 project, and imported the OpenUI5 download files under the WEB tab, into a directory structure starting here: OpenUI5/Script/openui5_1_28_9

 

To test, I copied the OpenUI5 example into a workbench html file. It references the library via URL, and works as expected, you get a button and a popup.  src='https://openui5.hana.ondemand.com/resources/sap-ui-core.jsThe code is shown below.

 

When I copy example and replace src URL with my workbench path, src='/XMII/CM/OpenUI5/Script/openui5_1_28_9/resources/sap-ui-core.js', no joy, empty web page.

 

One thought is that the 5.1.28.9 library will not work with MII 12.2, but while I saw references to compatibility guide.  I could not find a list on the web.

 

I have tried placing my html file in the same folder as the sap-ui-core.js file, no change.  I am able to locate both the sap-ui-core.js and the button.js files via URL, so I know that they exist on the web server.  When I use the Developers Tools in IE, I see the sap-ui-core.js file loaded, but not the button.js, which is visible when referencing the hana URL, as in the example below.

 

I feel like this should be as simple as loading the library as I do any other script file. What small detail am I missing? I know I can simply use the hana URL, but would like to setup the library on the local MII server.

 

Example code using OpenUI5 library via URL:

 

<!DOCTYPE html> 
<html><head> 
  <meta http-equiv='X-UA-Compatible' content='IE=edge' /> 
  <title>Hello World</title> 

  <script id='sap-ui-bootstrap'
  src='https://openui5.hana.ondemand.com/resources/sap-ui-core.js
  data-sap-ui-theme='sap_bluecrystal' 
  data-sap-ui-libs='sap.m'></script> 

<script> 
  var btn = new sap.m.Button({
  text:'Press me!',
  press: function() {
  alert("Hello!")
  }
  });
  btn.placeAt('content'); 
</script>

</head>
<body class='sapUiBody'>
  <div id='content'></div>
</body>
</html>


Viewing all articles
Browse latest Browse all 3570

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>