Skip to content

Commit

Permalink
updated demo 084 with message manager CC (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
choper725 authored Feb 22, 2024
1 parent 989816b commit c8fda66
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/z2ui5_cl_demo_app_084.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ CLASS z2ui5_cl_demo_app_084 DEFINITION
DATA:
t_msg TYPE STANDARD TABLE OF ty_msg WITH EMPTY KEY .
DATA check_initialized TYPE abap_bool .
DATA mt_messaging TYPE z2ui5_cl_cc_messaging=>ty_t_items.

METHODS z2ui5_display_view .
METHODS z2ui5_display_popup .
Expand Down Expand Up @@ -138,7 +139,7 @@ CLASS Z2UI5_CL_DEMO_APP_084 IMPLEMENTATION.
METHOD z2ui5_display_view.

DATA(view) = z2ui5_cl_xml_view=>factory( ).

view->_z2ui5( )->message_manager( client->_bind_edit( mt_messaging ) ).
DATA(page) = view->shell(
)->page( class = `sapUiContentPadding `
title = 'abap2UI5 - Input Validation'
Expand Down Expand Up @@ -241,10 +242,18 @@ CLASS Z2UI5_CL_DEMO_APP_084 IMPLEMENTATION.

IF check_initialized = abap_false.
check_initialized = abap_true.
z2ui5_display_view( ).

DATA(view) = z2ui5_cl_xml_view=>factory( ).
client->view_display(
view->_generic( ns = `html` name = `script` )->_cc_plain_xml( z2ui5_cl_cc_message_manager=>get_js( )
)->_z2ui5( )->timer( client->_event( `ON_CC_LOADED` )
)->stringify( ) ).

ENDIF.

CASE client->get( )-event.
WHEN 'ON_CC_LOADED'.
z2ui5_display_view( ).
WHEN 'POPUP'.
z2ui5_display_popup( ).
WHEN 'POPOVER'.
Expand Down

0 comments on commit c8fda66

Please sign in to comment.