How to bind nested OData($expand query option) in SAPUI5?

     In this tutorial we will see how to bind nested OData in SAPUI5. We have already seen how to implement nested OData($expand query) in SAP backend. Our aim is to bind the data from an expanded entityset to a control in our SAPUI5 application.Remember expanded entityset means one set of entities and each entity will have multiple associated expanded entities.We will use a sap.m.List control inside another sap.m.List control.

  1. Open our view and put below code inside.The OData protocol provides different url parameters.We will make use of Expand parameter.The expand parameter allows the application to read associated entities with their navigational properties.I have used two expand parameters here ToFlightSchedules and ToFlightBooking.

  2. No coding in controller.Run the application.I have pasted the screenshot of my application.

If you enjoyed this post, I’d be grateful if you’d help it spread by sharing.Thank you! See you soon


Post a Comment

Powered by Blogger.