Icon Tab Bar - Text and Count
In this example, the Icon Tab Bar tabs display text and corresponding count.
Z2UI5_CL_SMPC_APP_378
Controls
sap.m
UI5 1.71
The facts
- Repository
- abap2UI5/samples-controls
- Class
Z2UI5_CL_SMPC_APP_378- Source file
z2ui5_cl_smpc_app_378.clas.abap↗- Library
- sap.m
- UI5 entity
sap.m.IconTabBar- Demo kit sample
sap.m.sample.IconTabBarFiori2- 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: icontabbar, icon, tab, bar, sap.m, icontabbarfiori2, icontabfilter, 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_378.clas.abap — 84 lines
Click a number to link to a line — shift-click for a range.
Read it on GitHub ↗
" @keywords icontabbar icon tab bar sap.m icontabbarfiori2 icontabfilter text
" @summary In this example, the Icon Tab Bar tabs display text and corresponding count.
CLASS z2ui5_cl_smpc_app_378 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_378 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:mvc` v = `sap.ui.core.mvc`
)->a( n = `xmlns` v = `sap.m`
)->ele( `IconTabBar`
)->a( n = `id` v = `idIconTabBarFiori2`
" device> exposes raw sap.ui.Device, so !phone expresses the
" demo kit helper model's isNoPhone (app 030 precedent)
)->a( n = `expanded` v = `{= !${device>/system/phone} }`
)->a( n = `class` v = `sapUiResponsiveContentPadding`
)->ele( `items`
)->ele( `IconTabFilter`
)->a( n = `text` v = `Info`
)->a( n = `key` v = `info`
)->a( n = `count` v = `3`
)->tag( `Text`
)->a( n = `text` v = `Info content goes here ...`
)->end(
)->ele( `IconTabFilter`
)->a( n = `text` v = `Attachments`
)->a( n = `key` v = `attachments`
)->a( n = `count` v = `4321`
)->tag( `Text`
)->a( n = `text` v = `Attachments go here ...`
)->end(
)->ele( `IconTabFilter`
)->a( n = `text` v = `Notes`
)->a( n = `key` v = `notes`
)->a( n = `count` v = `333`
)->tag( `Text`
)->a( n = `text` v = `Notes go here ...`
)->end(
)->ele( `IconTabFilter`
)->a( n = `text` v = `People`
)->a( n = `key` v = `people`
)->a( n = `count` v = `34`
)->tag( `Text`
)->a( n = `text` v = `People content goes here ...` ).
client->view_display( view->stringify( ) ).
ENDMETHOD.
ENDCLASS.
More in sap.m
- Text - Max Lines — The Text control has a property to limit the number of lines for wrapping texts.
- Select - Validation states — Visualizes the validation state of the control, for example, Error, Warning and Success.
- Select - Wrapping text — Illustrates how the text in items wrap.
- Step Input - Value States — This example shows different StepInput value states.
- Standard List Item - Wrapping — This sample demonstrates the wrapping behavior of the title text and the description text…
- Icon Tab Bar - Filter — In this example, the Icon Tab Bar is used to apply filters on a table and display the cou…
- Icon Tab Bar - Inline Mode — In this example, the Icon Tab Bar tabs display the text and the count in one line.
- Icon Tab Bar - Icons Only — In this example, the Icon Tab Bar tabs display icons only.
- Icon Tab Bar - Text Only — In this example, the Icon Tab Bar tabs display text only.
- Icon Tab Bar - Sub tabs — This sample illustrates nested tabs with or without own content in their root-level tab.
- Icon Tab Bar - Separator — This is an example how to use separators in the Icon Tab Bar. You can choose an icon as a…
- ComboBox - Suggestions wrapping — Suggestions wrap automatically when longer then the dropdown width
On this page