diff --git a/.github/workflows/build_downport.yaml b/.github/workflows/build_downport.yaml index 8bea81a4..04561b7a 100644 --- a/.github/workflows/build_downport.yaml +++ b/.github/workflows/build_downport.yaml @@ -2,6 +2,7 @@ name: build_downport on: push: + branches: [main] permissions: contents: read diff --git a/.github/workflows/test_downport.yaml b/.github/workflows/test_downport.yaml new file mode 100644 index 00000000..15b74172 --- /dev/null +++ b/.github/workflows/test_downport.yaml @@ -0,0 +1,19 @@ +name: test_downport + +on: + pull_request: + +permissions: + contents: read + +jobs: + build_downport: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - run: npm ci + - run: npm run downport diff --git a/ci/abaplint.jsonc b/ci/abaplint.jsonc index 0f540bf9..2f1866b8 100644 --- a/ci/abaplint.jsonc +++ b/ci/abaplint.jsonc @@ -155,6 +155,7 @@ "^xubname$", "^feld$", "^abap_boolean$", + "boolean", ] }, "form_tables_obsolete": true, diff --git a/src/z2ui5_cl_demo_app_000.clas.abap b/src/z2ui5_cl_demo_app_000.clas.abap index 16ad6a12..3edf43f9 100644 --- a/src/z2ui5_cl_demo_app_000.clas.abap +++ b/src/z2ui5_cl_demo_app_000.clas.abap @@ -24,11 +24,12 @@ PROTECTED SECTION. PRIVATE SECTION. - ENDCLASS. +ENDCLASS. - CLASS z2ui5_cl_demo_app_000 IMPLEMENTATION. +CLASS Z2UI5_CL_DEMO_APP_000 IMPLEMENTATION. + METHOD z2ui5_if_app~main. @@ -81,7 +82,9 @@ `

Explore and copy code samples! All samples are abap2UI5 implementations of the SAP UI5 sample page. If you miss a control or find a b` && `ug please create an ` && `issue or send a PR` && - `.

` ). + `.

` && + `

Always press CTRL+F12 to see code samples and classname of the app.

` + ). DATA(page2) = page. @@ -148,6 +151,14 @@ mode = 'LineMode' class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom' ). + panel->generic_tile( + header = 'Event IV' + subheader = `Facet Filter - T_arg with Objects` + press = client->_event( 'Z2UI5_CL_DEMO_APP_197' ) + mode = 'LineMode' + class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom' + ). + panel->generic_tile( header = 'Follow Up Action' subheader = `` @@ -156,6 +167,8 @@ class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom' ). + + panel = page->panel( expandable = abap_false expanded = abap_true @@ -163,13 +176,21 @@ ). panel->generic_tile( - header = 'Timer' + header = 'Timer I' subheader = 'Wait n MS and call again the server' press = client->_event( 'Z2UI5_CL_DEMO_APP_028' ) mode = 'LineMode' class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom' ). + panel->generic_tile( + header = 'Timer II' + subheader = 'Set Loading Indicator while Server Request' + press = client->_event( 'Z2UI5_CL_DEMO_APP_064' ) + mode = 'LineMode' + class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom' + ). + panel->generic_tile( header = 'New Tab' subheader = 'Open an URL in a new tab' @@ -640,13 +661,6 @@ class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom' ). - panel->generic_tile( - header = 'Network Graph' - press = client->_event( 'z2ui5_cl_demo_app_182' ) - mode = 'LineMode' - class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom' - ). - panel = page->panel( expandable = abap_false expanded = abap_true @@ -1321,6 +1335,21 @@ class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom' ). + panel->generic_tile( + header = 'Network Graph' + press = client->_event( 'z2ui5_cl_demo_app_182' ) + mode = 'LineMode' + class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom' + ). + + panel->generic_tile( + header = 'Status Indicator Library' + subheader = `` + press = client->_event( 'Z2UI5_CL_DEMO_APP_196' ) + mode = 'LineMode' + class = 'sapUiTinyMarginEnd sapUiTinyMarginBottom' + ). + panel = page->panel( expandable = abap_false expanded = abap_true @@ -1436,4 +1465,4 @@ client->view_display( page->stringify( ) ). ENDMETHOD. - ENDCLASS. +ENDCLASS. diff --git a/src/z2ui5_cl_demo_app_001.clas.abap b/src/z2ui5_cl_demo_app_001.clas.abap index eb4eb1d5..fcbe367d 100644 --- a/src/z2ui5_cl_demo_app_001.clas.abap +++ b/src/z2ui5_cl_demo_app_001.clas.abap @@ -14,7 +14,7 @@ ENDCLASS. -CLASS z2ui5_cl_demo_app_001 IMPLEMENTATION. +CLASS Z2UI5_CL_DEMO_APP_001 IMPLEMENTATION. METHOD z2ui5_if_app~main. @@ -26,6 +26,7 @@ CLASS z2ui5_cl_demo_app_001 IMPLEMENTATION. quantity = '500'. DATA(view) = z2ui5_cl_xml_view=>factory( ). + view->_generic( ns = `html` name = `style` )->_cc_plain_xml( `.my-style{ background: black !important; opacity: 0.6; color: white; }` ). client->view_display( view->shell( )->page( title = 'abap2UI5 - First Example' @@ -48,7 +49,8 @@ CLASS z2ui5_cl_demo_app_001 IMPLEMENTATION. CASE client->get( )-event. WHEN 'BUTTON_POST'. - client->message_toast_display( |{ product } { quantity } - send to the server| ). + client->message_toast_display( text = |{ product } { quantity } - send to the server| at = 'left bottom' offset = '0 -15' animationtimingfunction = `ease-in` + class = 'my-style'). WHEN 'BACK'. client->nav_app_leave( ). diff --git a/src/z2ui5_cl_demo_app_002.clas.abap b/src/z2ui5_cl_demo_app_002.clas.abap index bb598371..a3d41db4 100644 --- a/src/z2ui5_cl_demo_app_002.clas.abap +++ b/src/z2ui5_cl_demo_app_002.clas.abap @@ -53,7 +53,7 @@ ENDCLASS. -CLASS z2ui5_cl_demo_app_002 IMPLEMENTATION. +CLASS Z2UI5_CL_DEMO_APP_002 IMPLEMENTATION. METHOD z2ui5_if_app~main. @@ -72,7 +72,23 @@ CLASS z2ui5_cl_demo_app_002 IMPLEMENTATION. METHOD z2ui5_on_event. CASE client->get( )-event. - + WHEN 'BUTTON_MCUSTOM'. +* send type = '' is mandatory in order to not break current implementation + client->message_box_display( type = '' text = 'Custom MessageBox' icon = `SUCCESS` + title = 'Custom MessageBox' actions = VALUE #( ( `First Button` ) ( `Second Button` ) ) emphasizedaction = `First Button` + onclose = `callMessageToast()` details = `

these are details

`). + WHEN 'BUTTON_MCONFIRM'. + client->message_box_display( type = 'confirm' text = 'Confirm MessageBox' ). + WHEN 'BUTTON_MALERT'. + client->message_box_display( type = 'alert' text = 'Alert MessageBox' ). + WHEN 'BUTTON_MERROR'. + client->message_box_display( type = 'error' text = 'Error MessageBox' ). + WHEN 'BUTTON_MINFO'. + client->message_box_display( type = 'information' text = 'Information MessageBox' ). + WHEN 'BUTTON_MWARNING'. + client->message_box_display( type = 'warning' text = 'Warning MessageBox' ). + WHEN 'BUTTON_MSUCCESS'. + client->message_box_display( type = 'success' text = 'Success MessageBox' icon = `sap-icon://accept` ). WHEN 'BUTTON_SEND'. client->message_box_display( 'success - values send to the server' ). WHEN 'BUTTON_CLEAR'. @@ -112,7 +128,7 @@ CLASS z2ui5_cl_demo_app_002 IMPLEMENTATION. METHOD z2ui5_on_rendering. DATA(view) = z2ui5_cl_xml_view=>factory( ). - + view->_generic( name = `script` ns = `html` )->_cc_plain_xml( `function callMessageToast(sAction) { sap.m.MessageToast.show('Hello there !!'); }` ). data(page) = view->shell( )->page( showheader = xsdbool( abap_false = client->get( )-check_launchpad_active ) @@ -220,6 +236,28 @@ CLASS z2ui5_cl_demo_app_002 IMPLEMENTATION. customtextoff = 'NO' ). page->footer( )->overflow_toolbar( + )->text( text = `MessageBox Types` + )->button( + text = 'Confirm' + press = client->_event( 'BUTTON_MCONFIRM' ) + )->button( + text = 'Alert' + press = client->_event( 'BUTTON_MALERT' ) + )->button( + text = 'Error' + press = client->_event( 'BUTTON_MERROR' ) + )->button( + text = 'Information' + press = client->_event( 'BUTTON_MINFO' ) + )->button( + text = 'Warning' + press = client->_event( 'BUTTON_MWARNING' ) + )->button( + text = 'Success' + press = client->_event( 'BUTTON_MSUCCESS' ) + )->button( + text = 'Custom' + press = client->_event( 'BUTTON_MCUSTOM' ) )->toolbar_spacer( )->button( text = 'Clear' diff --git a/src/z2ui5_cl_demo_app_028.clas.abap b/src/z2ui5_cl_demo_app_028.clas.abap index b04a0537..8da61f25 100644 --- a/src/z2ui5_cl_demo_app_028.clas.abap +++ b/src/z2ui5_cl_demo_app_028.clas.abap @@ -14,8 +14,8 @@ CLASS z2ui5_cl_demo_app_028 DEFINITION PUBLIC. checkbox TYPE abap_bool, END OF ty_row. DATA t_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. + DATA mv_counter TYPE i. -* DATA mv_check_repeat TYPE abap_bool. DATA mv_check_active TYPE abap_bool. PROTECTED SECTION. @@ -61,7 +61,6 @@ CLASS z2ui5_cl_demo_app_028 IMPLEMENTATION. INTO TABLE t_tab. IF mv_counter = 3. -* mv_check_repeat = abap_false. mv_check_active = abap_false. client->message_toast_display( `timer deactivated` ). ENDIF. @@ -79,7 +78,6 @@ CLASS z2ui5_cl_demo_app_028 IMPLEMENTATION. METHOD z2ui5_on_init. mv_counter = 1. -* mv_check_repeat = abap_true. mv_check_active = abap_true. t_tab = VALUE #( @@ -95,9 +93,7 @@ CLASS z2ui5_cl_demo_app_028 IMPLEMENTATION. lo_view->_z2ui5( )->timer( finished = client->_event( 'TIMER_FINISHED' ) delayms = `2000` -* checkrepeat = client->_bind( mv_check_repeat ) - checkactive = client->_bind( mv_check_active ) - ). + checkactive = client->_bind( mv_check_active ) ). DATA(page) = lo_view->shell( )->page( title = 'abap2UI5 - CL_GUI_TIMER - Monitor' @@ -107,7 +103,6 @@ CLASS z2ui5_cl_demo_app_028 IMPLEMENTATION. )->link( text = 'Demo' target = '_blank' href = `https://twitter.com/abap2UI5/status/1645816100813152256` )->link( text = 'Source_Code' target = '_blank' - )->get_parent( ). page->list( diff --git a/src/z2ui5_cl_demo_app_038.clas.abap b/src/z2ui5_cl_demo_app_038.clas.abap index 2ba90afe..195b3786 100644 --- a/src/z2ui5_cl_demo_app_038.clas.abap +++ b/src/z2ui5_cl_demo_app_038.clas.abap @@ -1,8 +1,8 @@ -CLASS Z2UI5_CL_DEMO_APP_038 DEFINITION PUBLIC. +CLASS z2ui5_cl_demo_app_038 DEFINITION PUBLIC. PUBLIC SECTION. - INTERFACES Z2UI5_if_app. + INTERFACES z2ui5_if_app. TYPES: BEGIN OF ty_msg, @@ -16,15 +16,15 @@ CLASS Z2UI5_CL_DEMO_APP_038 DEFINITION PUBLIC. DATA t_msg TYPE STANDARD TABLE OF ty_msg WITH EMPTY KEY. DATA check_initialized TYPE abap_bool. - METHODS Z2UI5_display_view. - METHODS Z2UI5_display_popup. - METHODS Z2UI5_display_popover + METHODS z2ui5_display_view. + METHODS z2ui5_display_popup. + METHODS z2ui5_display_popover IMPORTING id TYPE string. PROTECTED SECTION. - DATA client TYPE REF TO Z2UI5_if_client. + DATA client TYPE REF TO z2ui5_if_client. PRIVATE SECTION. ENDCLASS. @@ -34,9 +34,9 @@ ENDCLASS. CLASS Z2UI5_CL_DEMO_APP_038 IMPLEMENTATION. - METHOD Z2UI5_display_popover. + METHOD z2ui5_display_popover. - DATA(popup) = Z2UI5_cl_xml_view=>factory_popup( ). + DATA(popup) = z2ui5_cl_xml_view=>factory_popup( ). * popup = popup->popover( * placement = `Top` @@ -49,7 +49,7 @@ CLASS Z2UI5_CL_DEMO_APP_038 IMPLEMENTATION. groupitems = abap_true placement = `Top` initiallyexpanded = abap_true - beforeclose = client->_event( val = 'POPOVER_CLOSE' s_ctrl = value #( check_view_destroy = abap_true ) ) + beforeclose = client->_event( val = 'POPOVER_CLOSE' s_ctrl = VALUE #( check_view_destroy = abap_false ) ) )->message_item( type = `{TYPE}` title = `{TITLE}` @@ -62,59 +62,59 @@ CLASS Z2UI5_CL_DEMO_APP_038 IMPLEMENTATION. ENDMETHOD. - METHOD Z2UI5_display_popup. + METHOD z2ui5_display_popup. -* DATA(popup) = Z2UI5_cl_xml_view=>factory_popup( client ). -* -* popup = popup->dialog( -* title = `Messages` -* contentheight = '50%' -* contentwidth = '50%' ). -* -* popup->message_view( -* items = client->_bind_edit( val = t_msg -* ) -* groupitems = abap_true -* )->message_item( -* type = `{TYPE}` -* title = `{TITLE}` -* subtitle = `{SUBTITLE}` -* description = `{DESCRIPTION}` -* groupname = `{GROUP}` ). -* -* popup->footer( )->overflow_toolbar( -* )->toolbar_spacer( -* )->button( -* id = `test2` -* text = 'test' -* press = client->_event( `TEST` ) -* )->button( -* text = 'close' -* press = client->_event_client( client->cs_event-popup_close ) ). -* -* client->popup_display( popup->stringify( ) ). + DATA(popup) = z2ui5_cl_xml_view=>factory_popup( ). + + popup = popup->dialog( + title = `Messages` + contentheight = '50%' + contentwidth = '50%' ). + + popup->message_view( + items = client->_bind_edit( val = t_msg + ) + groupitems = abap_true + )->message_item( + type = `{TYPE}` + title = `{TITLE}` + subtitle = `{SUBTITLE}` + description = `{DESCRIPTION}` + groupname = `{GROUP}` ). + + popup->footer( )->overflow_toolbar( + )->toolbar_spacer( + )->button( + id = `test2` + text = 'test' + press = client->_event( `TEST` ) + )->button( + text = 'close' + press = client->_event_client( client->cs_event-popup_close ) ). + + client->popup_display( popup->stringify( ) ). ENDMETHOD. - METHOD Z2UI5_display_view. + METHOD z2ui5_display_view. DATA(view) = z2ui5_cl_xml_view=>factory( ). - + view->_generic( ns = `html` name = `style` )->_cc_plain_xml( `.sapMDialogScroll { height:100%; }` ). DATA(page) = view->shell( )->page( title = 'abap2UI5 - List' navbuttonpress = client->_event( val = 'BACK' ) - shownavbutton = abap_true - )->header_content( - )->link( - text = 'Demo' target = '_blank' - href = `https://twitter.com/abap2UI5/status/1647246029828268032` - )->link( - - - )->get_parent( ). -* page->button( text = 'Messages in Popup' press = client->_event( 'POPUP' ) ). + shownavbutton = abap_true ). +* )->header_content( +* )->link( +* text = 'Demo' target = '_blank' +* href = `https://twitter.com/abap2UI5/status/1647246029828268032` +* )->link( +* +* +* )->get_parent( ). + page->button( text = 'Messages in Popup' press = client->_event( 'POPUP' ) ). page->message_view( items = client->_bind_edit( t_msg ) groupitems = abap_true @@ -142,7 +142,7 @@ CLASS Z2UI5_CL_DEMO_APP_038 IMPLEMENTATION. ENDMETHOD. - METHOD Z2UI5_if_app~main. + METHOD z2ui5_if_app~main. me->client = client. @@ -155,19 +155,19 @@ CLASS Z2UI5_CL_DEMO_APP_038 IMPLEMENTATION. ( description = 'descr' subtitle = 'subtitle' title = 'title' type = 'Information' group = 'group 02' ) ( description = 'descr' subtitle = 'subtitle' title = 'title' type = 'Success' group = 'group 03' ) ). - Z2UI5_display_view( ). + z2ui5_display_view( ). ENDIF. CASE client->get( )-event. WHEN 'POPOVER_CLOSE'. client->popover_destroy( ). -* WHEN 'POPUP'. -* Z2UI5_display_popup( ). - WHEN 'TEST'. - Z2UI5_display_popover( `test2` ). + WHEN 'POPUP'. + z2ui5_display_popup( ). + WHEN 'TEST'. + z2ui5_display_popover( `test2` ). WHEN 'POPOVER'. - Z2UI5_display_popover( `test` ). + z2ui5_display_popover( `test` ). WHEN 'BACK'. client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ). ENDCASE. diff --git a/src/z2ui5_cl_demo_app_057.clas.abap b/src/z2ui5_cl_demo_app_057.clas.abap index 74d55c30..fda46e22 100644 --- a/src/z2ui5_cl_demo_app_057.clas.abap +++ b/src/z2ui5_cl_demo_app_057.clas.abap @@ -5,7 +5,7 @@ CLASS z2ui5_cl_demo_app_057 DEFINITION PUBLIC SECTION. INTERFACES z2ui5_if_app . - INTERFACES if_serializable_object . + TYPES: BEGIN OF ty_s_tab, diff --git a/src/z2ui5_cl_demo_app_064.clas.abap b/src/z2ui5_cl_demo_app_064.clas.abap index 5b729342..a87ebf9b 100644 --- a/src/z2ui5_cl_demo_app_064.clas.abap +++ b/src/z2ui5_cl_demo_app_064.clas.abap @@ -4,7 +4,7 @@ CREATE PUBLIC . PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES z2ui5_if_app . TYPES: @@ -30,21 +30,23 @@ CREATE PUBLIC . DATA mv_search_value TYPE string . DATA mt_table TYPE ty_t_table . DATA lv_selkz TYPE abap_bool . - + DATA mv_check_active TYPE abap_bool. DATA: BEGIN OF screen, progress_value TYPE string VALUE '0', display_value TYPE string VALUE '', END OF screen. + + DATA mv_percent TYPE i. + DATA mv_check_enabled TYPE abap_bool. PROTECTED SECTION. DATA client TYPE REF TO z2ui5_if_client. DATA check_initialized TYPE abap_bool. + METHODS z2ui5_on_init. METHODS z2ui5_on_event. - METHODS z2ui5_set_search. - METHODS z2ui5_set_data. PRIVATE SECTION. METHODS set_selkz @@ -52,9 +54,10 @@ CREATE PUBLIC . iv_selkz TYPE abap_bool. ENDCLASS. -CLASS z2ui5_cl_demo_app_064 IMPLEMENTATION. +CLASS Z2UI5_CL_DEMO_APP_064 IMPLEMENTATION. + METHOD set_selkz. @@ -81,51 +84,30 @@ CLASS z2ui5_cl_demo_app_064 IMPLEMENTATION. ENDMETHOD. + METHOD z2ui5_on_event. DATA lt_arg TYPE string_table. DATA ls_arg TYPE string. CASE client->get( )-event. - WHEN 'BUTTON_SEARCH' OR 'BUTTON_START'. - client->message_toast_display( 'Search Entries' ). - z2ui5_set_data( ). - z2ui5_set_search( ). - client->view_model_update( ). - WHEN 'SORT'. - - lt_arg = client->get( )-t_event_arg. - client->message_toast_display( 'Event SORT' ). - WHEN 'FILTER'. - lt_arg = client->get( )-t_event_arg. - client->message_toast_display( 'Event FILTER' ). - WHEN 'SELKZ'. - client->message_toast_display( |'Event SELKZ' { lv_selkz } | ). - set_selkz( lv_selkz ). - client->view_model_update( ). - WHEN 'CUSTOMFILTER'. - lt_arg = client->get( )-t_event_arg. - client->message_toast_display( 'Event CUSTOMFILTER' ). WHEN 'BACK'. client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ). - WHEN 'ROWEDIT'. - lt_arg = client->get( )-t_event_arg. - READ TABLE lt_arg INTO ls_arg INDEX 1. - IF sy-subrc = 0. - client->message_toast_display( |Event ROWEDIT Row Index { ls_arg } | ). - ENDIF. - WHEN 'ROW_ACTION_ITEM_NAVIGATION'. - lt_arg = client->get( )-t_event_arg. - READ TABLE lt_arg INTO ls_arg INDEX 1. - IF sy-subrc = 0. - client->message_toast_display( |Event ROW_ACTION_ITEM_NAVIGATION Row Index { ls_arg } | ). - ENDIF. - WHEN 'ROW_ACTION_ITEM_EDIT'. - lt_arg = client->get( )-t_event_arg. - READ TABLE lt_arg INTO ls_arg INDEX 1. - IF sy-subrc = 0. - client->message_toast_display( |Event ROW_ACTION_ITEM_EDIT Row Index { ls_arg } | ). + WHEN `LOAD`. + + mv_percent = mv_percent + 25. + mv_check_active = abap_true. + mv_check_enabled = abap_false. + IF mv_percent > 100. + mv_percent = 0. + mv_check_active = abap_false. + mv_check_enabled = abap_true. ENDIF. + + client->message_toast_display( `loaded` ). + WAIT UP TO 2 SECONDS. + client->view_model_update( ). + ENDCASE. ENDMETHOD. @@ -134,169 +116,40 @@ CLASS z2ui5_cl_demo_app_064 IMPLEMENTATION. METHOD z2ui5_on_init. DATA temp1 TYPE z2ui5_if_types=>ty_t_name_value. - DATA temp2 LIKE LINE OF temp1. DATA view TYPE REF TO z2ui5_cl_xml_view. DATA page1 TYPE REF TO z2ui5_cl_xml_view. DATA temp5 TYPE xsdboolean. - DATA page TYPE REF TO z2ui5_cl_xml_view. - DATA header_title TYPE REF TO z2ui5_cl_xml_view. - DATA lo_box TYPE REF TO z2ui5_cl_xml_view. - DATA cont TYPE REF TO z2ui5_cl_xml_view. - DATA tab TYPE REF TO z2ui5_cl_xml_view. - DATA lo_columns TYPE REF TO z2ui5_cl_xml_view. - DATA temp3 TYPE string_table. - DATA temp4 TYPE string_table. CLEAR temp1. + mv_check_enabled = abap_true. view = z2ui5_cl_xml_view=>factory( ). + view->_z2ui5( )->timer( + finished = client->_event( 'LOAD' ) + checkactive = client->_bind( mv_check_active ) + ). + temp5 = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ). - page1 = view->page( id = 'page_main' - title = 'abap2UI5 - sap.ui.table.Table Features' + page1 = view->shell( )->page( id = 'page_main' + title = 'abap2UI5 - Progress Bar while Server Request' navbuttonpress = client->_event( 'BACK' ) shownavbutton = temp5 class = 'sapUiContentPadding' ). - page1->header_content( - )->link( - text = 'Source_Code' target = '_blank' - ). - -*/ DATA layout TYPE REF TO z2ui5_cl_xml_view. layout = page1->vertical_layout( class = 'sapuicontentpadding' width = '100%' ). layout->vbox( )->progress_indicator( - percentvalue = client->_bind_edit( screen-progress_value ) + percentvalue = client->_bind_edit( mv_percent ) displayvalue = client->_bind_edit( screen-display_value ) showvalue = abap_true + state = 'Success' ). - state = 'Success' - ). -*/ - page = page1->dynamic_page( headerexpanded = abap_true headerpinned = abap_true ). - - header_title = page->title( ns = 'f' )->get( )->dynamic_page_title( ). - header_title->heading( ns = 'f' )->hbox( )->title( `Search Field` ). - header_title->expanded_content( 'f' ). - header_title->snapped_content( ns = 'f' ). - - - lo_box = page->header( )->dynamic_page_header( pinnable = abap_true - )->flex_box( alignitems = `Start` justifycontent = `SpaceBetween` )->flex_box( alignitems = `Start` ). - - lo_box->vbox( )->text( `Search` )->search_field( - value = client->_bind_edit( mv_search_value ) - search = client->_event( 'BUTTON_SEARCH' ) - change = client->_event( 'BUTTON_SEARCH' ) - livechange = client->_event( 'BUTTON_SEARCH' ) - width = `17.5rem` - id = `SEARCH` ). - lo_box->get_parent( )->hbox( justifycontent = 'end' )->button( - text = 'go' - press = client->_event( 'button_start' ) - type = 'emphasized' ). - - cont = page->content( ns = 'f' ). - - tab = cont->ui_table( rows = client->_bind( val = mt_table ) - editable = abap_false - alternaterowcolors = abap_true - rowactioncount = '2' - enablegrouping = abap_false - fixedcolumncount = '1' - selectionmode = 'None' - sort = client->_event( 'SORT' ) - filter = client->_event( 'FILTER' ) - customfilter = client->_event( 'CUSTOMFILTER' ) ). - tab->ui_extension( )->overflow_toolbar( )->title( text = 'Products' ). - - lo_columns = tab->ui_columns( ). - lo_columns->ui_column( width = '4rem' )->checkbox( selected = client->_bind_edit( lv_selkz ) enabled = abap_true select = client->_event( val = 'SELKZ' ) )->ui_template( )->checkbox( selected = '{SELKZ}' ). - lo_columns->ui_column( width = '5rem' sortproperty = 'ROW_ID' - filterproperty = 'ROW_ID' )->text( text = 'index' )->ui_template( )->text( text = '{row_id}' ). - lo_columns->ui_column( width = '11rem' sortproperty = 'CARRID' filterproperty = 'CARRID' )->text( text = 'carrid' )->ui_template( )->text( text = `{carrid}` ). - lo_columns->ui_column( width = '11rem' sortproperty = 'CONNID' filterproperty = 'CONNID')->text( text = 'connid' )->ui_template( )->text( text = `{connid}` ). - lo_columns->ui_column( width = '11rem' sortproperty = 'FLDATE' filterproperty = 'FLDATE' )->text( text = 'fldate' )->ui_template( )->text( text = `{fldate}`). - lo_columns->ui_column( width = '11rem' sortproperty = 'PLANETYPE' filterproperty = 'PLANETYPE' )->text( text = 'planetype' )->ui_template( )->text( text = `{planetype}` ). - - CLEAR temp3. - INSERT `${row_id}` INTO TABLE temp3. - - CLEAR temp4. - INSERT `${row_id}` INTO TABLE temp4. - lo_columns->get_parent( )->ui_row_action_template( )->ui_row_action( - )->ui_row_action_item( type = 'Navigation' - press = client->_event( val = 'ROW_ACTION_ITEM_NAVIGATION' t_arg = temp3 ) - )->get_parent( )->ui_row_action_item( icon = 'sap-icon://edit' text = 'Edit' press = client->_event( val = 'ROW_ACTION_ITEM_EDIT' t_arg = temp4 ) ). - - lo_columns->ui_column( width = '4rem' )->text( )->ui_template( )->overflow_toolbar( )->overflow_toolbar_button( - - icon = 'sap-icon://edit' type = 'Transparent' press = client->_event( - - val = `rowedit` t_arg = VALUE #( ( `${row_id}` ) ) ) ). + layout->button( + text = `Load` + press = client->_event( 'LOAD' ) + enabled = client->_bind( mv_check_enabled ) ). client->view_display( view->stringify( ) ). - ENDMETHOD. - - METHOD z2ui5_set_data. - -* DATA temp5 TYPE ty_t_table. -* DATA temp6 LIKE LINE OF temp5. -* CLEAR temp5. -* -**/ fetch 1 -* SELECT * UP TO 10 ROWS APPENDING CORRESPONDING FIELDS OF TABLE temp5 FROM sflight. -* screen-progress_value = 25. -* screen-display_value = 'fetch 1'. -* WAIT UP TO 2 SECONDS. -**/ fetch 2 -* SELECT * UP TO 10 ROWS APPENDING CORRESPONDING FIELDS OF TABLE temp5 FROM sflight. -* screen-progress_value = 50. -* screen-display_value = 'fetch 2'. -* WAIT UP TO 2 SECONDS. -**/ fetch 3 -* SELECT * UP TO 10 ROWS APPENDING CORRESPONDING FIELDS OF TABLE temp5 FROM sflight. -* screen-progress_value = 75. -* screen-display_value = 'fetch 3'. -* WAIT UP TO 2 SECONDS. -**/ fetch 4 -* SELECT * UP TO 10 ROWS APPENDING CORRESPONDING FIELDS OF TABLE temp5 FROM sflight. -* screen-progress_value = 100. -* screen-display_value = 'fetch 4'. -* WAIT UP TO 2 SECONDS. -* -* mt_table = temp5. - ENDMETHOD. - - METHOD z2ui5_set_search. - DATA temp7 LIKE LINE OF mt_table. - DATA lr_row LIKE REF TO temp7. - DATA lv_row TYPE string. - DATA lv_index TYPE i. - FIELD-SYMBOLS TYPE any. - - IF mv_search_value IS NOT INITIAL. - - LOOP AT mt_table REFERENCE INTO lr_row. - - lv_row = ``. - - lv_index = 1. - DO. - - ASSIGN COMPONENT lv_index OF STRUCTURE lr_row->* TO . - IF sy-subrc <> 0. - EXIT. - ENDIF. - lv_row = lv_row && . - lv_index = lv_index + 1. - ENDDO. - - IF lv_row NS mv_search_value. - DELETE mt_table. - ENDIF. - ENDLOOP. - ENDIF. ENDMETHOD. ENDCLASS. diff --git a/src/z2ui5_cl_demo_app_077.clas.abap b/src/z2ui5_cl_demo_app_077.clas.abap index d87ea8e2..fbb57d96 100644 --- a/src/z2ui5_cl_demo_app_077.clas.abap +++ b/src/z2ui5_cl_demo_app_077.clas.abap @@ -4,7 +4,7 @@ CLASS z2ui5_cl_demo_app_077 DEFINITION PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES z2ui5_if_app . TYPES: diff --git a/src/z2ui5_cl_demo_app_085.clas.abap b/src/z2ui5_cl_demo_app_085.clas.abap index cebc62d0..07e1f4a6 100644 --- a/src/z2ui5_cl_demo_app_085.clas.abap +++ b/src/z2ui5_cl_demo_app_085.clas.abap @@ -5,7 +5,7 @@ CLASS Z2UI5_CL_DEMO_APP_085 DEFINITION PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES Z2UI5_if_app . TYPES: diff --git a/src/z2ui5_cl_demo_app_086.clas.abap b/src/z2ui5_cl_demo_app_086.clas.abap index acd885c7..e1bd4454 100644 --- a/src/z2ui5_cl_demo_app_086.clas.abap +++ b/src/z2ui5_cl_demo_app_086.clas.abap @@ -4,7 +4,7 @@ CLASS Z2UI5_CL_DEMO_APP_086 DEFINITION PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES Z2UI5_if_app . TYPES: diff --git a/src/z2ui5_cl_demo_app_097.clas.abap b/src/z2ui5_cl_demo_app_097.clas.abap index e0f00c19..84987859 100644 --- a/src/z2ui5_cl_demo_app_097.clas.abap +++ b/src/z2ui5_cl_demo_app_097.clas.abap @@ -5,7 +5,7 @@ CLASS Z2UI5_CL_DEMO_APP_097 DEFINITION PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES Z2UI5_if_app . TYPES: diff --git a/src/z2ui5_cl_demo_app_098.clas.abap b/src/z2ui5_cl_demo_app_098.clas.abap index d16b11cf..dd13ef4b 100644 --- a/src/z2ui5_cl_demo_app_098.clas.abap +++ b/src/z2ui5_cl_demo_app_098.clas.abap @@ -5,7 +5,7 @@ CLASS Z2UI5_CL_DEMO_APP_098 DEFINITION PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES z2ui5_if_app . TYPES: diff --git a/src/z2ui5_cl_demo_app_099.clas.abap b/src/z2ui5_cl_demo_app_099.clas.abap index 2c47e93f..c5135f5e 100644 --- a/src/z2ui5_cl_demo_app_099.clas.abap +++ b/src/z2ui5_cl_demo_app_099.clas.abap @@ -4,7 +4,7 @@ CLASS z2ui5_cl_demo_app_099 DEFINITION PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES z2ui5_if_app . TYPES: diff --git a/src/z2ui5_cl_demo_app_104.clas.abap b/src/z2ui5_cl_demo_app_104.clas.abap index 0960f409..74b7bb21 100644 --- a/src/z2ui5_cl_demo_app_104.clas.abap +++ b/src/z2ui5_cl_demo_app_104.clas.abap @@ -5,7 +5,7 @@ CLASS z2ui5_cl_demo_app_104 DEFINITION PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES z2ui5_if_app . DATA mo_app_sub TYPE REF TO object . diff --git a/src/z2ui5_cl_demo_app_105.clas.abap b/src/z2ui5_cl_demo_app_105.clas.abap index 4d5a2d7d..9d213e74 100644 --- a/src/z2ui5_cl_demo_app_105.clas.abap +++ b/src/z2ui5_cl_demo_app_105.clas.abap @@ -4,7 +4,7 @@ CLASS z2ui5_cl_demo_app_105 DEFINITION PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES z2ui5_if_app . DATA client TYPE REF TO z2ui5_if_client . diff --git a/src/z2ui5_cl_demo_app_106.clas.abap b/src/z2ui5_cl_demo_app_106.clas.abap index 81ef0e75..3dca1771 100644 --- a/src/z2ui5_cl_demo_app_106.clas.abap +++ b/src/z2ui5_cl_demo_app_106.clas.abap @@ -4,7 +4,7 @@ class Z2UI5_CL_DEMO_APP_106 definition public section. - interfaces IF_SERIALIZABLE_OBJECT . + interfaces Z2UI5_IF_APP . data CHECK_INITIALIZED type ABAP_BOOL . diff --git a/src/z2ui5_cl_demo_app_107.clas.abap b/src/z2ui5_cl_demo_app_107.clas.abap index 0a6fe2aa..1c2287f6 100644 --- a/src/z2ui5_cl_demo_app_107.clas.abap +++ b/src/z2ui5_cl_demo_app_107.clas.abap @@ -4,7 +4,7 @@ CLASS z2ui5_cl_demo_app_107 DEFINITION PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES z2ui5_if_app . TYPES: diff --git a/src/z2ui5_cl_demo_app_108.clas.abap b/src/z2ui5_cl_demo_app_108.clas.abap index 8910346d..4b18f1e2 100644 --- a/src/z2ui5_cl_demo_app_108.clas.abap +++ b/src/z2ui5_cl_demo_app_108.clas.abap @@ -4,7 +4,7 @@ class Z2UI5_CL_DEMO_APP_108 definition public section. - interfaces IF_SERIALIZABLE_OBJECT . + interfaces Z2UI5_IF_APP . data: diff --git a/src/z2ui5_cl_demo_app_110.clas.abap b/src/z2ui5_cl_demo_app_110.clas.abap index 23af8779..e135e976 100644 --- a/src/z2ui5_cl_demo_app_110.clas.abap +++ b/src/z2ui5_cl_demo_app_110.clas.abap @@ -4,7 +4,7 @@ CLASS z2ui5_cl_demo_app_110 DEFINITION PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES z2ui5_if_app . DATA product TYPE string . diff --git a/src/z2ui5_cl_demo_app_111.clas.abap b/src/z2ui5_cl_demo_app_111.clas.abap index cd6d14e5..d8f607c1 100644 --- a/src/z2ui5_cl_demo_app_111.clas.abap +++ b/src/z2ui5_cl_demo_app_111.clas.abap @@ -4,7 +4,7 @@ CLASS z2ui5_cl_demo_app_111 DEFINITION PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES z2ui5_if_app . TYPES: diff --git a/src/z2ui5_cl_demo_app_112.clas.abap b/src/z2ui5_cl_demo_app_112.clas.abap index 1d7cd553..57673065 100644 --- a/src/z2ui5_cl_demo_app_112.clas.abap +++ b/src/z2ui5_cl_demo_app_112.clas.abap @@ -4,7 +4,7 @@ class z2ui5_cl_demo_app_112 definition public section. - interfaces IF_SERIALIZABLE_OBJECT . + interfaces Z2UI5_IF_APP . data CLIENT type ref to Z2UI5_IF_CLIENT . diff --git a/src/z2ui5_cl_demo_app_118.clas.abap b/src/z2ui5_cl_demo_app_118.clas.abap index 59c5182a..fd1fce48 100644 --- a/src/z2ui5_cl_demo_app_118.clas.abap +++ b/src/z2ui5_cl_demo_app_118.clas.abap @@ -4,7 +4,7 @@ CLASS z2ui5_cl_demo_app_118 DEFINITION PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES z2ui5_if_app . DATA check_initialized TYPE abap_bool . diff --git a/src/z2ui5_cl_demo_app_119.clas.abap b/src/z2ui5_cl_demo_app_119.clas.abap index 9c73f421..4dbfcadf 100644 --- a/src/z2ui5_cl_demo_app_119.clas.abap +++ b/src/z2ui5_cl_demo_app_119.clas.abap @@ -4,7 +4,7 @@ CLASS z2ui5_cl_demo_app_119 DEFINITION PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES z2ui5_if_app . DATA product TYPE string . diff --git a/src/z2ui5_cl_demo_app_126.clas.abap b/src/z2ui5_cl_demo_app_126.clas.abap index de14e95c..59172373 100644 --- a/src/z2ui5_cl_demo_app_126.clas.abap +++ b/src/z2ui5_cl_demo_app_126.clas.abap @@ -103,7 +103,7 @@ CLASS Z2UI5_CL_DEMO_APP_126 IMPLEMENTATION. SELECT * FROM Z2UI5_T_01 INTO CORRESPONDING FIELDS OF TABLE @ - UP TO '100' ROWS. + UP TO 100 ROWS. CATCH cx_root. diff --git a/src/z2ui5_cl_demo_app_129.clas.abap b/src/z2ui5_cl_demo_app_129.clas.abap index 1dbd6062..cdf41cb8 100644 --- a/src/z2ui5_cl_demo_app_129.clas.abap +++ b/src/z2ui5_cl_demo_app_129.clas.abap @@ -4,7 +4,7 @@ CLASS z2ui5_cl_demo_app_129 DEFINITION PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES z2ui5_if_app . TYPES: diff --git a/src/z2ui5_cl_demo_app_130.clas.abap b/src/z2ui5_cl_demo_app_130.clas.abap index 9eb41786..53dc7669 100644 --- a/src/z2ui5_cl_demo_app_130.clas.abap +++ b/src/z2ui5_cl_demo_app_130.clas.abap @@ -4,7 +4,7 @@ CLASS z2ui5_cl_demo_app_130 DEFINITION PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES z2ui5_if_app . TYPES: diff --git a/src/z2ui5_cl_demo_app_140.clas.abap b/src/z2ui5_cl_demo_app_140.clas.abap index 763cd58c..cd7cc621 100644 --- a/src/z2ui5_cl_demo_app_140.clas.abap +++ b/src/z2ui5_cl_demo_app_140.clas.abap @@ -4,7 +4,7 @@ CLASS z2ui5_cl_demo_app_140 DEFINITION CREATE PUBLIC . PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES z2ui5_if_app . TYPES: diff --git a/src/z2ui5_cl_demo_app_141.clas.abap b/src/z2ui5_cl_demo_app_141.clas.abap index d4f59bae..c4e423de 100644 --- a/src/z2ui5_cl_demo_app_141.clas.abap +++ b/src/z2ui5_cl_demo_app_141.clas.abap @@ -106,7 +106,7 @@ CLASS Z2UI5_CL_DEMO_APP_141 IMPLEMENTATION. press = client->_event( 'BUTTON_TEXTAREA_CANCEL' ) )->button( text = 'Confirm' - press = client->_event( client->cs_event-popup_close ) + press = client->_event_client( client->cs_event-popup_close ) type = 'Emphasized' ). dialog->_generic( name = `HTML` ns = `core` t_prop = VALUE #( ( n = `content` v = `` ) diff --git a/src/z2ui5_cl_demo_app_142.clas.abap b/src/z2ui5_cl_demo_app_142.clas.abap index aedf73b1..41dbdda0 100644 --- a/src/z2ui5_cl_demo_app_142.clas.abap +++ b/src/z2ui5_cl_demo_app_142.clas.abap @@ -4,7 +4,7 @@ CLASS z2ui5_cl_demo_app_142 DEFINITION PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES z2ui5_if_app . DATA check_initialized TYPE abap_bool . diff --git a/src/z2ui5_cl_demo_app_145.clas.abap b/src/z2ui5_cl_demo_app_145.clas.abap index 36a7357a..a40cf5a9 100644 --- a/src/z2ui5_cl_demo_app_145.clas.abap +++ b/src/z2ui5_cl_demo_app_145.clas.abap @@ -4,7 +4,7 @@ class Z2UI5_CL_DEMO_APP_145 definition public section. - interfaces IF_SERIALIZABLE_OBJECT . + interfaces Z2UI5_IF_APP . data CHECK_INITIALIZED type ABAP_BOOL . diff --git a/src/z2ui5_cl_demo_app_146.clas.abap b/src/z2ui5_cl_demo_app_146.clas.abap index e29d82f3..733bc35e 100644 --- a/src/z2ui5_cl_demo_app_146.clas.abap +++ b/src/z2ui5_cl_demo_app_146.clas.abap @@ -4,7 +4,7 @@ CLASS z2ui5_cl_demo_app_146 DEFINITION PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES z2ui5_if_app . TYPES: diff --git a/src/z2ui5_cl_demo_app_148.clas.abap b/src/z2ui5_cl_demo_app_148.clas.abap index f7a17533..040397be 100644 --- a/src/z2ui5_cl_demo_app_148.clas.abap +++ b/src/z2ui5_cl_demo_app_148.clas.abap @@ -4,7 +4,7 @@ CLASS z2ui5_cl_demo_app_148 DEFINITION PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES z2ui5_if_app . DATA ls_dataset TYPE z2ui5_cl_cc_chartjs=>ty_dataset. diff --git a/src/z2ui5_cl_demo_app_161.clas.abap b/src/z2ui5_cl_demo_app_161.clas.abap index 15707c71..4b576a3f 100644 --- a/src/z2ui5_cl_demo_app_161.clas.abap +++ b/src/z2ui5_cl_demo_app_161.clas.abap @@ -4,7 +4,7 @@ CLASS z2ui5_cl_demo_app_161 DEFINITION PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES z2ui5_if_app . DATA client TYPE REF TO z2ui5_if_client . diff --git a/src/z2ui5_cl_demo_app_163.clas.abap b/src/z2ui5_cl_demo_app_163.clas.abap index 7e27e909..0e429d92 100644 --- a/src/z2ui5_cl_demo_app_163.clas.abap +++ b/src/z2ui5_cl_demo_app_163.clas.abap @@ -4,7 +4,7 @@ class Z2UI5_CL_DEMO_APP_163 definition public section. - interfaces IF_SERIALIZABLE_OBJECT . + interfaces Z2UI5_IF_APP . PROTECTED SECTION. diff --git a/src/z2ui5_cl_demo_app_178.clas.abap b/src/z2ui5_cl_demo_app_178.clas.abap index 7c2bbd3f..2c6c66fe 100644 --- a/src/z2ui5_cl_demo_app_178.clas.abap +++ b/src/z2ui5_cl_demo_app_178.clas.abap @@ -5,7 +5,7 @@ CLASS z2ui5_cl_demo_app_178 DEFINITION PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES z2ui5_if_app . TYPES: diff --git a/src/z2ui5_cl_demo_app_180.clas.abap b/src/z2ui5_cl_demo_app_180.clas.abap index 41616391..21c3033a 100644 --- a/src/z2ui5_cl_demo_app_180.clas.abap +++ b/src/z2ui5_cl_demo_app_180.clas.abap @@ -4,7 +4,7 @@ CLASS z2ui5_cl_demo_app_180 DEFINITION PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES z2ui5_if_app . DATA mv_initialized TYPE abap_bool. diff --git a/src/z2ui5_cl_demo_app_181.clas.abap b/src/z2ui5_cl_demo_app_181.clas.abap index 98e48b81..fe3d3bff 100644 --- a/src/z2ui5_cl_demo_app_181.clas.abap +++ b/src/z2ui5_cl_demo_app_181.clas.abap @@ -4,7 +4,7 @@ CLASS z2ui5_cl_demo_app_181 DEFINITION PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES z2ui5_if_app . DATA mv_initialized TYPE abap_bool . @@ -62,7 +62,7 @@ CLASS Z2UI5_CL_DEMO_APP_181 IMPLEMENTATION. DATA(view) = z2ui5_cl_xml_view=>factory( ). - data(page) = view->page( + data(page) = view->shell( )->page( title = `Cards Demo` class = `sapUiContentPadding` navbuttonpress = client->_event( 'BACK' ) diff --git a/src/z2ui5_cl_demo_app_182.clas.abap b/src/z2ui5_cl_demo_app_182.clas.abap index 034cddd8..34f24918 100644 --- a/src/z2ui5_cl_demo_app_182.clas.abap +++ b/src/z2ui5_cl_demo_app_182.clas.abap @@ -4,7 +4,7 @@ CLASS z2ui5_cl_demo_app_182 DEFINITION PUBLIC SECTION. - INTERFACES if_serializable_object . + INTERFACES z2ui5_if_app . TYPES: BEGIN OF t_attributes3, diff --git a/src/z2ui5_cl_demo_app_184.clas.abap b/src/z2ui5_cl_demo_app_184.clas.abap index 32a3f835..622e5870 100644 --- a/src/z2ui5_cl_demo_app_184.clas.abap +++ b/src/z2ui5_cl_demo_app_184.clas.abap @@ -141,7 +141,7 @@ CLASS z2ui5_cl_demo_app_184 IMPLEMENTATION. SELECT * FROM (mv_table) INTO CORRESPONDING FIELDS OF TABLE @
- UP TO '100' ROWS. + UP TO 100 ROWS. CATCH cx_root. diff --git a/src/z2ui5_cl_demo_app_186.clas.abap b/src/z2ui5_cl_demo_app_186.clas.abap index b785ad5d..c92d3827 100644 --- a/src/z2ui5_cl_demo_app_186.clas.abap +++ b/src/z2ui5_cl_demo_app_186.clas.abap @@ -5,7 +5,7 @@ class Z2UI5_CL_DEMO_APP_186 definition public section. - interfaces IF_SERIALIZABLE_OBJECT . + interfaces Z2UI5_IF_APP . data IS_INITIALIZED type BOOLEAN . diff --git a/src/z2ui5_cl_demo_app_190.clas.abap b/src/z2ui5_cl_demo_app_190.clas.abap index 191e2e98..cbbb0e63 100644 --- a/src/z2ui5_cl_demo_app_190.clas.abap +++ b/src/z2ui5_cl_demo_app_190.clas.abap @@ -151,7 +151,7 @@ CLASS z2ui5_cl_demo_app_190 IMPLEMENTATION. SELECT * FROM (mv_table) INTO CORRESPONDING FIELDS OF TABLE @
- UP TO '100' ROWS. + UP TO 100 ROWS. CATCH cx_root. diff --git a/src/z2ui5_cl_demo_app_194.clas.abap b/src/z2ui5_cl_demo_app_194.clas.abap index 02a40e65..33fad15f 100644 --- a/src/z2ui5_cl_demo_app_194.clas.abap +++ b/src/z2ui5_cl_demo_app_194.clas.abap @@ -167,7 +167,7 @@ CLASS z2ui5_cl_demo_app_194 IMPLEMENTATION. SELECT * FROM (mv_table) INTO CORRESPONDING FIELDS OF TABLE @
- UP TO '100' ROWS. + UP TO 100 ROWS. CATCH cx_root. diff --git a/src/z2ui5_cl_demo_app_196.clas.abap b/src/z2ui5_cl_demo_app_196.clas.abap new file mode 100644 index 00000000..131c3fa9 --- /dev/null +++ b/src/z2ui5_cl_demo_app_196.clas.abap @@ -0,0 +1,186 @@ +CLASS z2ui5_cl_demo_app_196 DEFINITION + PUBLIC + FINAL + CREATE PUBLIC . + + PUBLIC SECTION. + + INTERFACES if_serializable_object . + INTERFACES z2ui5_if_app . + + DATA is_initialized TYPE boolean . + DATA mv_slider_value TYPE i . + + TYPES: BEGIN OF ty_shape, + id TYPE string, + END OF ty_shape. + + DATA mt_shapes TYPE TABLE OF ty_shape. + + PROTECTED SECTION. + PRIVATE SECTION. + + DATA client TYPE REF TO z2ui5_if_client . + + METHODS initialize . + METHODS on_event . + METHODS render_screen . +ENDCLASS. + + + +CLASS Z2UI5_CL_DEMO_APP_196 IMPLEMENTATION. + + + METHOD initialize. + + mv_slider_value = 0. + + mt_shapes = VALUE #( + ( id = `arrow_down` ) + ( id = `arrow_left` ) + ( id = `arrow_right` ) + ( id = `arrow_up` ) + ( id = `attention_1` ) + ( id = `attention_2` ) + ( id = `building` ) + ( id = `bulb` ) + ( id = `bull` ) + ( id = `calendar` ) + ( id = `car` ) + ( id = `cart` ) + ( id = `cereals` ) + ( id = `circle` ) + ( id = `clock` ) + ( id = `cloud` ) + ( id = `conveyor` ) + ( id = `desk` ) + ( id = `document` ) + ( id = `documents` ) + ( id = `dollar` ) + ( id = `donut` ) + ( id = `drop` ) + ( id = `envelope` ) + ( id = `euro` ) + ( id = `factory` ) + ( id = `female` ) + ( id = `fish` ) + ( id = `flag` ) + ( id = `folder_1` ) + ( id = `folder_2` ) + ( id = `gear` ) + ( id = `heart` ) + ( id = `honey` ) + ( id = `house` ) + ( id = `information` ) + ( id = `letter` ) + ( id = `lung` ) + ( id = `machine` ) + ( id = `male` ) + ( id = `pen` ) + ( id = `person` ) + ( id = `pin` ) + ( id = `plane` ) + ( id = `printer` ) + ( id = `progress` ) + ( id = `question` ) + ( id = `robot` ) + ( id = `sandclock` ) + ( id = `speed` ) + ( id = `stomach` ) + ( id = `success` ) + ( id = `tank_diesel` ) + ( id = `tank_lpg` ) + ( id = `thermo` ) + ( id = `tool` ) + ( id = `transfusion` ) + ( id = `travel` ) + ( id = `turnip` ) + ( id = `vehicle_construction` ) + ( id = `vehicle_tank` ) + ( id = `vehicle_tractor` ) + ( id = `vehicle_truck_1` ) + ( id = `vehicle_truck_2` ) + ( id = `vehicle_truck_3` ) + ( id = `warehouse` ) + ). + + ENDMETHOD. + + + METHOD on_event. + + CASE client->get( )-event. + + WHEN 'BACK'. + client->nav_app_leave( ). + + ENDCASE. + + ENDMETHOD. + + + METHOD render_screen. + + DATA lv_script TYPE string. + + + DATA(view) = z2ui5_cl_xml_view=>factory( ). + view->_generic( ns = `html` name = `style` )->_cc_plain_xml( `.SICursorStyle:hover {` && + ` cursor: pointer;` && + `}` && + `.SIBorderStyle {` && + ` border: 1px solid #cccccc;` && + `}` && + `.SIPanelStyle .sapMPanelContent{` && + ` overflow: visible;` && + `}` ). + DATA(page) = view->shell( + )->page( + showheader = xsdbool( abap_false = client->get( )-check_launchpad_active ) + title = 'abap2UI5 - Status Indicators Library' + navbuttonpress = client->_event( 'BACK' ) + shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + ). + + DATA(panel) = page->panel( class = `sapUiResponsiveMargin SIPanelStyle` width = `95%` ). + panel->text( text = `Use the slider for adjusting the fill` ). + panel->slider( class = `sapUiLargeMarginBottom` enabletickmarks = abap_true + value = client->_bind_edit( mv_slider_value ) )->get( + )->responsive_scale( tickmarksbetweenlabels = `10` ). + + DATA(fb) = panel->flex_box( wrap = `Wrap` items = client->_bind( mt_shapes ) ). + fb->items( + )->flex_box( direction = `Column` class = `sapUiTinyMargin SIBorderStyle` + )->items( + )->status_indicator( value = client->_bind_edit( mv_slider_value ) width = `120px` height = `120px` class = `sapUiTinyMargin SICursorStyle` + )->property_thresholds( + )->property_threshold( fillcolor = `Error` tovalue = `25` )->get_parent( + )->property_threshold( fillcolor = `Critical` tovalue = `60` )->get_parent( + )->property_threshold( fillcolor = `Good` tovalue = `100` )->get_parent( + )->get_parent( + )->shape_group( + )->library_shape( shapeid = `{ID}` ). + + + client->view_display( view->stringify( ) ). + + ENDMETHOD. + + + METHOD z2ui5_if_app~main. + + me->client = client. + + IF is_initialized = abap_false. + + initialize( ). + render_screen( ). + is_initialized = abap_true. + + ENDIF. + + on_event( ). + + ENDMETHOD. +ENDCLASS. diff --git a/src/z2ui5_cl_demo_app_196.clas.xml b/src/z2ui5_cl_demo_app_196.clas.xml new file mode 100644 index 00000000..19b762cf --- /dev/null +++ b/src/z2ui5_cl_demo_app_196.clas.xml @@ -0,0 +1,16 @@ + + + + + + Z2UI5_CL_DEMO_APP_196 + E + status indicator + 1 + X + X + X + + + + diff --git a/src/z2ui5_cl_demo_app_197.clas.abap b/src/z2ui5_cl_demo_app_197.clas.abap new file mode 100644 index 00000000..8e6572f9 --- /dev/null +++ b/src/z2ui5_cl_demo_app_197.clas.abap @@ -0,0 +1,193 @@ +CLASS z2ui5_cl_demo_app_197 DEFINITION + PUBLIC + CREATE PUBLIC . + + PUBLIC SECTION. + + INTERFACES z2ui5_if_app . + + TYPES: + BEGIN OF ty_s_tab, + selkz TYPE abap_bool, + product TYPE string, + create_date TYPE string, + create_by TYPE string, + storage_location TYPE string, + quantity TYPE i, + END OF ty_s_tab . + TYPES: + ty_t_table TYPE STANDARD TABLE OF ty_s_tab WITH EMPTY KEY . + + DATA mt_table TYPE ty_t_table . + DATA mt_table_full TYPE ty_t_table . + DATA mt_table_products TYPE ty_t_table . + DATA check_initialized TYPE abap_bool . + DATA client TYPE REF TO z2ui5_if_client . + DATA mv_check_popover TYPE abap_bool . + DATA mv_product TYPE string . + + METHODS z2ui5_set_data . + METHODS z2ui5_display_view . + + PROTECTED SECTION. + PRIVATE SECTION. +ENDCLASS. + + + +CLASS Z2UI5_CL_DEMO_APP_197 IMPLEMENTATION. + + + METHOD z2ui5_display_view. + + DATA(view) = z2ui5_cl_xml_view=>factory( )->shell( ). + + DATA(page) = view->page( id = `page_main` + title = 'abap2UI5 - List Report Features' + navbuttonpress = client->_event( 'BACK' ) + shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). + + DATA(facet) = page->facet_filter( id = `idFacetFilter` type = `Light` showpersonalization = abap_true showreset = abap_true reset = client->_event( val = `RESET` ) + )->facet_filter_list( title = `Products` mode = `MultiSelect` items = client->_bind( mt_table_products ) listclose = client->_event( val = `FILTER` +* t_arg = VALUE #( ( `${$parameters>/selectedAll}` ) ) ) +* t_arg = VALUE #( ( `$event.mParameters` ) ) ) + t_arg = VALUE #( ( `$event.mParameters.selectedItems` ) ) ) + )->facet_filter_item( text = `{PRODUCT}` ). + + DATA(tab) = page->table( id = `tab` items = client->_bind_edit( val = mt_table ) ). + + DATA(lo_columns) = tab->columns( ). + lo_columns->column( )->text( text = `Product` ). + lo_columns->column( )->text( text = `Date` ). + lo_columns->column( )->text( text = `Name` ). + lo_columns->column( )->text( text = `Location` ). + lo_columns->column( )->text( text = `Quantity` ). + + DATA(lo_cells) = tab->items( )->column_list_item( ). + lo_cells->link( id = `link` text = '{PRODUCT}' press = client->_event( val = `POPOVER_DETAIL` ) ). + lo_cells->text( `{CREATE_DATE}` ). + lo_cells->text( `{CREATE_BY}` ). + lo_cells->text( `{STORAGE_LOCATION}` ). + lo_cells->text( `{QUANTITY}` ). + + client->view_display( view->stringify( ) ). + + ENDMETHOD. + + + METHOD z2ui5_if_app~main. + + me->client = client. + + IF check_initialized = abap_false. + check_initialized = abap_true. + z2ui5_display_view( ). + z2ui5_set_data( ). + RETURN. + ENDIF. + + CASE client->get( )-event. + WHEN 'RESET'. + mt_table = mt_table_full. + client->view_model_update( ). + WHEN 'FILTER'. + + DATA lt_range TYPE RANGE OF string. + + DATA(lt_arg) = client->get( )-t_event_arg. + DATA(lv_json) = lt_arg[ 1 ]. + TRY. + DATA(lo_json) = z2ui5_cl_ajson=>parse( lv_json ). + + DATA(l_members) = lo_json->members( '/' ). + + LOOP AT l_members INTO DATA(l_member). + DATA(lv_val) = lo_json->get( '/' && l_member && '/mProperties/text' ). + + APPEND VALUE #( sign = 'I' option = 'EQ' low = lv_val ) TO lt_range. + + ENDLOOP. + + CATCH cx_root. + ENDTRY. + + mt_table = mt_table_full. + + LOOP AT mt_table INTO DATA(ls_tab). + IF ls_tab-product NOT IN lt_range. + DELETE mt_table. + ENDIF. + ENDLOOP. + + client->view_model_update( ). + + WHEN 'BACK'. + client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ). + + ENDCASE. + + ENDMETHOD. + + + METHOD z2ui5_set_data. + + mt_table = VALUE #( + ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) + ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) + ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) + ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) + ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) + ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) + ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) + ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) + ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) + ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) + ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) + ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) + ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) + ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) + ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) + ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) + ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) + ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) + ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) + ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) + ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) + ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) + ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) + ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) + ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) + ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) + ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) + ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) + ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) + ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) + ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) + ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) + ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) + ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) + ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) + ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) + ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) + ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) + ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) + ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) + ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) + ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) + ( product = 'table' create_date = `01.01.2023` create_by = `Peter` storage_location = `AREA_001` quantity = 400 ) + ( product = 'chair' create_date = `01.01.2022` create_by = `James` storage_location = `AREA_001` quantity = 123 ) + ( product = 'sofa' create_date = `01.05.2021` create_by = `Simone` storage_location = `AREA_001` quantity = 700 ) + ( product = 'computer' create_date = `27.01.2023` create_by = `Theo` storage_location = `AREA_001` quantity = 200 ) + ( product = 'printer' create_date = `01.01.2023` create_by = `Hannah` storage_location = `AREA_001` quantity = 90 ) + ( product = 'table2' create_date = `01.01.2023` create_by = `Julia` storage_location = `AREA_001` quantity = 110 ) + ). + + SORT mt_table BY product. + mt_table_full = mt_table. + + mt_table_products = mt_table. + + DELETE ADJACENT DUPLICATES FROM mt_table_products COMPARING product. + + ENDMETHOD. +ENDCLASS. diff --git a/src/z2ui5_cl_demo_app_197.clas.xml b/src/z2ui5_cl_demo_app_197.clas.xml new file mode 100644 index 00000000..ed341e30 --- /dev/null +++ b/src/z2ui5_cl_demo_app_197.clas.xml @@ -0,0 +1,16 @@ + + + + + + Z2UI5_CL_DEMO_APP_197 + E + facet filteer + 1 + X + X + X + + + + diff --git a/src/z2ui5_cl_demo_app_198.clas.abap b/src/z2ui5_cl_demo_app_198.clas.abap new file mode 100644 index 00000000..347687d4 --- /dev/null +++ b/src/z2ui5_cl_demo_app_198.clas.abap @@ -0,0 +1,55 @@ +CLASS z2ui5_cl_demo_app_198 DEFINITION + PUBLIC + CREATE PUBLIC . + + PUBLIC SECTION. + + INTERFACES z2ui5_if_app . + + DATA product TYPE string . + DATA quantity TYPE string . + DATA check_initialized TYPE abap_bool. + + PROTECTED SECTION. + PRIVATE SECTION. +ENDCLASS. + + + +CLASS z2ui5_cl_demo_app_198 IMPLEMENTATION. + + + METHOD z2ui5_if_app~main. + + IF check_initialized = abap_false. + check_initialized = abap_true. + + product = 'tomato'. + quantity = '500'. + + DATA(view) = z2ui5_cl_xml_view=>factory( ). + view->_generic( ns = `html` name = `style` )->_cc_plain_xml( `.my-style{ background: black !important; opacity: 0.6; color: white; }` ). + client->view_display( view->shell( + )->page( + title = 'abap2UI5 - First Example' + navbuttonpress = client->_event( val = 'BACK' s_ctrl = VALUE #( check_view_destroy = abap_true ) ) + shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) + )->button( + text = 'post' + press = client->_event( val = 'BUTTON_POST' t_arg = VALUE #( ( `$event` ) ) ) + )->stringify( ) ). + + ENDIF. + + CASE client->get( )-event. + + WHEN 'BUTTON_POST'. + DATA(lt_arg) = client->get( )-t_event_arg. + + WHEN 'BACK'. + client->nav_app_leave( ). + + ENDCASE. + + ENDMETHOD. +ENDCLASS. diff --git a/src/z2ui5_cl_demo_app_198.clas.xml b/src/z2ui5_cl_demo_app_198.clas.xml new file mode 100644 index 00000000..75822598 --- /dev/null +++ b/src/z2ui5_cl_demo_app_198.clas.xml @@ -0,0 +1,16 @@ + + + + + + Z2UI5_CL_DEMO_APP_198 + E + t_arg object example + 1 + X + X + X + + + +