Skip to Content
1
Former Member
Aug 11, 2014 at 05:57 AM

component-preload.js not found (404 not found) In SAP fiori like UI5 APP

13955 Views

HI All,

I am trying to develop a fiori like UI5 app.

I have placed the component.js file in the same folder as that of index.html

I have read the Documentation from the below sites.

SAPUI5 SDK - Demo Kit

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/8022ac87-1f60-3110-5383-fa68a91d7f8b?QuickLink=index&…

below are the contents of component.js file (Zgreenfield is my App name , launchdashboard is my initial view)

-----------------------------------------------------------------

jQuery.sap.declare("ZGreenfield.greenfield_refinery.launchdashboard");

sap.ui.core.UIComponent.extend("ZGreenfield.greenfield_refinery.launchdashboard", {

createContent : function() {

// create root view

var oView = sap.ui.view({

id : "App",

viewName : "ZGreenfield.greenfield_refinery.launchdashboard",

type : "JS",

viewData : { component : this }

});

var oModel = new sap.ui.model.json.JSONModel("jsonFiles/.");

oView.setModel(oModel);

// done

return oView;

}

});

------------------------------------------------------------------


index.html

-------------------------------------------------------------------

<script

src="resources/sap-ui-core.js" type="text/javascript"

id="sap-ui-bootstrap"

data-sap-ui-theme="sap_platinum"

data-sap-ui-libs="sap.ui.commons,sap.ui.table,sap.suite.ui.commons,sap.viz"

data-sap-ui-resourceroots='{

"ZGreenfield": "./"

}' >

</script>

<script>

app: new sap.ui.core.ComponentContainer({

name : "ZGreenfield"

}).placeAt("content");

</script>

-------------------------------------------------------------------

below is the folder structure of my app



below is the error thrown in my browser console.




Please help !!


Many Thanks

Pandu



Tags edited by: Michael Appleby

Attachments

scn.JPG (28.1 kB)
scn browser.JPG (22.1 kB)