on 07-22-2015 6:45 AM
Hi Experts,
I am able to run my SAPUI5 Application properly, but when i integrate with Cordova Project and run it, it is not getting SAP Netweaver Gateway Data into the Mobile APP. Just the screens are being renederred without Data.
Step i followed:
1) Created an SAPUI5 Project and completed the implementation with SAP Netweaver Gateway as Gateway Server. (Successfully working).
2) Created a Cordova Project and integrated above SAPUI5 Project with it. (Just screens are seen, but no data from back-end)
Note: I am not using any proxy in calling the gateway service in Cordova Project as suggested in some documents.
Below is my code:
onInit : function() {
var ui_model = sap.ui.getCore().getModel(
"CommonSelDataModel");
// this.getView().setModel(ui_model,
// "CommonSelDataModel")
var oController = this;
var url = "https://www.xyz.com/sap/opu/odata/sap/XYZ_MOBILE_APP_SRV";
oDataModel = new sap.ui.model.odata.ODataModel(url,
true, "USERNAME", "PASSWORD");
sap.ui.getCore().setModel(oDataModel, 'oDataModel');
var fnError = function(oError) {
};
var fnSuccess = function(mData) {
var oODataJSONModel = new sap.ui.model.json.JSONModel();
oODataJSONModel.setData(mData);
oController.getView().setModel(oODataJSONModel,
'ProblemGroupList');
};
oDataModel.read("/ProblemGroupDataSet", null, null,
false, fnSuccess, fnError);
}, |
Kindly help me with the same
Thanks & Regards:
Azhar
I have done it.
Result : I was missing below statement in the index.html
<script type="text/javascript" src="cordova.js"></script>
Thanks & regards:
Azhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
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.