Quantcast
Viewing all articles
Browse latest Browse all 4841

Re: Can anybody give me a demo code example of display templates(like i5Chart) in XML view?

Hi Venkatesh,


You're pointing to wrong library in the script, https://sapui5.netweaver.ondemand.com/resources/sap-ui-core.js is the URL where the UI5 library resources are located in the SAP HANA Cloud Platform delivery. This library doesn't consists of i5Grid and i5Chart libraries.


To make i5Grid/i5Chart working, you will have to point to SAP MII default bootstrap.


Try to access the following link :


http://<IP>:<PORT>/XMII/JavaScript/bootstrap.js


Few points to note:


1. When you're pointing to default SAP MII bootstrap, don't include another seperate script for UI5 library. Since, bootstrap already consists of SAPUI5 libraries in it.

2. Default SAP MII bootstrap doesn't consists of sap.m library. So include sap.m also whatever UI5 libraries required into default bootstrap.

3. If you check my previous response in this thread, there you can find the bootstrap that I'm pointing to, you can use the same code.

4. Create a new .js file in WEB and include the bootstrap code that has been provided in my response.

5. Now in your .irpt page, point the script to bootstrap that has been created.


My IRPT Page:


<!DOCTYPE HTML><HTML><HEAD><!—
*&=====================================================================
*&       [Company Name.]               
*&=====================================================================
*& Requirement Name: i5 Chart - SAPUI5 - XML
*& Author: Sai Vellanki                                            
*& Date Started: 23rd June, 2015                                                      
*&=====================================================================
*& Description:    
*&====================================================================
*&---------------------------------------------------------------------
*&                   C H A N G E  H I S T O R Y                       
*&---------------------------------------------------------------------
*&=====================================================================
*& Author:[Developer Name]                                            
*& Date Started:                                                      
*& Change Request:                                                    
*& Description:    [Brief explanation of the change]     
*&=====================================================================
--><TITLE>SAPMII - i5Chart - SAPUI5</TITLE>  <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9">  <meta http-equiv="cache-control" content="max-age=0">  <meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Expires" content="0">             <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>  <SCRIPT type="text/javascript" src="/XMII/CM/SaiVellanki/Practice/Bootstrap.js" data-libs="i5Chart,i5Grid"></SCRIPT><script>  jQuery.sap.registerModulePath('I5Path', '/XMII/CM/SaiVellanki/Practice/i5Chart_Sample/');  var oShell = sap.ui.getCore().byId("oShell");  if (!oShell){  var mainShell = new sap.m.Shell("oShell",{  app : new sap.ui.core.ComponentContainer({  name : "i5Chart_Sample.js"  })  });  }   mainShell.placeAt("appContent"); // place the App into the HTML document</script><style>  body{  margin-top: 0px !important;  margin-right: 0px !important;  margin-left: 0px !important;  margin-bottom: 0px !important;  }</style></HEAD><BODY>  <input type="text" id = "lname" style="display:none" value = {lastname}>  <input type="text" id = "fname" style="display:none" value = {firstname}><div id="appContent"></div></BODY></HTML>


Regards,

Sai Vellanki.


Viewing all articles
Browse latest Browse all 4841

Trending Articles



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