After the implementation of the application foundation, we can go further with the implementation of the views. We start with the list view, the view that should be shown after the initial start of the application. We will use the sap.f.DynamicPage to implement the basic layout.
Watch this video to know more about the structure of the sap.f.DynamicPage control used in the List View.
Reasons to use DynamicPage controls
- You need to have a title, that is always visible and a header, that has configurable Expanding/Snapping functionality. If you don't need the Expanding/Snapping functionality it is better to use the sap.m.Page as a lighter control.
- You're displaying a sap.m.FlexBox with non-adaptive content (doesn't stretch to fill the available space), it is recommended to set the fitContainer property of the FlexBox to false. If you are displaying a sap.ui.table.Table, keep in mind that it is non-adaptive and may cause unpredicted behavior for the DynamicPage on smaller screen sizes, such as mobile.
- The snapping of the DynamicPageTitle is not supported in the following case: When the DynamicPage has a scroll bar, the control usually scrolls to the snapping point - the point, where the DynamicPageHeader is scrolled out completely. However, when there is a scroll bar, but not enough content to reach the snapping point, the snapping is not possible using scrolling.
- You are using sap.ui.layout.form.Form, sap.m.Panel, sap.m.Table and sap.m.List controls in the content of DynamicPage, you need to adjust their left text offset if you want to achieve vertical alignment between the sap.f.DynamicPageHeader`s content and DynamicPage`s content. For more information, see the documentation for the content aggregation.
The DynamicPage Responsive Behavior
The responsive behavior of the DynamicPage depends on the behavior of the content that is displayed. To adjust the DynamicPage content padding, the sapUiContentPadding, sapUiNoContentPadding, and sapUiResponsiveContentPadding CSS classes can be used.
This Image shows the implementation of the Overview view using the sap.f.DynamicPage:
