on 11-30-2015 5:04 PM
Hi,
could somebody tell me, if we can with the current version Web IDE 1.17 display the own generated (and changed) mock data or is there a bug?
At this moment I can see the json files are generated in the folder "localService". Every looks good, but if I run the app with "run the mock data", not the json files are shown.
Maybe I forgot a step.....
BR,
Dirk
Hi,
Perhaps you need to change the mock data source in the project settings of your application.
Right-click your app and choose Project Settings. Then under Mock Data select JSON files as the Mock Data Source.
Regards,
Michal.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michal,
thanks for your help.
It is set to the json files and the json files are there as expected. This was happen automatically, after generation of mock data.
If I watch this video by hana acadamy version 1.15 there is nothing more to do.
https://youtu.be/pg4vGexo9DQ?t=114
Regarding the documentation of Web IDE there is no point that I've to change the manifest or the component files. I would expect that this happens all automatically, as I can see in this video from version 1.15.
Now I don't know should it happen automatically or do I have to do something. Or did I something wrong?
BR,
Dirk
Hi Michal,
I would like to know, do I have to modify the app by myself (e.g. manifest or component file) after generation of the json files or should it run with the generated json files automatically?
If not, I think it should be mentioned that there are some changes / steps to do as Chantele described before.
Thanks,
Dirk
Hi Michal, hi Elina,
after a short investigation I found the reason, why the generated mock data were not shown.
The resources (json-files) couldn't be found. I created a folder "mockdata" an put the json files in there.
Now it works.
(I think the path has to be changed.)
Regards,
Dirk
Thanks for your help!
Hi
can you show your manifest file and component file code please?
Regards
Chantele
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chantele,
thanks for your help.
I changed only the path for "localUri" inside of the manifest and tried it with the patient.json file.
I'm not sure if I've to do the changings by myself, because it isn't described inside of the documentation.
Should it work on this way or did I something wrong?
BR,
Dirk
Hi
No problem, I had a similar problem myself a while ago.
In your manifest file under the sap.ui5 statement you can just do a config statemnt as below
"sap.ui5": {
"_version": "1.1.0",
"rootView": "sap.ui.demo.wt.view.App",
"dependencies": {
"minUI5Version": "1.30",
"libs": {
"sap.m": {}
}
},
"config": {
"patientLocal": "localService/PATIENT.json"
},
then in your Component.js file in the init() function you can declare your local service
// set invoice model - local
var oConfig = this.getMetadata().getConfig();
var sNamespace = this.getMetadata().getManifestEntry("sap.app").id;
var oPatientModel = new JSONModel(jQuery.sap.getModulePath(sNamespace, oConfig.invoiceLocal));
this.setModel(oPatientModel, "patient");
Then in your view you should be able to bind the values in your json file
"patient>/patientName" for example
If you haven't already you may need to set the metadata in your component file.
Hope that helps
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.