InfoLabel
InfoLabel with all available color schemes
Z2UI5_CL_SMPC_APP_113
Controls
sap.tnt
UI5 1.74
The facts
- Repository
- abap2UI5/samples-controls
- Class
Z2UI5_CL_SMPC_APP_113- Source file
z2ui5_cl_smpc_app_113.clas.abap↗- Library
- sap.tnt
- UI5 entity
sap.tnt.InfoLabel- Demo kit sample
sap.tnt.sample.InfoLabel- SAP's own sample
- running at sdk.openui5.org ↗
- Minimum UI5
- 1.74
- In the playground
- runs in the browser, with no system and nothing installed
Keywords: infolabel, info, label, sap.tnt, status, labels, scrollcontainer, flexbox, text
Controls it builds
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_113.clas.abap — 201 lines
Click a number to link to a line — shift-click for a range.
Read it on GitHub ↗
" @keywords infolabel info label sap.tnt status labels scrollcontainer flexbox text
" @summary InfoLabel with all available color schemes
CLASS z2ui5_cl_smpc_app_113 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_113 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( ).
view->ele( n = `View` ns = `mvc`
)->a( n = `xmlns` v = `sap.m`
)->a( n = `xmlns:mvc` v = `sap.ui.core.mvc`
)->a( n = `xmlns:tnt` v = `sap.tnt`
)->a( n = `height` v = `100%`
)->ele( `ScrollContainer`
)->a( n = `vertical` v = `true`
)->a( n = `height` v = `100%`
)->ele( `FlexBox`
)->a( n = `direction` v = `Column`
)->a( n = `alignItems` v = `Start`
)->a( n = `class` v = `sapUiMediumMargin`
)->ele( `FlexBox`
)->a( n = `direction` v = `Row`
)->a( n = `alignItems` v = `Start`
)->a( n = `class` v = `sapUiTinyMarginBottom`
)->tag( `Text`
)->a( n = `text` v = `Color Scheme 1`
)->a( n = `class` v = `sapUiTinyMarginEnd`
)->tag( n = `InfoLabel` ns = `tnt`
)->a( n = `id` v = `il1`
)->a( n = `text` v = `2`
)->a( n = `renderMode` v = `Narrow`
)->a( n = `colorScheme` v = `1`
)->end(
)->ele( `FlexBox`
)->a( n = `direction` v = `Row`
)->a( n = `alignItems` v = `Start`
)->a( n = `class` v = `sapUiTinyMarginBottom`
)->tag( `Text`
)->a( n = `text` v = `Color Scheme 2`
)->a( n = `class` v = `sapUiTinyMarginEnd`
)->tag( n = `InfoLabel` ns = `tnt`
)->a( n = `id` v = `il2`
)->a( n = `text` v = `5`
)->a( n = `renderMode` v = `Narrow`
)->a( n = `colorScheme` v = `2`
)->end(
)->ele( `FlexBox`
)->a( n = `direction` v = `Row`
)->a( n = `alignItems` v = `Start`
)->a( n = `class` v = `sapUiTinyMarginBottom`
)->tag( `Text`
)->a( n = `text` v = `Color Scheme 3`
)->a( n = `class` v = `sapUiTinyMarginEnd`
)->tag( n = `InfoLabel` ns = `tnt`
)->a( n = `id` v = `il3`
)->a( n = `text` v = `12.5`
)->a( n = `renderMode` v = `Narrow`
)->a( n = `colorScheme` v = `3`
)->end(
)->ele( `FlexBox`
)->a( n = `direction` v = `Row`
)->a( n = `alignItems` v = `Start`
)->a( n = `class` v = `sapUiTinyMarginBottom`
)->tag( `Text`
)->a( n = `text` v = `Color Scheme 4`
)->a( n = `class` v = `sapUiTinyMarginEnd`
)->tag( n = `InfoLabel` ns = `tnt`
)->a( n = `id` v = `il4`
)->a( n = `text` v = `2k`
)->a( n = `renderMode` v = `Narrow`
)->a( n = `colorScheme` v = `4`
)->end(
)->ele( `FlexBox`
)->a( n = `direction` v = `Row`
)->a( n = `alignItems` v = `Start`
)->a( n = `class` v = `sapUiTinyMarginBottom`
)->tag( `Text`
)->a( n = `text` v = `Color Scheme 5`
)->a( n = `class` v = `sapUiTinyMarginEnd`
)->tag( n = `InfoLabel` ns = `tnt`
)->a( n = `id` v = `il5`
)->a( n = `text` v = `text info label`
)->a( n = `renderMode` v = `Loose`
)->a( n = `colorScheme` v = `5`
)->end(
)->ele( `FlexBox`
)->a( n = `direction` v = `Row`
)->a( n = `alignItems` v = `Start`
)->a( n = `class` v = `sapUiTinyMarginBottom`
)->tag( `Text`
)->a( n = `text` v = `Color Scheme 6`
)->a( n = `class` v = `sapUiTinyMarginEnd`
)->tag( n = `InfoLabel` ns = `tnt`
)->a( n = `id` v = `il6`
)->a( n = `text` v = `just a long info label`
)->a( n = `colorScheme` v = `6`
)->a( n = `width` v = `140px`
)->end(
)->ele( `FlexBox`
)->a( n = `direction` v = `Row`
)->a( n = `alignItems` v = `Start`
)->a( n = `class` v = `sapUiTinyMarginBottom`
)->tag( `Text`
)->a( n = `text` v = `Color Scheme 7`
)->a( n = `class` v = `sapUiTinyMarginEnd`
)->tag( n = `InfoLabel` ns = `tnt`
)->a( n = `id` v = `il7`
)->a( n = `text` v = `label shorter than width`
)->a( n = `colorScheme` v = `7`
)->a( n = `width` v = `250px`
)->end(
)->ele( `FlexBox`
)->a( n = `direction` v = `Row`
)->a( n = `alignItems` v = `Start`
)->a( n = `class` v = `sapUiTinyMarginBottom`
)->tag( `Text`
)->a( n = `text` v = `Color Scheme 8`
)->a( n = `class` v = `sapUiTinyMarginEnd`
)->tag( n = `InfoLabel` ns = `tnt`
)->a( n = `id` v = `il8`
)->a( n = `text` v = `with icon`
)->a( n = `colorScheme` v = `8`
)->a( n = `icon` v = `sap-icon://home-share`
)->end(
)->ele( `FlexBox`
)->a( n = `direction` v = `Row`
)->a( n = `alignItems` v = `Start`
)->a( n = `class` v = `sapUiTinyMarginBottom`
)->tag( `Text`
)->a( n = `text` v = `Color Scheme 9`
)->a( n = `class` v = `sapUiTinyMarginEnd`
)->tag( n = `InfoLabel` ns = `tnt`
)->a( n = `id` v = `il9`
)->a( n = `text` v = `in warehouse`
)->a( n = `colorScheme` v = `9`
)->end(
)->ele( `FlexBox`
)->a( n = `direction` v = `Row`
)->a( n = `alignItems` v = `Start`
)->a( n = `class` v = `sapUiTinyMarginBottom`
)->tag( `Text`
)->a( n = `text` v = `Any Color Scheme in Display Only Mode`
)->a( n = `class` v = `sapUiTinyMarginEnd`
)->tag( n = `InfoLabel` ns = `tnt`
)->a( n = `id` v = `il10`
)->a( n = `text` v = `display only in form`
)->a( n = `colorScheme` v = `1`
)->a( n = `displayOnly` v = `true`
)->end( ).
client->view_display( view->stringify( ) ).
ENDMETHOD.
ENDCLASS.
More in sap.tnt
- Navigation List — Navigation List in a Page
- Side Navigation — SideNavigation in container with fixed width.
- Side Navigation - Tags — SideNavigation with tags for status indicators and metadata.
- ToolHeader — ToolHeader that mimics the content of the Shell.
- InfoLabel in DynamicPage — InfoLabel used as subheader in DynamicPage
- Tool Page with Vertical Navigation — A tool page layout with vertical navigation
- Side Navigation - Unselectable Parent Items — SideNavigation with unselectable parent items.
- InfoLabel in Table — InfoLabel used in content of Table
- ToolHeader with IconTabHeader — ToolHeader can contain IconTabHeader. When both controls are combined, the IconTabHeader…
- Side Navigation - Press Event — SideNavigation with press event parameters and preventDefault.
- Side Navigation - Actions — SideNavigation with a quick create action button.
- Side Navigation - Wrapping of long texts — SideNavigation with long texts that wrap.
On this page