1

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?

Boghyon Hoffmann
  • 17,103
  • 12
  • 72
  • 170
AntonSack
  • 1,021
  • 2
  • 25
  • 47

2 Answers2

1

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.

pguddi
  • 325
  • 2
  • 3
  • 11
0

You can pass the ID of the section in the XMLView as well, despite the API reference saying that the association awaits an object of type sap.uxap.ObjectPageSection.

<uxap:ObjectPageLayout selectedSection="firstSection">
  <uxap:ObjectPageSection id="firstSection">

selectedSection: The section that is selected by default on load.

Boghyon Hoffmann
  • 17,103
  • 12
  • 72
  • 170