Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions src/02/z2ui5_cl_demo_app_361.clas.abap
Original file line number Diff line number Diff line change
@@ -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.
16 changes: 16 additions & 0 deletions src/02/z2ui5_cl_demo_app_361.clas.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<abapGit version="v1.0.0" serializer="LCL_OBJECT_CLAS" serializer_version="v1.0.0">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<VSEOCLASS>
<CLSNAME>Z2UI5_CL_DEMO_APP_361</CLSNAME>
<LANGU>E</LANGU>
<DESCRIPT>more - System Logout</DESCRIPT>
<STATE>1</STATE>
<CLSCCINCL>X</CLSCCINCL>
<FIXPT>X</FIXPT>
<UNICODE>X</UNICODE>
</VSEOCLASS>
</asx:values>
</asx:abap>
</abapGit>
6 changes: 6 additions & 0 deletions src/z2ui5_cl_demo_app_000.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -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` ).
Expand Down
Loading