Search code examples
sapui5

sap.uxap.ObjectPageLayout: How to set default section page on load?


I am using the sap.uxap.ObjectPageLayout with a bunch of ObjectPageSections. I would like to have the first section being displayed whenever I open the view containing the ObjectPageLayout. I have seen that there is association selectedSection but it needs a value of type sap.uxap.ObjectPageSection. Settings the ID of the first section does not help. So what am I supposed to enter there?


Solution

  • I guess you'll need to set it when you enter the route again of your ObjectPageLayout. Then this.byId("objectPageLayout").setSelectedSection(this.byId("sectionId")) should work.