sap.uxap.ObjectPageLayout: 如何在加载时设置默认版块页面?
sap.uxap.ObjectPageLayout: How to set default section page on load?
我正在使用 sap.uxap.ObjectPageLayout
和一堆 ObjectPageSection
。每当我打开包含 ObjectPageLayout 的视图时,我都希望显示第一部分。我看到有 association selectedSection
但它需要一个 sap.uxap.ObjectPageSection
类型的值。设置第一部分的 ID 没有帮助。那我应该在那里输入什么?
我猜你需要在再次进入你的ObjectPageLayout 的路由时设置它。然后 this.byId("objectPageLayout").setSelectedSection(this.byId("sectionId"))
应该工作。
您也可以在 XMLView 中传递该部分的 ID,尽管 API reference 表示关联等待类型为 sap.uxap.ObjectPageSection
的对象。
<uxap:ObjectPageLayout selectedSection="firstSection">
<uxap:ObjectPageSection id="firstSection">
selectedSection: The section that is selected by default on load.
我正在使用 sap.uxap.ObjectPageLayout
和一堆 ObjectPageSection
。每当我打开包含 ObjectPageLayout 的视图时,我都希望显示第一部分。我看到有 association selectedSection
但它需要一个 sap.uxap.ObjectPageSection
类型的值。设置第一部分的 ID 没有帮助。那我应该在那里输入什么?
我猜你需要在再次进入你的ObjectPageLayout 的路由时设置它。然后 this.byId("objectPageLayout").setSelectedSection(this.byId("sectionId"))
应该工作。
您也可以在 XMLView 中传递该部分的 ID,尽管 API reference 表示关联等待类型为 sap.uxap.ObjectPageSection
的对象。
<uxap:ObjectPageLayout selectedSection="firstSection">
<uxap:ObjectPageSection id="firstSection">
selectedSection: The section that is selected by default on load.