on 04-25-2019 10:43 AM
Hi All,
I have created a mock json data model in SAPUI5 application webide. It is working fine in webide. But after deployed the application in launchpad. Mock Json data is not load in view. Can you please give me your valuable suggestion.
When deploying, Web IDE starts build processes via grunt tasks. While doing that, it removes project resources that don't belong to the productive environment. One of the resources is the "test" folder.
> This ("test") folder has to be excluded when you are building a Component-preload.js. You should never reference resources of the test folder from your application, because when you deploy to a productive environment, the resource cannot be loaded. (source)
Make sure you're not including mock data or mock server in the "test" folder.
Additionally, apps deployed to FLP don't contain any HTML documents (neither index.html nor mockServer.html) but start right from the Component(-preload).js. Make sure you're not referencing mock data or mock server from those HTML documents.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In Launchpad while define-in path we need to mention our component name alone with the path for mock data
jQuery.sap.getModulePath("com.abc.real.model","/country.json")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check in Networks , weather mock.json is loaded or not , also check console , what error is appearing. If the file is not loaded Then,
Try. jQuery.require("/model/mock.json") in the controller , you are using that model.
OR
If your fiori version is older that your developed UI5 version.
You can also check ID of your app in manifest.json.
Make sure same ID is not used for any another application in fiori
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.