Object Page AnchorBar
AnchorBar has a different behavior based on the device
Z2UI5_CL_SMPC_APP_586
Controls
sap.uxap
UI5 1.71
The facts
- Repository
- abap2UI5/samples-controls
- Class
Z2UI5_CL_SMPC_APP_586- Source file
z2ui5_cl_smpc_app_586.clas.abap↗- Library
- sap.uxap
- UI5 entity
sap.uxap.ObjectPageLayout- Demo kit sample
sap.uxap.sample.AnchorBar- SAP's own sample
- running at sdk.openui5.org ↗
- Minimum UI5
- 1.71 — the floor abap2UI5 holds its samples to
- In the playground
- runs in the browser, with no system and nothing installed
Keywords: objectpagelayout, object, layout, sap.uxap, anchorbar, objectpagedynamicheadertitle, title, objectpagesection, objectpagesubsection, simpleform, label, text
Controls it builds
- sap.m.Label
- sap.m.Text
- sap.m.Title
- sap.ui.core.mvc.View
- sap.ui.layout.form.SimpleForm
- sap.uxap.ObjectPageDynamicHeaderTitle
- sap.uxap.ObjectPageLayout
- sap.uxap.ObjectPageSection
- sap.uxap.ObjectPageSubSection
Read out of the builder chain by the abap2UI5 linter, not from the category this sample is filed under — which is what makes “which samples build one of these” a question the catalogue can answer at all.
Libraries
Run it here
The sample running, in this page — the app on its own, with no editor over it.
Switch to Playground with this code
Nothing is installed and nothing is sent anywhere: the ABAP is compiled to JavaScript in this browser and runs against abap2UI5 itself.
The ABAP
z2ui5_cl_smpc_app_586.clas.abap — 401 lines
Click a number to link to a line — shift-click for a range.
Read it on GitHub ↗
" @keywords objectpagelayout object layout sap.uxap anchorbar objectpagedynamicheadertitle title objectpagesection objectpagesubsection simpleform label text
" @summary AnchorBar has a different behavior based on the device
CLASS z2ui5_cl_smpc_app_586 DEFINITION PUBLIC.
PUBLIC SECTION.
INTERFACES z2ui5_if_app.
PROTECTED SECTION.
DATA client TYPE REF TO z2ui5_if_client.
METHODS view_display.
PRIVATE SECTION.
ENDCLASS.
CLASS z2ui5_cl_smpc_app_586 IMPLEMENTATION.
METHOD z2ui5_if_app~main.
me->client = client.
IF client->check_on_navigated( ).
view_display( ).
ENDIF.
ENDMETHOD.
METHOD view_display.
DATA(view) = z2ui5_cl_ui5_view_builder=>factory( ).
" Block->content inlining (app 217/401/402/416 precedent): every blocks
" aggregation holds one sample:mySimpleBlock, a BlockBase wrapper around the
" static mySimpleBlock.view.xml - its SimpleForm is inlined 1:1 below
view->ele( n = `View` ns = `mvc`
)->a( n = `height` v = `100%`
)->a( n = `xmlns` v = `sap.uxap`
)->a( n = `xmlns:mvc` v = `sap.ui.core.mvc`
)->a( n = `xmlns:m` v = `sap.m`
)->a( n = `xmlns:forms` v = `sap.ui.layout.form`
)->ele( `ObjectPageLayout`
)->a( n = `id` v = `ObjectPageLayout`
)->a( n = `upperCaseAnchorBar` v = `false`
)->ele( `headerTitle`
)->ele( `ObjectPageDynamicHeaderTitle`
)->ele( `heading`
)->tag( n = `Title` ns = `m`
)->a( n = `text` v = `AnchorBar sample`
)->a( n = `wrapping` v = `true`
)->end(
)->ele( `snappedTitleOnMobile`
)->tag( n = `Title` ns = `m`
)->a( n = `text` v = `AnchorBar sample`
)->end(
)->end(
)->end(
)->ele( `headerContent`
)->tag( n = `Title` ns = `m`
)->a( n = `text` v = `This example explains how the Anchor Bar is built based on page content`
)->a( n = `titleStyle` v = `H6`
)->end(
)->ele( `sections`
)->ele( `ObjectPageSection`
)->a( n = `titleUppercase` v = `false`
)->a( n = `id` v = `section1`
)->a( n = `title` v = `Section 1`
)->ele( `subSections`
)->ele( `ObjectPageSubSection`
)->a( n = `id` v = `section1_SS1`
)->a( n = `title` v = `Subsection 1.1 `
)->a( n = `titleUppercase` v = `false`
)->ele( `blocks`
)->ele( n = `SimpleForm` ns = `forms`
)->a( n = `maxContainerCols` v = `2`
)->a( n = `layout` v = `ResponsiveGridLayout`
)->a( n = `editable` v = `false`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Content`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `some content goes here...`
)->end(
)->end(
)->end(
)->ele( `ObjectPageSubSection`
)->a( n = `id` v = `section1_SS2`
)->a( n = `title` v = `Subsection 1.2 `
)->ele( `blocks`
)->ele( n = `SimpleForm` ns = `forms`
)->a( n = `maxContainerCols` v = `2`
)->a( n = `layout` v = `ResponsiveGridLayout`
)->a( n = `editable` v = `false`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Content`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `some content goes here...`
)->end(
)->end(
)->end(
)->end(
)->end(
)->ele( `ObjectPageSection`
)->a( n = `titleUppercase` v = `false`
)->a( n = `id` v = `section2`
)->a( n = `title` v = `Section 2`
)->end(
)->ele( `ObjectPageSection`
)->a( n = `titleUppercase` v = `false`
)->a( n = `id` v = `section3`
)->a( n = `title` v = `Section 3`
)->ele( `subSections`
)->ele( `ObjectPageSubSection`
)->a( n = `id` v = `section3_SS1`
)->a( n = `title` v = ` `
)->a( n = `titleUppercase` v = `false`
)->ele( `blocks`
)->ele( n = `SimpleForm` ns = `forms`
)->a( n = `maxContainerCols` v = `2`
)->a( n = `layout` v = `ResponsiveGridLayout`
)->a( n = `editable` v = `false`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Content`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `some content goes here...`
)->end(
)->end(
)->end(
)->end(
)->end(
)->ele( `ObjectPageSection`
)->a( n = `titleUppercase` v = `false`
)->a( n = `id` v = `section4`
)->a( n = `title` v = `Section 4`
)->ele( `subSections`
)->ele( `ObjectPageSubSection`
)->a( n = `id` v = `section4_SS1`
)->a( n = `title` v = `Subsection 4.1 `
)->a( n = `titleUppercase` v = `false`
)->ele( `blocks`
)->ele( n = `SimpleForm` ns = `forms`
)->a( n = `maxContainerCols` v = `2`
)->a( n = `layout` v = `ResponsiveGridLayout`
)->a( n = `editable` v = `false`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Content`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `some content goes here...`
)->end(
)->end(
)->end(
)->end(
)->end(
)->ele( `ObjectPageSection`
)->a( n = `titleUppercase` v = `false`
)->a( n = `id` v = `section5`
)->a( n = `title` v = `Section 5`
)->ele( `subSections`
)->ele( `ObjectPageSubSection`
)->a( n = `id` v = `section5_SS1`
)->a( n = `title` v = ` `
)->a( n = `titleUppercase` v = `false`
)->ele( `blocks`
)->ele( n = `SimpleForm` ns = `forms`
)->a( n = `maxContainerCols` v = `2`
)->a( n = `layout` v = `ResponsiveGridLayout`
)->a( n = `editable` v = `false`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Content`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `some content goes here...`
)->end(
)->end(
)->end(
)->end(
)->end(
)->ele( `ObjectPageSection`
)->a( n = `titleUppercase` v = `false`
)->a( n = `id` v = `section6`
)->a( n = `title` v = `Section 6`
)->ele( `subSections`
)->ele( `ObjectPageSubSection`
)->a( n = `id` v = `section6_SS1`
)->a( n = `title` v = ` `
)->a( n = `titleUppercase` v = `false`
)->ele( `blocks`
)->ele( n = `SimpleForm` ns = `forms`
)->a( n = `maxContainerCols` v = `2`
)->a( n = `layout` v = `ResponsiveGridLayout`
)->a( n = `editable` v = `false`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Content`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `some content goes here...`
)->end(
)->end(
)->end(
)->end(
)->end(
)->ele( `ObjectPageSection`
)->a( n = `titleUppercase` v = `false`
)->a( n = `id` v = `section7`
)->a( n = `title` v = `Section 7`
)->ele( `subSections`
)->ele( `ObjectPageSubSection`
)->a( n = `id` v = `section7_SS1`
)->a( n = `title` v = ` `
)->a( n = `titleUppercase` v = `false`
)->ele( `blocks`
)->ele( n = `SimpleForm` ns = `forms`
)->a( n = `maxContainerCols` v = `2`
)->a( n = `layout` v = `ResponsiveGridLayout`
)->a( n = `editable` v = `false`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Content`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `some content goes here...`
)->end(
)->end(
)->end(
)->end(
)->end(
)->ele( `ObjectPageSection`
)->a( n = `titleUppercase` v = `false`
)->a( n = `title` v = `Section 8`
)->ele( `subSections`
)->ele( `ObjectPageSubSection`
)->a( n = `title` v = ` `
)->a( n = `titleUppercase` v = `false`
)->ele( `blocks`
)->ele( n = `SimpleForm` ns = `forms`
)->a( n = `maxContainerCols` v = `2`
)->a( n = `layout` v = `ResponsiveGridLayout`
)->a( n = `editable` v = `false`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Content`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `some content goes here...`
)->end(
)->end(
)->end(
)->end(
)->end(
)->ele( `ObjectPageSection`
)->a( n = `titleUppercase` v = `false`
)->a( n = `title` v = `Section 9`
)->ele( `subSections`
)->ele( `ObjectPageSubSection`
)->a( n = `title` v = ` `
)->a( n = `titleUppercase` v = `false`
)->ele( `blocks`
)->ele( n = `SimpleForm` ns = `forms`
)->a( n = `maxContainerCols` v = `2`
)->a( n = `layout` v = `ResponsiveGridLayout`
)->a( n = `editable` v = `false`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Content`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `some content goes here...`
)->end(
)->end(
)->end(
)->end(
)->end(
)->ele( `ObjectPageSection`
)->a( n = `titleUppercase` v = `false`
)->a( n = `title` v = `Section 10`
)->ele( `subSections`
)->ele( `ObjectPageSubSection`
)->a( n = `title` v = ` `
)->a( n = `titleUppercase` v = `false`
)->ele( `blocks`
)->ele( n = `SimpleForm` ns = `forms`
)->a( n = `maxContainerCols` v = `2`
)->a( n = `layout` v = `ResponsiveGridLayout`
)->a( n = `editable` v = `false`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Content`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `some content goes here...`
)->end(
)->end(
)->end(
)->end(
)->end(
)->ele( `ObjectPageSection`
)->a( n = `titleUppercase` v = `false`
)->a( n = `title` v = `Section 11`
)->ele( `subSections`
)->ele( `ObjectPageSubSection`
)->a( n = `title` v = ` `
)->a( n = `titleUppercase` v = `false`
)->ele( `blocks`
)->ele( n = `SimpleForm` ns = `forms`
)->a( n = `maxContainerCols` v = `2`
)->a( n = `layout` v = `ResponsiveGridLayout`
)->a( n = `editable` v = `false`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Content`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `some content goes here...`
)->end(
)->end(
)->end(
)->end(
)->end(
)->ele( `ObjectPageSection`
)->a( n = `titleUppercase` v = `false`
)->a( n = `title` v = `Section 12`
)->ele( `subSections`
)->ele( `ObjectPageSubSection`
)->a( n = `title` v = ` `
)->a( n = `titleUppercase` v = `false`
)->ele( `blocks`
)->ele( n = `SimpleForm` ns = `forms`
)->a( n = `maxContainerCols` v = `2`
)->a( n = `layout` v = `ResponsiveGridLayout`
)->a( n = `editable` v = `false`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Content`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `some content goes here...`
)->end(
)->end(
)->end(
)->end(
)->end(
)->ele( `ObjectPageSection`
)->a( n = `titleUppercase` v = `false`
)->a( n = `title` v = `Section 13`
)->ele( `subSections`
)->ele( `ObjectPageSubSection`
)->a( n = `title` v = ` `
)->a( n = `titleUppercase` v = `false`
)->ele( `blocks`
)->ele( n = `SimpleForm` ns = `forms`
)->a( n = `maxContainerCols` v = `2`
)->a( n = `layout` v = `ResponsiveGridLayout`
)->a( n = `editable` v = `false`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Content`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `some content goes here...`
)->end(
)->end(
)->end(
)->end(
)->end(
)->ele( `ObjectPageSection`
)->a( n = `titleUppercase` v = `false`
)->a( n = `title` v = `Section 14`
)->ele( `subSections`
)->ele( `ObjectPageSubSection`
)->a( n = `title` v = ` `
)->a( n = `titleUppercase` v = `false`
)->ele( `blocks`
)->ele( n = `SimpleForm` ns = `forms`
)->a( n = `maxContainerCols` v = `2`
)->a( n = `layout` v = `ResponsiveGridLayout`
)->a( n = `editable` v = `false`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Content`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `some content goes here...`
)->end(
)->end(
)->end(
)->end(
)->end(
)->ele( `ObjectPageSection`
)->a( n = `titleUppercase` v = `false`
)->a( n = `title` v = `Section 15`
)->ele( `subSections`
)->ele( `ObjectPageSubSection`
)->a( n = `title` v = ` `
)->a( n = `titleUppercase` v = `false`
)->ele( `blocks`
)->ele( n = `SimpleForm` ns = `forms`
)->a( n = `maxContainerCols` v = `2`
)->a( n = `layout` v = `ResponsiveGridLayout`
)->a( n = `editable` v = `false`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Content`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `some content goes here...`
)->end(
)->end(
)->end(
)->end(
)->end(
)->end(
)->end( ).
client->view_display( view->stringify( ) ).
ENDMETHOD.
ENDCLASS.
More in sap.uxap
- Object Page Header with Links, Rating Indicator, and Object Status — ObjectPage sample with header content arranged using containers, called facets, Links, Ra…
- ObjectPageHeader with placeholder — This is an example of ObjectPageHeader using the showPlaceholder property.
- ObjectPageHeader options — This is a different example of ObjectPageHeader hiding the headerTitle area entirely unti…
- ObjectPageHeader with all controls — This is an example of an ObjectPageHeader containing all possible controls in it.
- ObjectPage as a child page — This is an example of an ObjectPage Child page.
- ObjectPage with DynamicSideContent Button — The sample shows Object Page inside a main content of DynamicSideContent. The ObjectPageH…
- Object Page AnchorBar with numbers — This example shows how to visualize numbers in parenthesis after the corresponding sectio…
- Object Page demonstrating beforeNavigate event — Object Page demonstrating how beforeNavigate event can be used to prevent default navigat…
- Object Page with blocks of different view types — ObjectPage sample with blocks that use different view types
- ObjectPage with first editable input — Object Page that focuses its first editable input in the currently selected section.
- ObjectPage with forms — Object Page automatically adjusts form layout to match block column layout
- Object Page with LazyLoading without blocks — This sample showcases the lazy loading using the stashed property of the ObjectPageLazyLo…
On this page