on 07-23-2020 5:24 PM
Hello everyone,
I am a beginner in SAPUI5 attempting to learn using the SAPUI5: The Comprehensive Guide by Modderman et al. I have created a simple application and added data-sap-ui-resourceroots to define the location of files for my namespace. Once I did that, my application failed to load, giving the error shown down below in the console. Anyone that can point me to the right direction will be highly appreciated.
Here my bootstrap code:
<script id="sap-ui-bootstrap" src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"
data-sap-ui-libs="sap.m" data-sap-ui-theme="sap_bluecrystal" data-sap-ui-preload="async"
data-sap-ui-compatVersion="edge" data-sap-ui-xx-bindingSyntax="complex" data-sap-ui-resourceroots='{"
sapui5.demo.mvcapp": "./webapp/"}'>
</script>
And here is the line where an error occurs:
// application data
var oData = {
"CountSuppliers": "2",
"Suppliers": [{
"ID": 0,
"Name": "Exotic Liquids",
"Address": {
"Street": "NE 228th",
"City": "Sammamish",
"State": "WA",
"ZipCode": "98074",
"Country": "USA"
}
},
{
"ID": 1,
"Name": "Tokyo Traders",
"Address": {
"Street": "NE 40th",
"City": "Redmond",
"State": "WA",
"ZipCode": "98052",
"Country": "USA"
}
}
]
};
// model creation and setting data
var oModel = sap.ui.model.json.JSONModel();
oModel.setData(oData);
// setting the model to the core
// so that it’s available in the whole application
sap.ui.getCore().setModel(oModel);
Here is the error message:
Following the same book guide, I just remove the async parameter and it works. remove that: data-sap-ui-preload="async"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.