Skip to Content

Component.js not loading manifest.json in sapui5

Hi,

I Had created a SAPUI5 project in Eclipse and when i run the application in Web appPreview and it is working fine where Manifest.json is getting called from Component.js.

please find the attached shot1.

But now i deploy the same application in ABAP system and i running the application using RUN on ABAP Server and i am not getting the output and when i look at the Network tab and i observe the manifest.json is not getting called from Component.js and i am getting status as 304.

please find the attached screen shot2.

Add comment
10|10000 characters needed characters exceeded

  • index.html
    <!DOCTYPE HTML>
    <html>
    	<head>
    		<meta http-equiv="X-UA-Compatible" content="IE=edge">
    		<meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>
    
    
    		<script src="resources/sap-ui-core.js"
    				id="sap-ui-bootstrap"
    				data-sap-ui-libs="sap.m"
    				data-sap-ui-compatVersion="edge"
    				data-sap-ui-resourceroots='{
                            "sap.ui.demo.wt": "./" }' 
    				data-sap-ui-theme="sap_bluecrystal">
    		</script>
    		<!-- only load the mobile lib "sap.m" and the "sap_bluecrystal" theme -->
    
    
    		<script>
            sap.ui.getCore().attachInit(function () {
            	new sap.m.Shell({
                    app : new sap.ui.core.ComponentContainer({
                       name : "sap.ui.demo.wt",
                       height : "100%"
                    })
                 }).placeAt("content");
            });
    		</script>
    
    
    	</head>
    	
    
    
    	<body class="sapUiBody" id="content">
       </body>
    </html>
    
    Component.js
    sap.ui.define([
       "sap/ui/core/UIComponent",
       "sap/ui/model/json/JSONModel"
    ], function (UIComponent, JSONModel) {
       "use strict";
       return UIComponent.extend("sap.ui.demo.wt.Component", {
          metadata : {
                manifest: "json"
          },
          init : function () {
             // call the init function of the parent
             UIComponent.prototype.init.apply(this, arguments);
             // set data model
             var oData = {
                recipient : {
                   name : "World"
                }
             };
             var oModel = new JSONModel(oData);
             this.setModel(oModel);
          }
       });
    });
    
    manifest.json
    {
      "_version": "1.1.0",
      "sap.app": {
    	"_version": "1.1.0",
    	"id": "sap.ui.demo.wt",
    	"type": "application",
    	
    	"dataSources" : {
                   "invoicedet": {
                        "uri": "http://ehp7prd.sap.in:8200/sap/opu/odata/sap/ZFIORIPRAC_SRV",
                         "type" : "oData"
        }
       },
    	
    	
    	
    	"i18n": "i18n/i18n.properties",
    	"title": "{{appTitle}}",
    	"description": "{{appDescription}}",
    	"applicationVersion": {
    	  "version": "1.0.0"
    	}
      },
      "sap.ui": {
    	"_version": "1.1.0",
    	"technology": "UI5",
    	"deviceTypes": {
    	  "desktop": true,
    	  "tablet": true,
    	  "phone": true
    	},
    	"supportedThemes": [
    	  "sap_belize"
    	]
      },
      "sap.ui5": {
    	"_version": "1.1.0",
    	"rootView": "sap.ui.demo.wt.view.App",
    	"dependencies": {
    	  "minUI5Version": "1.30",
    	  "libs": {
    		"sap.m": {}
    	  }
    	},
    	"models": {
    	  "i18n": {
    		"type": "sap.ui.model.resource.ResourceModel",
    		"settings": {
    		  "bundleName": "sap.ui.demo.wt.i18n.i18n"
    		  }
    		},
    		
    		
    		  "invoice2": {
    			"type": "sap.ui.model.odata.v2.ODataModel",
    			"dataSource": "invoicedet"
    			
    			},
    		
    		
    		
    		
    		"invoice": {
    	    "type": "sap.ui.model.json.JSONModel",
    	    "uri":"Invoices.json"
    	  }
    	},
    	
    		"resources": {
    	  "css": [
    		{
    		  "uri": "css/style.css"
    		}
    	  ]
    	}
    		
    	  }
    	}
    
    
    
    
    
  • Get RSS Feed

1 Answer

  • Apr 16, 2017 at 07:55 AM
    Add comment
    10|10000 characters needed characters exceeded