on 07-21-2014 12:54 PM
Hi experts
I've problem in binding the back-end data with sapui5 element.
For that i'm using OData service call ( url :' /sap/opu/odata/sap/Z_DEMO2_SRV/')
onInit: function() {
var oModel = new sap.ui.model.odata.ODataModel( "/sap/opu/odata/sap/Z_DEMO2_SRV",false, "username", "password");
//Set the Model to the Table
var oTable = sap.ui.getCore().byId("bankTableID");
oTable.setModel(oModel);
alert(oModel);
// Filter the DATA
var FilterOperator = sap.ui.model.FilterOperator;
var filter = new sap.ui.model.Filter("MANDT",FilterOperator.EQ, "AR");
//Bind the Data to the Table
oTable.bindRows("/rajesh");
},
i've included the error screen shot in attachment.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In his case, the URL had "localhost" in it, which was probably not the backend. Are you sure the HTTP request has the correct hostname in it?
When you using the Netweaver as web server you can skip the complete URL, not when you are testing it in the local server, in the local server your URL of the model should include the hostname.
This:
var oModel = new sap.ui.model.odata.ODataModel( "/sap/opu/odata/sap/Z_DEMO2_SRV",false, "username", "password");
Is wrong, unless you are running the app from SAP Netweaver Gateway server.
Hi Rajesh,
I guess you have issue with proxy server in your eclipse.
As you can see from your log, you tomcat server cannot find site where oData service should be.
I hope this helps you,
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
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.