I have a master-detail page, master list is bind with /ThingSet
<List items="{ path: '/ThingSet'}">
And ThingSet
is associated with ElementSet
, I can get assigned ElementSet
by entity.svc/ThingSet('7d46be8a9348')/assignedElements
, 7d46be8a9348 is id of one Thing.
So my questions is how to bind assigndElements to sap.m.Table in detail page?
<Table items="{ path: '/ElementSet'}">
I have tried :
1.
var oAssignModel = new sap.ui.model.odata.v2.ODataModel("destination/..../entity.svc/ThingSet('7d46be8a9348')/assignedElements");
oAssignTable.setModel(oAssignModel);
Which will failed at GET destination/..../entity.svc/ThingSet('7d46be8a9348')/assignedElements/$metadata
2.
oAssignTable.bindElement({
path : sAssignedPath,
model : this._oModel
});
(I can see data loaded in this way)
Not working.
3.
Use JSON Model data binding, but this will cause an empty GET request. And JSON Model data binding makes it hard to get bindingElement etc. Also, this will make table grow fail.