cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Navigation Property values in SAPUI5

AbhishekSharma
Active Contributor

Hi Gurus,

I want to get the property values from Navigation path. I have Header entity which is used to bind some of the fields and then Navigation path which is used to bind smarttable.

When I am using below code it still returns Header Entity Properties.

var oItemContext = this.getView().byId("allitems.itemstable").getBindingContext().getObject();

when I see values it shows Navigation as well but marked as DEFERRED and no Property are visible to be accessed.

Please help.

Thanks-

Abhishek

Accepted Solutions (0)

Answers (1)

Answers (1)

maheshpalavalli
Active Contributor

Can you try like below:

oModel.getObject("/Suppliers(2)", { select:"City", expand: "Products" })

https://ui5.sap.com/#/api/sap.ui.model.odata.v2.ODataModel%23methods/getObject

Note: I am assuming that the navigation data that you want to read is already loaded into the UI, let us know if it is not the case.

Thanks,

Mahesh