HI all,
i have a problem with my mobile application developed using SAPUI5.
I have created a new object LIST (sap.m.List) in this way :
var oList = sap.m.List({
id : "ListId",
mode : sap.m.ListMode.SingleSelect,
})
var oItemTemplate = new sap.m.StandardListItem({
id : "sList",
title : "{EmployeeID}",
description : "{LastName}"
})
oList.bindAggregation("items","zzlistmodel>/value",oItemTemplate);
return new sap.m.Page({
title : "List Overview",
content : [oList]
})
the JSON model has been declared in this way :
onInit: function() {
// set global model
var oModel = new sap.ui.model.json.JSONModel("http://services.odata.org/Northwind/Northwind.svc/Employees?$format=json",true);
sap.ui.getCore().setModel(oModel,'zzlistmodel');
},
The problem is that in output i have 9 entries correctly but the attribute "Title" & "Description" are not binded correctly. Are these attributes wrong ? :
title : "{EmployeeID}",
description : "{LastName}"
If you run this link you can see the 9 entries for collection "Enployee" :
http://services.odata.org/Northwind/Northwind.svc/Employees?$format=json
Someone colud you help me?
Attached the output screen.
Thanks in advance.
Dario.