From 900de2df06b827dd3eac4a4dee8828163580dbef Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 23 Apr 2026 15:21:15 +0000 Subject: [PATCH 1/2] Add demo app 361 for system logout event MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Demonstrates the new SYSTEM_LOGOUT client event: bound directly to a header button and a page button via client->_event_client( client->cs_event-system_logout ). No roundtrip to the backend — the frontend calls the Fiori Launchpad shell logout when available and falls back to the ICF logoff endpoint otherwise. --- src/02/z2ui5_cl_demo_app_361.clas.abap | 55 ++++++++++++++++++++++++++ src/02/z2ui5_cl_demo_app_361.clas.xml | 16 ++++++++ 2 files changed, 71 insertions(+) create mode 100644 src/02/z2ui5_cl_demo_app_361.clas.abap create mode 100644 src/02/z2ui5_cl_demo_app_361.clas.xml diff --git a/src/02/z2ui5_cl_demo_app_361.clas.abap b/src/02/z2ui5_cl_demo_app_361.clas.abap new file mode 100644 index 00000000..fc8bd5fe --- /dev/null +++ b/src/02/z2ui5_cl_demo_app_361.clas.abap @@ -0,0 +1,55 @@ +CLASS z2ui5_cl_demo_app_361 DEFINITION PUBLIC. + + PUBLIC SECTION. + INTERFACES z2ui5_if_app. + + PROTECTED SECTION. + PRIVATE SECTION. +ENDCLASS. + + +CLASS z2ui5_cl_demo_app_361 IMPLEMENTATION. + + METHOD z2ui5_if_app~main. + + IF client->check_on_init( ). + + DATA(view) = z2ui5_cl_util_xml=>factory( ). + DATA(root) = view->__( n = `View` ns = `mvc` + p = VALUE #( ( n = `displayBlock` v = abap_true ) + ( n = `height` v = `100%` ) + ( n = `xmlns` v = `sap.m` ) + ( n = `xmlns:mvc` v = `sap.ui.core.mvc` ) ) ). + + DATA(page) = root->__( `Shell` + )->__( n = `Page` + p = VALUE #( ( n = `navButtonPress` v = client->_event_nav_app_leave( ) ) + ( n = `showNavButton` v = client->check_app_prev_stack( ) ) + ( n = `title` v = `abap2UI5 - System Logout` ) ) ). + + page->__( `headerContent` + )->_( n = `Button` + p = VALUE #( ( n = `icon` v = `sap-icon://log` ) + ( n = `text` v = `Logout` ) + ( n = `tooltip` v = `Sign out of the current session` ) + ( n = `press` v = client->_event_client( client->cs_event-system_logout ) ) ) ). + + page->__( n = `MessageStrip` + p = VALUE #( ( n = `class` v = `sapUiMediumMargin` ) + ( n = `showIcon` v = abap_true ) + ( n = `text` v = `This demo shows the new system logout event. Pressing the button below triggers SYSTEM_LOGOUT on the client. Inside a Fiori Launchpad the shell container handles the sign-out; otherwise the app navigates to the ICF logoff endpoint.` ) + ( n = `type` v = `Information` ) ) + )->_( n = `Button` + p = VALUE #( ( n = `class` v = `sapUiSmallMargin` ) + ( n = `icon` v = `sap-icon://log` ) + ( n = `text` v = `Logout now` ) + ( n = `type` v = `Reject` ) + ( n = `press` v = client->_event_client( client->cs_event-system_logout ) ) ) ). + + client->view_display( view->stringify( ) ). + + ENDIF. + + ENDMETHOD. + +ENDCLASS. diff --git a/src/02/z2ui5_cl_demo_app_361.clas.xml b/src/02/z2ui5_cl_demo_app_361.clas.xml new file mode 100644 index 00000000..d2ccb964 --- /dev/null +++ b/src/02/z2ui5_cl_demo_app_361.clas.xml @@ -0,0 +1,16 @@ + + + + + + Z2UI5_CL_DEMO_APP_361 + E + more - System Logout + 1 + X + X + X + + + + From 4d4748d27099dedd24eb5db52e9e95b8a68109d8 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 23 Apr 2026 15:22:55 +0000 Subject: [PATCH 2/2] Link demo app 361 into overview Add a tile for the System Logout sample inside the Features panel of z2ui5_cl_demo_app_000 so it is reachable from the overview. --- src/z2ui5_cl_demo_app_000.clas.abap | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/z2ui5_cl_demo_app_000.clas.abap b/src/z2ui5_cl_demo_app_000.clas.abap index 88bb2215..892a9fcb 100644 --- a/src/z2ui5_cl_demo_app_000.clas.abap +++ b/src/z2ui5_cl_demo_app_000.clas.abap @@ -238,6 +238,12 @@ CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION. mode = `LineMode` class = `sapUiTinyMarginEnd sapUiTinyMarginBottom` ). + panel->generic_tile( header = `System Logout` + subheader = `Trigger SYSTEM_LOGOUT client event` + press = client->_event( `z2ui5_cl_demo_app_361` ) + mode = `LineMode` + class = `sapUiTinyMarginEnd sapUiTinyMarginBottom` ). + panel = page->panel( expandable = abap_false expanded = abap_true headertext = `Messages` ).