Breadcrumbs sample with current page link
Breadcrumbs sample with current page set as aggregation, resulting in a link
Z2UI5_CL_SMPC_APP_286
Controls
sap.m
UI5 1.123
The facts
- Repository
- abap2UI5/samples-controls
- Class
Z2UI5_CL_SMPC_APP_286- Source file
z2ui5_cl_smpc_app_286.clas.abap↗- Library
- sap.m
- UI5 entity
sap.m.Breadcrumbs- Demo kit sample
sap.m.sample.BreadcrumbsWithCurrentPageLink- SAP's own sample
- running at sdk.openui5.org ↗
- Minimum UI5
- 1.123
- In the playground
- runs in the browser, with no system and nothing installed
Keywords: breadcrumbs, sap.m, breadcrumbswithcurrentpagelink, verticallayout, title, link
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_286.clas.abap — 86 lines
Click a number to link to a line — shift-click for a range.
Read it on GitHub ↗
" @keywords breadcrumbs sap.m breadcrumbswithcurrentpagelink verticallayout title link
" @summary Breadcrumbs sample with current page set as aggregation, resulting in a link
CLASS z2ui5_cl_smpc_app_286 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_286 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( ).
" every Link toasts its own text; the original composes that on the client
" (MessageToast.show(evt.getSource().getText() + ' has been clicked')), so
" the port keeps it there - roundtrip-free, the text comes from the source
view->ele( n = `View` ns = `mvc`
)->a( n = `xmlns:mvc` v = `sap.ui.core.mvc`
)->a( n = `xmlns` v = `sap.m`
)->a( n = `xmlns:l` v = `sap.ui.layout`
)->a( n = `xmlns:core` v = `sap.ui.core`
)->ele( n = `VerticalLayout` ns = `l`
)->a( n = `class` v = `sapUiContentPadding`
)->a( n = `width` v = `100%`
)->tag( `Title`
)->a( n = `text` v = `Breadcrumbs with current page aggregation set`
)->ele( `Breadcrumbs`
)->tag( `Link`
)->a( n = `text` v = `Home`
)->a( n = `press` v = client->follow_up_action( val = client->cs_event-control_global
t_arg = VALUE #( ( `MESSAGE_TOAST` ) ( `show` ) ( `{0} has been clicked` ) ( `${$source>/text}` ) ) )
)->tag( `Link`
)->a( n = `text` v = `Page 1`
)->a( n = `press` v = client->follow_up_action( val = client->cs_event-control_global
t_arg = VALUE #( ( `MESSAGE_TOAST` ) ( `show` ) ( `{0} has been clicked` ) ( `${$source>/text}` ) ) )
)->tag( `Link`
)->a( n = `text` v = `Page 2`
)->a( n = `press` v = client->follow_up_action( val = client->cs_event-control_global
t_arg = VALUE #( ( `MESSAGE_TOAST` ) ( `show` ) ( `{0} has been clicked` ) ( `${$source>/text}` ) ) )
)->tag( `Link`
)->a( n = `text` v = `Page 3`
)->a( n = `press` v = client->follow_up_action( val = client->cs_event-control_global
t_arg = VALUE #( ( `MESSAGE_TOAST` ) ( `show` ) ( `{0} has been clicked` ) ( `${$source>/text}` ) ) )
)->tag( `Link`
)->a( n = `text` v = `Page 4`
)->a( n = `press` v = client->follow_up_action( val = client->cs_event-control_global
t_arg = VALUE #( ( `MESSAGE_TOAST` ) ( `show` ) ( `{0} has been clicked` ) ( `${$source>/text}` ) ) )
)->tag( `Link`
)->a( n = `text` v = `Page 5`
)->a( n = `press` v = client->follow_up_action( val = client->cs_event-control_global
t_arg = VALUE #( ( `MESSAGE_TOAST` ) ( `show` ) ( `{0} has been clicked` ) ( `${$source>/text}` ) ) )
)->ele( `currentLocation`
)->tag( `Link`
)->a( n = `text` v = `Page 6`
)->a( n = `press` v = client->follow_up_action( val = client->cs_event-control_global
t_arg = VALUE #( ( `MESSAGE_TOAST` ) ( `show` ) ( `{0} has been clicked` ) ( `${$source>/text}` ) ) ) ).
client->view_display( view->stringify( ) ).
ENDMETHOD.
ENDCLASS.
More in sap.m
- Message Box — MessageBox is an easy way of displaying a message-type dialog to the user. You can displa…
- Image error handling with IllustratedMessage — Handle errors using the sap.m.IllustratedMessage with the error event.
- TextArea - Value Update — Since 1.30 the value property of sap.m.TextArea is not updated on every keystroke, but fi…
- MultiComboBox - showSelectAll functionality — MultiComboBox with enabled Select All feature inside suggestions.
- Message View inside Dialog — A sample with Message View placed inside a Dialog.
- Popover in Custom Within Area — Within area of sap.ui.core.Popup determines where all popups (including popovers) are pos…
- Icon Tab Bar - Badges — This sample illustrates the possibility to add badges to the icon tab filters.
- PDF Viewer - Embedded — A PDF viewer embedded in another control.
- Dynamic Message Strip Generator — Generates MessageStrips with random properties.
- MultiInput with Value Help — MultiInput that includes a SelectDialog as a value help dialog
- Notification List Group with data bindings — A control suitable for grouping notifications. The sample uses JSON data bindings.
- Panel - Background Design — Panels support different background designs for better visual distinction inside containe…
On this page