Standard Fiori ObjectPageHeader
This is an example of an ObjectPageHeader containing mainly KPIs.
Z2UI5_CL_SMPC_APP_217
Controls
sap.uxap
UI5 1.71
The facts
- Repository
- abap2UI5/samples-controls
- Class
Z2UI5_CL_SMPC_APP_217- Source file
z2ui5_cl_smpc_app_217.clas.abap↗- Library
- sap.uxap
- UI5 entity
sap.uxap.ObjectPageHeader- Demo kit sample
sap.uxap.sample.KPIObjectPageHeader- 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: objectpageheader, object, header, sap.uxap, kpiobjectpageheader, objectpagelayout, objectpageheaderactionbutton, verticallayout, label, objectnumber, objectattribute, objectpagesection
Controls it builds
- sap.m.Label
- sap.m.ObjectAttribute
- sap.m.ObjectNumber
- sap.m.Text
- sap.ui.core.Title
- sap.ui.core.mvc.View
- sap.ui.layout.VerticalLayout
- sap.ui.layout.form.SimpleForm
- sap.uxap.ObjectPageHeader
- sap.uxap.ObjectPageHeaderActionButton
- 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_217.clas.abap — 253 lines
Click a number to link to a line — shift-click for a range.
Read it on GitHub ↗
" @keywords objectpageheader object header sap.uxap kpiobjectpageheader objectpagelayout objectpageheaderactionbutton verticallayout label objectnumber objectattribute objectpagesection
" @summary This is an example of an ObjectPageHeader containing mainly KPIs.
CLASS z2ui5_cl_smpc_app_217 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_217 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 188/178/161 precedent, CAPABILITIES 'Custom
" BlockBase blocks in a sap.uxap.ObjectPageLayout'): the original blocks
" aggregations hold custom BlockBase controls from the sample's SharedBlocks
" JS - a BlockBase is only a lazy-loading wrapper around a view, so each
" block's content (a sap.ui.layout.form.SimpleForm) is inlined directly here.
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:layout` v = `sap.ui.layout`
)->a( n = `xmlns:m` v = `sap.m`
)->a( n = `xmlns:core` v = `sap.ui.core`
)->a( n = `xmlns:form` v = `sap.ui.layout.form`
)->ele( `ObjectPageLayout`
)->a( n = `id` v = `ObjectPageLayout`
)->a( n = `upperCaseAnchorBar` v = `false`
)->ele( `headerTitle`
)->ele( `ObjectPageHeader`
)->a( n = `id` v = `headerForTest`
)->a( n = `objectTitle` v = `Generic T-Shirt Fa, SIZE AS, Colour blau`
)->a( n = `objectSubtitle` v = `AAUFSA000100003002`
)->ele( `actions`
)->tag( `ObjectPageHeaderActionButton`
)->a( n = `icon` v = `sap-icon://action`
)->a( n = `text` v = `Open in...`
)->a( n = `tooltip` v = `action`
)->tag( `ObjectPageHeaderActionButton`
)->a( n = `icon` v = `sap-icon://refresh`
)->a( n = `text` v = `change design`
)->a( n = `tooltip` v = `refresh`
)->end(
)->end(
)->end(
)->ele( `headerContent`
)->ele( n = `VerticalLayout` ns = `layout`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `PC, Unrestricted-Use Stock`
)->tag( n = `ObjectNumber` ns = `m`
)->a( n = `class` v = `sapMObjectNumberLarge`
)->a( n = `number` v = `219`
)->a( n = `unit` v = `K`
)->end(
)->ele( n = `VerticalLayout` ns = `layout`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Article Category`
)->tag( n = `ObjectAttribute` ns = `m`
)->a( n = `text` v = `Single Material`
)->end(
)->ele( n = `VerticalLayout` ns = `layout`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Article Type`
)->tag( n = `ObjectAttribute` ns = `m`
)->a( n = `text` v = `Trading Goods`
)->end(
)->end(
)->ele( `sections`
)->ele( `ObjectPageSection`
)->a( n = `titleUppercase` v = `false`
)->a( n = `title` v = `2014 Goals Plan`
)->ele( `subSections`
)->ele( `ObjectPageSubSection`
)->a( n = `title` v = ` `
)->a( n = `titleUppercase` v = `false`
)->ele( `blocks`
)->ele( n = `SimpleForm` ns = `form`
)->a( n = `editable` v = `false`
)->a( n = `layout` v = `ColumnLayout`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Evangelize the UI framework across the company`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `4 days overdue Cascaded`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Get trained in development management direction`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `Due Nov 21`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Mentor junior developers`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `Due Dec 31 Cascaded`
)->end(
)->end(
)->end(
)->end(
)->end(
)->ele( `ObjectPageSection`
)->a( n = `titleUppercase` v = `false`
)->a( n = `title` v = `Personal`
)->ele( `subSections`
)->ele( `ObjectPageSubSection`
)->a( n = `title` v = `Connect`
)->a( n = `titleUppercase` v = `false`
)->ele( `blocks`
)->ele( n = `SimpleForm` ns = `form`
)->a( n = `layout` v = `ColumnLayout`
)->a( n = `width` v = `100%`
)->tag( n = `Title` ns = `core`
)->a( n = `text` v = `Phone Numbers`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Home`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `+ 1 415-321-1234`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Office phone`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `+ 1 415-321-5555`
)->end(
)->ele( n = `SimpleForm` ns = `form`
)->a( n = `editable` v = `false`
)->a( n = `labelSpanL` v = `4`
)->a( n = `labelSpanM` v = `4`
)->a( n = `labelSpanS` v = `4`
)->a( n = `emptySpanL` v = `0`
)->a( n = `emptySpanM` v = `0`
)->a( n = `emptySpanS` v = `0`
)->a( n = `maxContainerCols` v = `2`
)->a( n = `width` v = `100%`
)->tag( n = `Title` ns = `core`
)->a( n = `text` v = `Social Accounts`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `LinkedIn`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `/DeniseSmith`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Twitter`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `@DeniseSmith`
)->end(
)->ele( n = `SimpleForm` ns = `form`
)->a( n = `layout` v = `ColumnLayout`
)->a( n = `editable` v = `false`
)->a( n = `width` v = `100%`
)->tag( n = `Title` ns = `core`
)->a( n = `text` v = `Addresses`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Home Address`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `2096 Mission Street`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Mailing Address`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `PO Box 32114`
)->end(
)->ele( n = `SimpleForm` ns = `form`
)->a( n = `layout` v = `ColumnLayout`
)->a( n = `width` v = `100%`
)->tag( n = `Title` ns = `core`
)->a( n = `text` v = `Mailing Address`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Work`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `DeniseSmith@sap.com`
)->end(
)->end(
)->end(
)->ele( `ObjectPageSubSection`
)->a( n = `id` v = `paymentSubSection`
)->a( n = `title` v = `Payment information`
)->a( n = `titleUppercase` v = `false`
)->ele( `blocks`
)->ele( n = `SimpleForm` ns = `form`
)->a( n = `editable` v = `false`
)->a( n = `layout` v = `ColumnLayout`
)->tag( n = `Title` ns = `core`
)->a( n = `text` v = `Main Payment Method`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Bank Transfer`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `Sparkasse Heimfeld, Germany`
)->end(
)->end(
)->ele( `moreBlocks`
)->ele( n = `SimpleForm` ns = `form`
)->a( n = `editable` v = `false`
)->a( n = `layout` v = `ColumnLayout`
)->tag( n = `Title` ns = `core`
)->a( n = `text` v = `Payment method for Expenses`
)->tag( n = `Label` ns = `m`
)->a( n = `text` v = `Extra Travel Expenses`
)->tag( n = `Text` ns = `m`
)->a( n = `text` v = `Cash 100 USD` ).
client->view_display( view->stringify( ) ).
ENDMETHOD.
ENDCLASS.
More in sap.uxap
- Subsection with Action buttons sample — Example of a subsection displaying action buttons.
- Object Page Layout Section sample — This example explains the rules for the rendering of sections
- Navigation to Section sample — This example shows how to change the default behavior in order to be able to navigate to…
- Object Page Header Content Priorities — The sample shows how to set priorities of the ObjectPageHeader content items by using the…
- ObjectPage with Hidden Section Titles — ObjectPage sample that demonstrates the combination of header facets and showTitle proper…
- ObjectPageHeaderContent — This is an example of an ObjectPageHeaderContent.
- Bound Model Mapping — Use of dynamic bound model mapping
- Object Page with ObjectPageHeaderActionButtons — This example demonstrates ObjectPage with ObjectPageHeaderActionButtons and a GenericTag…
- Subsection with hidden title — Example of a subsection with showTitle property set to false.
- Object Page with Translucent backgroundDesign — This example demonstrates ObjectPage with ObjectPageDynamicHeaderTitle with Solid backgro…
- Object Page Header with Progress Indicator and Rating Indicator — ObjectPage sample with header content arranged using containers, called facets, ProgressI…
- ObjectPage with HeaderContent always shown on desktop — This is an example of an ObjectPage with property alwaysShowContentHeader set to true. In…
On this page