on 2014 Jan 19 6:59 AM
When using Components in UI5 apps I can see a stray GET request each time the application is loaded looking for Component-preload.js in the app directory.
There is a little bit of explanation on preloading in the SDK help (but not much). From what I can gather: library pre-loading is something thats only applicable to the SAP-provided UI5 libraries. Our own code can't execute till the UI5 libraries are loaded anyway
I've tried setting data-sap-ui-preload="async" (sync is the default); but then UI5 won't load. Interestingly if I set sap-ui-preload=auto as a url query string parameter; the app seems to load normally (sync) and there is no stray GET on the Component-preload.js file.
Does anyone have any further information on pre-loading and why there is a GET request on this file and the best way to stop it.
If you also know how to stop all the message bundle GET's that would be interesting to know as well. 😉
Request clarification before answering.
HI Gurus,
I am getting the same error Please help.
launchdashboard is my initial view
component.js
------------------------------------------
jQuery.sap.declare("ZGreenfield.Component");
sap.ui.core.UIComponent.extend("ZGreenfield.Component", {
createContent : function() {
// create root view
var oView = sap.ui.view({
id : "App",
viewName : "ZGreenfield/greenfield_refinery.launchdashboard",
type : "JS",
viewData : { component : this }
});
// // Using OData model to connect against a real service
// var url = "/proxy/http/<server>:<port>/sap/opu/odata/sap/ZGWSAMPLE_SRV/";
// var oModel = new sap.ui.model.odata.ODataModel(url, true, "<user>", "<password>");
// oView.setModel(oModel);
// Using a local model for offline development
var oModel = new sap.ui.model.json.JSONModel("jsonFiles");
oView.setModel(oModel);
// done
return oView;
}
});
--------------------------------------------
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
id="sap-ui-bootstrap"
src="resources/sap-ui-core.js"
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>
new sap.ui.core.ComponentContainer({
name : "ZGreenfield"
}).placeAt("content");
</script>
</head>
<body class="sapUiBody" role="application">
<div id="content">
</div>
</body>
</html>
-----------------------------------------------
Many Thanks
Pandu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.