on 2016 May 30 7:44 AM
Hi
We have built a fiori Master Detail application using the newer version of WebIDE ( 1.30). The App runs fine with actual data from oData service.
We can simulate it also with mock data generated by the Mock Server, however for that you need to create a run configuration with mock data on.
Is there a possibility that when ever we call the app thru index.html, it will always run with mock data.
in the earlier versions of MD template generated by WebIDE, there used to be a parameter 'responderOn' which will run it in mock mode. I cant find any similar attributes with the newer versions.
How do we enforce the app to run with mock data always?
Thanks
Sandip
Request clarification before answering.
Hi Sandip,
AFAIK, at moment this is not yet supported. It probably will be in the future.
Well, I retested it right now and it seems to be working. Here what I did:
1) I created a new FIORI app with SAP Web IDE
2) removed any run configuration and created a new one to run just the Component.js file (just to be sure I was doing it in the right way!)
3) opened the Component.js file and added the code
sap.ui.require([
"com/test/products/localService/mockserver"
], function(mockserver) {
// set up test service for local testing
mockserver.init();
});
in the init function just after the "this.getRouter().initialize();" line.
Pay attention here that you have to replace the path before the "localService/mockserver" string to match the namespace you assigned to your application.
Check my picture here:
4) Then I saved everything and I deployed my app to HCP.
5) I registered the app on FLP and run it from there. It seems working fine.
Let me know if you have any comment.
Regards,
Simmaco
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To follow the design pattern you may want to define it as
"com/test/products/controller/ErrorHandler",
"com/test/products/localService/mockserver"
], function (UIComponent, Device, models, ListSelector, ErrorHandler, MockServer) {
....
// create the views based on the url/hash
this.getRouter().initialize();
//start mock server
MockServer.init();
Regards,
Jamie
SAP - Technology RIG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.