OData service data binding

keshet

I have a hard time with displaying data from OData model.

Here is the model declaration:

var oModel = new sap.ui.model.odata.ODataModel("northwind/V2/(S(ql0iexfh2tyudc5p4qhx5gdf))/OData/OData.svc");
sap.ui.getCore().setModel(oModel, "odata");

I have a destination for Northwind OData service with path "/northwind".

Here is my list declarations:

var oResultsList = new sap.m.List(); 
var oListTemplate = new sap.m.StandardListItem({
    path: "odata>/Categories",
    title: "{odata>name}"
});
oResultsList.bindAggregation("items", "/", oListTemplate);

But I get empty list.

If I'm correct, I have a connection to the service, because I can get and see the metadata object of this service.

Where my problem is hiding?

matbtt

Your binding seems to be erroneous, e.g. the property should be CategoryName and the item aggregation needs to be bound against the entity set.

var oListTemplate = new sap.m.StandardListItem({
    description: "{odata>Description}",
    title: "{odata>CategoryName}"
});
oResultsList.bindAggregation("items", "odata>/Categories", oListTemplate);

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Binding an AnalyticMap Model with an OData service in UI5

Angular 2 Service Data Binding

How to attach data to an sap.m.StandardListItem from odata binding?

oData binding to Simple Form

Reactive Form Data Binding with Angular Service

WCF data service Execute sproc using wrong oData protocol version

ABAP oDATA Service: How to provide nested data in one call?

Dynamic odata service in C# from runtime data layer

Odata Wcf data service .NET client event notification

OData Service Versioning

OData service in Cordova

Angular 2 Service Two-Way Data Binding

Angular Binding to a function on the view results to infinite calls to the data service

angular2 data binding between service and component properties

SAPUI5: How to show a loading dialog box while pushing data to OData Service?

How to get full content URL of content item using Sitefinity oData (Web Service) and add it to response data?

Cross-Service references in OData

Suffix ".svc" on url for odata service

Multiple odata binding sapui5

How to add $filter to OData aggregation binding in XML

Android Service binding with MvvmCross

AsynTask and Service binding

Service binding chain

Binding a service to the Application context

Binding a remote Service (AIDL)

Android: Binding to a remote service

How to copy files from sharepoint into blob storage azure data factory v2 using Odata linked service

Null Pointer Exception when Data-Binding a value from a Service in JavaFX

Binding Data from web service using URL and bind it with a class - ASP.NET MVC 5