Hello Experts,
I am developing an UI5 app based on Northwind service and running it in Local App Preview in Eclipse.
I am using below code to create my OData Model.
serviceOModel = new sap.ui.model.odata.ODataModel("proxy/http/services.odata.org/Northwind/Northwind.svc" , true );
OData call is behaving differently in the following two cases.
Case 1.When I do a bindRows to a table, using the following code
sap.ui.getCore().byId("table_Products").bindRows({path:"/Products"});
I am getting following error.
The url that is being triggered in this case is
Case 2.But if I do an OData read using the following code,
serviceInitializer.serviceOModel.read("/Products",null,null,false,function(){},function(){})
There is no error. but in this case the URL(screenshot below) fired is different and thus it does not cause any error.
My question is, in both the cases I am firing an URL for Products collection. Then why am I getting CORS issue only in the first instance and why proxy setting is not being considered in bindRows?
How to resolve this issue?
Regards,
Atanu