Skip to Content
avatar image
Former Member

oData bindElement - failed to drill down

I try to generate a Master-/Detail-View with oData.

The onPress in my MasterController:

onItemPress: function(oEvent) {
var oUserContext = oEvent.getSource().getBindingContext("som"); var oUser = oUserContext.getObject();
this.getRouter().navTo("userDetails", {userId: oUser.Id});

And in my DetailsController:

onInit: function () {
this.getRouter().getRoute("userDetails").attachPatternMatched(this._onObjectMatched, this);

_onObjectMatched: function (oEvent) {
var sUserId = oEvent.getParameter("arguments").userId;
path: "/Users('"+sUserId+"')",
model: "som"

So i want to Display the details:

<Label text="{i18n>}" />
<Input editable="false" value="{som>Id}" />

But i get the following error:

Failed to drill-down into Id, invalid segment: Id - ../oData/Users('44ce4852-5985-44c3-9a75-03e252747d29')?$select=Id sap.ui.model.odata.v4.lib._Cache

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Mar 17, 2018 at 04:34 PM

    I find the solution:

    My oData-Service is returning a list an not a single object. I fixed this, now it is working fine!

    Add comment
    10|10000 characters needed characters exceeded