Shell Bar with title mega menu
Shell Bar example showing the control title as part of a mega menu, configurable by the app developer.
Z2UI5_CL_SMPC_APP_110
Controls
sap.f
UI5 1.73
The facts
- Repository
- abap2UI5/samples-controls
- Class
Z2UI5_CL_SMPC_APP_110- Source file
z2ui5_cl_smpc_app_110.clas.abap↗- Library
- sap.f
- UI5 entity
sap.f.ShellBar- Demo kit sample
sap.f.sample.ShellBar- SAP's own sample
- running at sdk.openui5.org ↗
- Minimum UI5
- 1.73
- In the playground
- runs in the browser, with no system and nothing installed
Keywords: shellbar, shell, bar, sap.f, application, header, menu, menuitem, avatar
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_110.clas.abap — 68 lines
Click a number to link to a line — shift-click for a range.
Read it on GitHub ↗
" @keywords shellbar shell bar sap.f application header menu menuitem avatar
" @summary Shell Bar example showing the control title as part of a mega menu, configurable by the app developer.
CLASS z2ui5_cl_smpc_app_110 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_110 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.f`
)->a( n = `xmlns:mvc` v = `sap.ui.core.mvc`
)->a( n = `xmlns:m` v = `sap.m`
)->a( n = `xmlns:layout` v = `sap.ui.layout`
)->a( n = `height` v = `100%`
)->ele( `ShellBar`
)->a( n = `title` v = `Application Title`
)->a( n = `secondTitle` v = `Short description`
)->a( n = `homeIcon` v = `https://sdk.openui5.org/resources/sap/ui/documentation/sdk/images/logo_sap.png`
)->a( n = `showCopilot` v = `true`
)->a( n = `showSearch` v = `true`
)->a( n = `showNotifications` v = `true`
)->a( n = `notificationsNumber` v = `2`
)->ele( `menu`
)->ele( n = `Menu` ns = `m`
)->tag( n = `MenuItem` ns = `m`
)->a( n = `text` v = `Flight booking`
)->a( n = `icon` v = `sap-icon://flight`
)->tag( n = `MenuItem` ns = `m`
)->a( n = `text` v = `Car rental`
)->a( n = `icon` v = `sap-icon://car-rental`
)->end(
)->end(
)->ele( `profile`
)->tag( n = `Avatar` ns = `m`
)->a( n = `initials` v = `UI` ).
client->view_display( view->stringify( ) ).
ENDMETHOD.
ENDCLASS.
More in sap.f
- Grid List - Basic examples — A GridList with the default grid layout, resized live with a slider to show how the grid…
- Card Control — This sample illustrates how to specify the predefined header and the content of the Card…
- Grid List - Different Modes With Various Item Types — This is a sample for GridList with different modes of selection.
- Side Panel with single action item — Demonstrates the usage of Side Panel with single action item.
- Grid List with GridBoxLayout — This layout allows to display same height grid items with configurable width.
- Grid List - Drag and Drop — This sample represents GridList with enabled Drag and Drop functionality.
- Shell Bar with menu button — Shell Bar example with a menu button and a plain title.
- Product Switch with Navigation — This sample demonstrates the navigation behavior of Product Switch, configurable by the a…
- Semantic Page using Draft Indicator — This sample demonstrates the use of a DraftIndicator in the footer area.
- Grid Container — This sample represents the general usage of GridContainer.
- Dynamic Page Freestyle Example — Dynamic Page freestyle example with a responsive sap.m.Table in the content area, showing…
- Grid List features - Grouping, Header, Growing — This sample illustrates subgroups with headers, custom header and lazy loading of GridLis…
On this page