From e6d38960281a8239ff371ad8f2723fab0b5c3ba3 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 26 Nov 2025 22:54:00 +0000 Subject: [PATCH 1/2] Replace old string syntax ('...') with modern pipe syntax (|...|) in ABAP code snippets Updated all abap2UI5 code examples throughout the documentation to use the modern ABAP string literal syntax with pipe delimiters |...| instead of the legacy single quote syntax '...'. This affects: - Event handling (WHEN statements, client->_event() calls) - String literals in method parameters - View definitions - Message and error handling - Data initialization 16 files modified with consistent string delimiter updates. --- docs/advanced/extensibility/custom_js.md | 6 ++-- docs/development/events.md | 14 ++++----- docs/development/general.md | 4 +-- docs/development/messages.md | 10 +++--- docs/development/model/model.md | 8 ++--- docs/development/navigation/app_state.md | 4 +-- docs/development/navigation/share.md | 4 +-- docs/development/popups.md | 40 ++++++++++++------------ docs/development/specific/barcodes.md | 22 ++++++------- docs/development/specific/camera.md | 4 +-- docs/development/specific/files.md | 12 +++---- docs/development/specific/formatter.md | 10 +++--- docs/development/specific/geolocation.md | 2 +- docs/development/specific/xlsx.md | 26 +++++++-------- docs/get_started/hello_world.md | 4 +-- docs/technical/dx.md | 2 +- 16 files changed, 86 insertions(+), 86 deletions(-) diff --git a/docs/advanced/extensibility/custom_js.md b/docs/advanced/extensibility/custom_js.md index b9992f5..2410a68 100644 --- a/docs/advanced/extensibility/custom_js.md +++ b/docs/advanced/extensibility/custom_js.md @@ -18,13 +18,13 @@ METHOD z2ui5_if_app~main. )->_cc_plain_xml( |function myFunction() \{ console.log( `Hello World` ); \}| ). - view->page( + view->page( )->button( text = `call custom JS` - press = client->_event( 'CUSTOM_JS' ) ). + press = client->_event( |CUSTOM_JS| ) ). client->view_display( view->stringify( ) ). ENDIF. - IF client->get( )-event = 'CUSTOM_JS'. + IF client->get( )-event = |CUSTOM_JS|. client->follow_up_action( `myFunction()` ). ENDIF. diff --git a/docs/development/events.md b/docs/development/events.md index 71ac21d..33dc2c3 100644 --- a/docs/development/events.md +++ b/docs/development/events.md @@ -16,12 +16,12 @@ METHOD z2ui5_if_app~main. client->view_display( z2ui5_cl_xml_view=>factory( )->button( - text = 'post' - press = client->_event( 'BUTTON_POST' ) + text = |post| + press = client->_event( |BUTTON_POST| ) )->stringify( ) ). CASE client->get( )-event. - WHEN 'BUTTON_POST'. + WHEN |BUTTON_POST|. client->message_box_display( |Your name is { name }| ). ENDCASE. @@ -41,7 +41,7 @@ METHOD z2ui5_if_app~main. )->stringify( ) ). CASE client->get( )-event. - WHEN 'BUTTON_POST'. + WHEN |BUTTON_POST|. client->message_box_display( |The button text is { client->get_event_arg( ) }| ). ENDCASE. @@ -60,7 +60,7 @@ METHOD z2ui5_if_app~main. )->stringify( ) ). CASE client->get( )-event. - WHEN 'BUTTON_POST'. + WHEN |BUTTON_POST|. "mainView--button_id client->message_box_display( |The button id is { client->get_event_arg( ) }| ). ENDCASE. @@ -80,7 +80,7 @@ METHOD z2ui5_if_app~main. )->stringify( ) ). CASE client->get( )-event. - WHEN 'BUTTON_POST'. + WHEN |BUTTON_POST|. "press client->message_box_display( |The evend id is { client->get_event_arg( ) }| ). ENDCASE. @@ -112,7 +112,7 @@ METHOD z2ui5_if_app~main. )->stringify( ) ). CASE client->get( )-event. - WHEN 'BUTTON_POST'. + WHEN |BUTTON_POST|. client->message_box_display( |The name is { client->get_event_arg( ) }| ). ENDCASE. diff --git a/docs/development/general.md b/docs/development/general.md index c1d95ae..b552130 100644 --- a/docs/development/general.md +++ b/docs/development/general.md @@ -31,10 +31,10 @@ CLASS z2ui5_cl_app IMPLEMENTATION. "handle events after frontend CASE client->get( )-event. - WHEN 'OK'. + WHEN |OK|. DATA(lt_arg) = client->get_event_arg( ). "event handling - WHEN 'CANCEL'. + WHEN |CANCEL|. "... ENDCASE. diff --git a/docs/development/messages.md b/docs/development/messages.md index 9e5cb62..ba7a207 100644 --- a/docs/development/messages.md +++ b/docs/development/messages.md @@ -35,9 +35,9 @@ For error messages, simply change the type: ```abap METHOD z2ui5_if_app~main. - client->message_box_display( - text = 'This is an error message' - type = 'error' ). + client->message_box_display( + text = |This is an error message| + type = |error| ). ENDMETHOD. ``` @@ -89,8 +89,8 @@ The message box provides basic output. For a more detailed output, use the popup METHOD z2ui5_if_app~main. data(lt_msg) = value bapirettab( - ( type = 'E' id = 'MSG1' number = '001' message = 'An empty Report field causes an empty XML Message to be sent' ) - ( type = 'I' id = 'MSG2' number = '002' message = 'Product already in use' ) ). + ( type = |E| id = |MSG1| number = |001| message = |An empty Report field causes an empty XML Message to be sent| ) + ( type = |I| id = |MSG2| number = |002| message = |Product already in use| ) ). client->nav_app_call( z2ui5_cl_pop_messages=>factory( lt_msg ) ). diff --git a/docs/development/model/model.md b/docs/development/model/model.md index f31d783..c3a1dee 100644 --- a/docs/development/model/model.md +++ b/docs/development/model/model.md @@ -21,7 +21,7 @@ CLASS z2ui5_cl_app_hello_world IMPLEMENTATION. METHOD z2ui5_if_app~main. client->view_display( z2ui5_cl_xml_view=>factory( - )->page( 'abap2UI5 - Hello World' + )->page( |abap2UI5 - Hello World| )->text( `My Text` )->text( client->_bind( name ) )->stringify( ) ). @@ -47,14 +47,14 @@ CLASS z2ui5_cl_app_hello_world IMPLEMENTATION. METHOD z2ui5_if_app~main. client->view_display( z2ui5_cl_xml_view=>factory( - )->page( 'abap2UI5 - Hello World' + )->page( |abap2UI5 - Hello World| )->text( `Enter your name` )->input( client->_bind_edit( name ) - )->button( text = 'post' press = client->_event( 'POST' ) + )->button( text = |post| press = client->_event( |POST| ) )->stringify( ) ). CASE client->get( )-event. - WHEN 'POST'. + WHEN |POST|. client->message_box_display( |Your name is { name }.| ). RETURN. ENDCASE. diff --git a/docs/development/navigation/app_state.md b/docs/development/navigation/app_state.md index 047a812..514a74c 100644 --- a/docs/development/navigation/app_state.md +++ b/docs/development/navigation/app_state.md @@ -26,8 +26,8 @@ CLASS z2ui5_cl_sample_app_state IMPLEMENTATION. view->label( 'quantity' )->input( client->_bind_edit( mv_quantity ) )->button( - text = 'post with state' - press = client->_event( val = 'BUTTON_POST' ) + text = |post with state| + press = client->_event( val = |BUTTON_POST| ) )->stringify( ) ). ENDIF. diff --git a/docs/development/navigation/share.md b/docs/development/navigation/share.md index 0294260..af5de1d 100644 --- a/docs/development/navigation/share.md +++ b/docs/development/navigation/share.md @@ -22,8 +22,8 @@ CLASS z2ui5_cl_sample_share IMPLEMENTATION. )->label( 'quantity' )->input( client->_bind_edit( mv_quantity ) )->button( - text = 'share' - press = client->_event( val = 'BUTTON_POST' ) + text = |share| + press = client->_event( val = |BUTTON_POST| ) )->stringify( ) ). ENDIF. diff --git a/docs/development/popups.md b/docs/development/popups.md index af66e72..ea7a584 100644 --- a/docs/development/popups.md +++ b/docs/development/popups.md @@ -14,8 +14,8 @@ To display a popup, use the method `client->popup_display` instead of `client->v METHOD z2ui5_if_app~main. DATA(lo_popup) = z2ui5_cl_xml_view=>factory_popup( - )->dialog( 'Popup - Info' - )->text( 'this is an information shown in a popup' ). + )->dialog( |Popup - Info| + )->text( |this is an information shown in a popup| ). client->popup_display( lo_popup->stringify( ) ). ENDMETHOD. @@ -28,26 +28,26 @@ METHOD Z2UI5_if_app~main. IF client->check_on_init( ). DATA(lo_view) = z2ui5_cl_xml_view=>factory( - )->page( 'abap2UI5 - Popups' + )->page( |abap2UI5 - Popups| )->button( - text = 'popup rendering, no background rendering' - press = client->_event( 'POPUP_OPEN' ) ). + text = |popup rendering, no background rendering| + press = client->_event( |POPUP_OPEN| ) ). client->view_display( lo_view->stringify( ) ). ENDIF. CASE client->get( )-event. - WHEN 'POPUP_OPEN'. - DATA(lo_popup) = Z2UI5_cl_xml_view=>factory_popup( - )->dialog( 'Popup' - )->text( 'this is a text in a popup' + WHEN |POPUP_OPEN|. + DATA(lo_popup) = Z2UI5_cl_xml_view=>factory_popup( + )->dialog( |Popup| + )->text( |this is a text in a popup| )->button( - text = 'close' - press = client->_event( 'POPUP_CLOSE' ) ). + text = |close| + press = client->_event( |POPUP_CLOSE| ) ). client->popup_display( lo_popup->stringify( ) ). - WHEN 'POPUP_CLOSE'. + WHEN |POPUP_CLOSE|. client->popup_destroy( ). ENDCASE. @@ -84,22 +84,22 @@ To display a popover, use the method `client->popover_display` and specify the I METHOD Z2UI5_if_app~main. IF client->check_on_init( ). - DATA(view) = z2ui5_cl_xml_view=>factory( + DATA(view) = z2ui5_cl_xml_view=>factory( )->shell( - )->page( 'Popover Example' + )->page( |Popover Example| )->button( - text = 'display popover' - press = client->_event( 'POPOVER_OPEN' ) - id = 'TEST' ). + text = |display popover| + press = client->_event( |POPOVER_OPEN| ) + id = |TEST| ). client->view_display( view->stringify( ) ). ENDIF. CASE client->get( )-event. - WHEN 'POPOVER_OPEN'. + WHEN |POPOVER_OPEN|. DATA(popover) = Z2UI5_cl_xml_view=>factory_popup( - )->popover( placement = 'Left' + )->popover( placement = |Left| )->text( `this is a popover` )->button( id = `my_id` @@ -109,7 +109,7 @@ METHOD Z2UI5_if_app~main. xml = view->stringify( ) by_id = `my_id` ). - WHEN 'POPOVER_CLOSE'. + WHEN |POPOVER_CLOSE|. client->popover_destroy( ). ENDCASE. diff --git a/docs/development/specific/barcodes.md b/docs/development/specific/barcodes.md index 0a91fbe..43bd3a6 100644 --- a/docs/development/specific/barcodes.md +++ b/docs/development/specific/barcodes.md @@ -22,15 +22,15 @@ METHOD z2ui5_if_app~main. )->page( )->barcode_scanner_button( dialogtitle = `Barcode Scanner` - scansuccess = client->_event( - val = 'SCAN_SUCCESS' + scansuccess = client->_event( + val = |SCAN_SUCCESS| t_arg = VALUE #( ( `${$parameters>/text}` ) ( `${$parameters>/format}` ) ) ) ). client->view_display( lo_view->stringify( ) ). - IF client->get( )-event = 'SCAN_SUCCESS'. + IF client->get( )-event = |SCAN_SUCCESS|. DATA(lv_input) = client->get_event_arg( 1 ). DATA(lv_format) = client->get_event_arg( 2 ). @@ -75,12 +75,12 @@ CLASS z2ui5_cl_sample_focus IMPLEMENTATION. )->input( id = 'id1' value = client->_bind_edit( one ) - submit = client->_event( 'one_enter' ) + submit = client->_event( |one_enter| ) )->label( 'Two' )->input( id = 'id2' value = client->_bind_edit( two ) - submit = client->_event( 'two_enter' ) ). + submit = client->_event( |two_enter| ) ). page->_z2ui5( )->focus( client->_bind( focus_id ) ). client->view_display( page->stringify( ) ). @@ -88,10 +88,10 @@ CLASS z2ui5_cl_sample_focus IMPLEMENTATION. ENDIF. CASE client->get( )-event. - WHEN 'one_enter'. + WHEN |one_enter|. focus_id = 'id2'. client->view_model_update( ). - WHEN 'two_enter'. + WHEN |two_enter|. focus_id = 'id1'. client->view_model_update( ). ENDCASE. @@ -128,17 +128,17 @@ CLASS z2ui5_cl_sample_sound IMPLEMENTATION. value = client->_bind_edit( company_code ) type = `Number` placeholder = `Company Code` - submit = client->_event( 'CUSTOM_JS_FROM_EB' ) ). + submit = client->_event( |CUSTOM_JS_FROM_EB| ) ). vbox->button( text = `call custom JS from EB` - press = client->_event( 'CUSTOM_JS_FROM_EB' ) ). + press = client->_event( |CUSTOM_JS_FROM_EB| ) ). client->view_display( view->stringify( ) ). ENDIF. - IF client->get( )-event = 'CUSTOM_JS_FROM_EB'. + IF client->get( )-event = |CUSTOM_JS_FROM_EB|. IF company_code IS INITIAL. client->follow_up_action( val = `playSound()` ). - client->message_box_display( type = 'error' text = 'Input is empty!' ). + client->message_box_display( type = |error| text = |Input is empty!| ). ELSE. CLEAR company_code. ENDIF. diff --git a/docs/development/specific/camera.md b/docs/development/specific/camera.md index c56d84a..cc208de 100644 --- a/docs/development/specific/camera.md +++ b/docs/development/specific/camera.md @@ -18,10 +18,10 @@ CLASS z2ui5_cl_demo_app_306 IMPLEMENTATION. METHOD z2ui5_if_app~main. IF client->check_on_init( ). - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( )->page( 'abap2UI5 - Device Camera Picture' + DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( )->page( |abap2UI5 - Device Camera Picture| )->_z2ui5( )->camera_picture( value = client->_bind_edit( mv_picture_base ) - onphoto = client->_event( 'CAPTURE' ) ). + onphoto = client->_event( |CAPTURE| ) ). client->view_display( page->stringify( ) ). ENDIF. diff --git a/docs/development/specific/files.md b/docs/development/specific/files.md index 000aeb8..6386585 100644 --- a/docs/development/specific/files.md +++ b/docs/development/specific/files.md @@ -25,12 +25,12 @@ CLASS z2ui5_cl_sample_upload IMPLEMENTATION. )->_z2ui5( )->file_uploader( value = client->_bind_edit( mv_value ) path = client->_bind_edit( mv_path ) - placeholder = 'filepath here...' - upload = client->_event( 'UPLOAD' ) + placeholder = |filepath here...| + upload = client->_event( |UPLOAD| ) )->stringify( ) ). CASE client->get( )-event. - WHEN 'UPLOAD'. + WHEN |UPLOAD|. "process with mv_value and mv_path... client->message_box_display( `file uploaded` ). ENDCASE. @@ -47,12 +47,12 @@ METHOD z2ui5_if_app~main. client->view_display( z2ui5_cl_xml_view=>factory( )->page( )->button( - text = 'Open Download Popup' - press = client->_event( 'BUTTON_DOWNLOAD' ) + text = |Open Download Popup| + press = client->_event( |BUTTON_DOWNLOAD| ) )->stringify( ) ). CASE client->get( )-event. - WHEN 'BUTTON_DOWNLOAD'. + WHEN |BUTTON_DOWNLOAD|. DATA(lv_name) = `Default_File_Name.jpg`. DATA(lv_content) = `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAApgAAA` && `KYB3X3/OAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAANCSURBVEiJtZZPbBtFFMZ/M7ubXdtdb1xSFyeilBapySVU8h8OoFaooFSqiihIVIp` && diff --git a/docs/development/specific/formatter.md b/docs/development/specific/formatter.md index c4b979b..c5b0146 100644 --- a/docs/development/specific/formatter.md +++ b/docs/development/specific/formatter.md @@ -35,13 +35,13 @@ CLASS z2ui5_cl_demo_app_067 IMPLEMENTATION. ENDIF. CASE client->get( )-event. - WHEN 'BACK'. + WHEN |BACK|. client->nav_app_leave( client->get_app( client->get( )-s_draft-id_prev_app_stack ) ). ENDCASE. DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( )->page( title = 'abap2UI5 - Currency Format' - navbuttonpress = client->_event( 'BACK' ) + navbuttonpress = client->_event( |BACK| ) shownavbutton = xsdbool( client->get( )-s_draft-id_prev_app_stack IS NOT INITIAL ) ). page->simple_form( title = 'Currency' @@ -98,9 +98,9 @@ CLASS z2ui5_cl_demo_app_067 IMPLEMENTATION. path = abap_true ) }', '{ client->_bind_edit( val = currency path = abap_true ) }'], type: 'sap.ui.model.type.Currency' , formatOptions: \{ style : 'long' \} \}| - )->label( 'event' - )->button( text = 'send' - press = client->_event( 'BUTTON' ) ). + )->label( |event| + )->button( text = |send| + press = client->_event( |BUTTON| ) ). page->simple_form( title = 'No Zeros' editable = abap_true diff --git a/docs/development/specific/geolocation.md b/docs/development/specific/geolocation.md index 16292e7..a1b4503 100644 --- a/docs/development/specific/geolocation.md +++ b/docs/development/specific/geolocation.md @@ -38,7 +38,7 @@ CLASS z2ui5_cl_sample_geolocation IMPLEMENTATION. )->stringify( ) ). CASE client->get( )-event. - WHEN 'POST'. + WHEN |POST|. "processing... ENDCASE. diff --git a/docs/development/specific/xlsx.md b/docs/development/specific/xlsx.md index df0f6de..5d08e3e 100644 --- a/docs/development/specific/xlsx.md +++ b/docs/development/specific/xlsx.md @@ -29,11 +29,11 @@ CLASS z2ui5_cl_sample_upload IMPLEMENTATION. )->_z2ui5( )->file_uploader( value = client->_bind_edit( mv_value ) path = client->_bind_edit( mv_path ) - placeholder = 'filepath here...' - upload = client->_event( 'UPLOAD' ) + placeholder = |filepath here...| + upload = client->_event( |UPLOAD| ) )->stringify( ) ). - IF client->get( )-event = 'UPLOAD'. + IF client->get( )-event = |UPLOAD|. data(lr_itab) = lcl_help=>itab_get_by_xlsx( mv_value ). "further process with itab... @@ -92,8 +92,8 @@ Convert an internal table to an XLSX file and download it to the frontend: client->view_display( z2ui5_cl_xml_view=>factory( )->page( )->button( - text = 'Open Download Popup' - press = client->_event( 'DOWNLOAD' ) + text = |Open Download Popup| + press = client->_event( |DOWNLOAD| ) )->stringify( ) ). IF client->get( )-event = `DOWNLOAD`. @@ -107,9 +107,9 @@ Convert an internal table to an XLSX file and download it to the frontend: TYPES ty_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. DATA(lt_tab) = VALUE ty_tab( - ( count = '1' value = `red` descr = `this is a description` ) - ( count = '2' value = `red` descr = `this is a description` ) - ( count = '3' value = `red` descr = `this is a description` ) ). + ( count = |1| value = `red` descr = `this is a description` ) + ( count = |2| value = `red` descr = `this is a description` ) + ( count = |3| value = `red` descr = `this is a description` ) ). DATA(lv_file) = lcl_help=>xlsx_get_by_itab( lt_tab ). client->follow_up_action( val = client->_event_client( @@ -188,8 +188,8 @@ METHOD z2ui5_if_app~main. client->view_display( z2ui5_cl_xml_view=>factory( )->page( )->button( - text = 'Open Download Popup' - press = client->_event( 'DOWNLOAD' ) + text = |Open Download Popup| + press = client->_event( |DOWNLOAD| ) )->stringify( ) ). IF client->get( )-event = `DOWNLOAD`. @@ -203,9 +203,9 @@ METHOD z2ui5_if_app~main. TYPES ty_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. DATA(lt_tab) = VALUE ty_tab( - ( count = '1' value = `red` descr = `this is a description` ) - ( count = '2' value = `red` descr = `this is a description` ) - ( count = '3' value = `red` descr = `this is a description` ) ). + ( count = |1| value = `red` descr = `this is a description` ) + ( count = |2| value = `red` descr = `this is a description` ) + ( count = |3| value = `red` descr = `this is a description` ) ). DATA(lv_file) = lcl_help=>get_xlsx_by_itab( lt_tab ). client->follow_up_action( val = client->_event_client( diff --git a/docs/get_started/hello_world.md b/docs/get_started/hello_world.md index 0144723..8785f78 100644 --- a/docs/get_started/hello_world.md +++ b/docs/get_started/hello_world.md @@ -64,7 +64,7 @@ CLASS z2ui5_cl_app_hello_world IMPLEMENTATION. )->button( text = |post| press = client->_event( |POST| ) ) ). CASE client->get( )-event. - WHEN 'POST'. + WHEN |POST|. client->message_box_display( |Hello World!| ). RETURN. ENDCASE. @@ -94,7 +94,7 @@ CLASS z2ui5_cl_app_hello_world IMPLEMENTATION. )->input( client->_bind_edit( name ) ) ). CASE client->get( )-event. - WHEN 'POST'. + WHEN |POST|. client->message_box_display( |Your name is { name }.| ). RETURN. ENDCASE. diff --git a/docs/technical/dx.md b/docs/technical/dx.md index 1054b50..36da7b3 100644 --- a/docs/technical/dx.md +++ b/docs/technical/dx.md @@ -71,7 +71,7 @@ CLASS zcl_app_input IMPLEMENTATION. client->view_display( z2ui5_cl_xml_view=>factory( )->input( client->_bind_edit( pa_arbgb ) - )->button( text = 'post' press = client->_event( 'POST' ) ) ). + )->button( text = |post| press = client->_event( |POST| ) ) ). RETURN. ENDIF. From 798f4c9cc6b726b5bc6dc8a64b6851f2348fb805 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 26 Nov 2025 23:09:08 +0000 Subject: [PATCH 2/2] Apply Clean ABAP string syntax: Use backticks for literals, pipes for templates Following Clean ABAP guidelines, replaced pipe delimiters |...| with backticks `...` for simple string literals, while keeping |...| only for string templates with variables. Changes: - Simple literals: `POST`, `BUTTON_POST`, `close`, etc. (was: |...|) - String templates: |Your name is { name }| (unchanged, contains variable) - UI5 bindings: '{SALESORDER}' (unchanged, UI5 syntax) This follows Clean ABAP recommendations: - Use ` for defining literals - Use | only to assemble text with variables - Avoids needless overhead from pipe syntax for fixed values 16 files updated with consistent Clean ABAP string syntax. --- docs/advanced/extensibility/custom_js.md | 4 +-- docs/development/events.md | 14 ++++----- docs/development/general.md | 4 +-- docs/development/messages.md | 8 +++--- docs/development/model/model.md | 8 +++--- docs/development/navigation/app_state.md | 4 +-- docs/development/navigation/share.md | 4 +-- docs/development/popups.md | 36 ++++++++++++------------ docs/development/specific/barcodes.md | 18 ++++++------ docs/development/specific/camera.md | 4 +-- docs/development/specific/files.md | 12 ++++---- docs/development/specific/formatter.md | 6 ++-- docs/development/specific/geolocation.md | 2 +- docs/development/specific/xlsx.md | 26 ++++++++--------- docs/get_started/hello_world.md | 18 ++++++------ docs/technical/dx.md | 2 +- 16 files changed, 85 insertions(+), 85 deletions(-) diff --git a/docs/advanced/extensibility/custom_js.md b/docs/advanced/extensibility/custom_js.md index 2410a68..c9593fe 100644 --- a/docs/advanced/extensibility/custom_js.md +++ b/docs/advanced/extensibility/custom_js.md @@ -20,11 +20,11 @@ METHOD z2ui5_if_app~main. ). view->page( )->button( text = `call custom JS` - press = client->_event( |CUSTOM_JS| ) ). + press = client->_event( `CUSTOM_JS` ) ). client->view_display( view->stringify( ) ). ENDIF. - IF client->get( )-event = |CUSTOM_JS|. + IF client->get( )-event = `CUSTOM_JS`. client->follow_up_action( `myFunction()` ). ENDIF. diff --git a/docs/development/events.md b/docs/development/events.md index 33dc2c3..90a8d2a 100644 --- a/docs/development/events.md +++ b/docs/development/events.md @@ -16,12 +16,12 @@ METHOD z2ui5_if_app~main. client->view_display( z2ui5_cl_xml_view=>factory( )->button( - text = |post| - press = client->_event( |BUTTON_POST| ) + text = `post` + press = client->_event( `BUTTON_POST` ) )->stringify( ) ). CASE client->get( )-event. - WHEN |BUTTON_POST|. + WHEN `BUTTON_POST`. client->message_box_display( |Your name is { name }| ). ENDCASE. @@ -41,7 +41,7 @@ METHOD z2ui5_if_app~main. )->stringify( ) ). CASE client->get( )-event. - WHEN |BUTTON_POST|. + WHEN `BUTTON_POST`. client->message_box_display( |The button text is { client->get_event_arg( ) }| ). ENDCASE. @@ -60,7 +60,7 @@ METHOD z2ui5_if_app~main. )->stringify( ) ). CASE client->get( )-event. - WHEN |BUTTON_POST|. + WHEN `BUTTON_POST`. "mainView--button_id client->message_box_display( |The button id is { client->get_event_arg( ) }| ). ENDCASE. @@ -80,7 +80,7 @@ METHOD z2ui5_if_app~main. )->stringify( ) ). CASE client->get( )-event. - WHEN |BUTTON_POST|. + WHEN `BUTTON_POST`. "press client->message_box_display( |The evend id is { client->get_event_arg( ) }| ). ENDCASE. @@ -112,7 +112,7 @@ METHOD z2ui5_if_app~main. )->stringify( ) ). CASE client->get( )-event. - WHEN |BUTTON_POST|. + WHEN `BUTTON_POST`. client->message_box_display( |The name is { client->get_event_arg( ) }| ). ENDCASE. diff --git a/docs/development/general.md b/docs/development/general.md index b552130..0e0f9cf 100644 --- a/docs/development/general.md +++ b/docs/development/general.md @@ -31,10 +31,10 @@ CLASS z2ui5_cl_app IMPLEMENTATION. "handle events after frontend CASE client->get( )-event. - WHEN |OK|. + WHEN `OK`. DATA(lt_arg) = client->get_event_arg( ). "event handling - WHEN |CANCEL|. + WHEN `CANCEL`. "... ENDCASE. diff --git a/docs/development/messages.md b/docs/development/messages.md index ba7a207..6b9cba1 100644 --- a/docs/development/messages.md +++ b/docs/development/messages.md @@ -36,8 +36,8 @@ For error messages, simply change the type: METHOD z2ui5_if_app~main. client->message_box_display( - text = |This is an error message| - type = |error| ). + text = `This is an error message` + type = `error` ). ENDMETHOD. ``` @@ -89,8 +89,8 @@ The message box provides basic output. For a more detailed output, use the popup METHOD z2ui5_if_app~main. data(lt_msg) = value bapirettab( - ( type = |E| id = |MSG1| number = |001| message = |An empty Report field causes an empty XML Message to be sent| ) - ( type = |I| id = |MSG2| number = |002| message = |Product already in use| ) ). + ( type = `E` id = `MSG1` number = `001` message = `An empty Report field causes an empty XML Message to be sent` ) + ( type = `I` id = `MSG2` number = `002` message = `Product already in use` ) ). client->nav_app_call( z2ui5_cl_pop_messages=>factory( lt_msg ) ). diff --git a/docs/development/model/model.md b/docs/development/model/model.md index c3a1dee..a527717 100644 --- a/docs/development/model/model.md +++ b/docs/development/model/model.md @@ -21,7 +21,7 @@ CLASS z2ui5_cl_app_hello_world IMPLEMENTATION. METHOD z2ui5_if_app~main. client->view_display( z2ui5_cl_xml_view=>factory( - )->page( |abap2UI5 - Hello World| + )->page( `abap2UI5 - Hello World` )->text( `My Text` )->text( client->_bind( name ) )->stringify( ) ). @@ -47,14 +47,14 @@ CLASS z2ui5_cl_app_hello_world IMPLEMENTATION. METHOD z2ui5_if_app~main. client->view_display( z2ui5_cl_xml_view=>factory( - )->page( |abap2UI5 - Hello World| + )->page( `abap2UI5 - Hello World` )->text( `Enter your name` )->input( client->_bind_edit( name ) - )->button( text = |post| press = client->_event( |POST| ) + )->button( text = `post` press = client->_event( `POST` ) )->stringify( ) ). CASE client->get( )-event. - WHEN |POST|. + WHEN `POST`. client->message_box_display( |Your name is { name }.| ). RETURN. ENDCASE. diff --git a/docs/development/navigation/app_state.md b/docs/development/navigation/app_state.md index 514a74c..58f212c 100644 --- a/docs/development/navigation/app_state.md +++ b/docs/development/navigation/app_state.md @@ -26,8 +26,8 @@ CLASS z2ui5_cl_sample_app_state IMPLEMENTATION. view->label( 'quantity' )->input( client->_bind_edit( mv_quantity ) )->button( - text = |post with state| - press = client->_event( val = |BUTTON_POST| ) + text = `post with state` + press = client->_event( val = `BUTTON_POST` ) )->stringify( ) ). ENDIF. diff --git a/docs/development/navigation/share.md b/docs/development/navigation/share.md index af5de1d..7237d42 100644 --- a/docs/development/navigation/share.md +++ b/docs/development/navigation/share.md @@ -22,8 +22,8 @@ CLASS z2ui5_cl_sample_share IMPLEMENTATION. )->label( 'quantity' )->input( client->_bind_edit( mv_quantity ) )->button( - text = |share| - press = client->_event( val = |BUTTON_POST| ) + text = `share` + press = client->_event( val = `BUTTON_POST` ) )->stringify( ) ). ENDIF. diff --git a/docs/development/popups.md b/docs/development/popups.md index ea7a584..4339733 100644 --- a/docs/development/popups.md +++ b/docs/development/popups.md @@ -14,8 +14,8 @@ To display a popup, use the method `client->popup_display` instead of `client->v METHOD z2ui5_if_app~main. DATA(lo_popup) = z2ui5_cl_xml_view=>factory_popup( - )->dialog( |Popup - Info| - )->text( |this is an information shown in a popup| ). + )->dialog( `Popup - Info` + )->text( `this is an information shown in a popup` ). client->popup_display( lo_popup->stringify( ) ). ENDMETHOD. @@ -28,26 +28,26 @@ METHOD Z2UI5_if_app~main. IF client->check_on_init( ). DATA(lo_view) = z2ui5_cl_xml_view=>factory( - )->page( |abap2UI5 - Popups| + )->page( `abap2UI5 - Popups` )->button( - text = |popup rendering, no background rendering| - press = client->_event( |POPUP_OPEN| ) ). + text = `popup rendering, no background rendering` + press = client->_event( `POPUP_OPEN` ) ). client->view_display( lo_view->stringify( ) ). ENDIF. CASE client->get( )-event. - WHEN |POPUP_OPEN|. + WHEN `POPUP_OPEN`. DATA(lo_popup) = Z2UI5_cl_xml_view=>factory_popup( - )->dialog( |Popup| - )->text( |this is a text in a popup| + )->dialog( `Popup` + )->text( `this is a text in a popup` )->button( - text = |close| - press = client->_event( |POPUP_CLOSE| ) ). + text = `close` + press = client->_event( `POPUP_CLOSE` ) ). client->popup_display( lo_popup->stringify( ) ). - WHEN |POPUP_CLOSE|. + WHEN `POPUP_CLOSE`. client->popup_destroy( ). ENDCASE. @@ -86,20 +86,20 @@ METHOD Z2UI5_if_app~main. IF client->check_on_init( ). DATA(view) = z2ui5_cl_xml_view=>factory( )->shell( - )->page( |Popover Example| + )->page( `Popover Example` )->button( - text = |display popover| - press = client->_event( |POPOVER_OPEN| ) - id = |TEST| ). + text = `display popover` + press = client->_event( `POPOVER_OPEN` ) + id = `TEST` ). client->view_display( view->stringify( ) ). ENDIF. CASE client->get( )-event. - WHEN |POPOVER_OPEN|. + WHEN `POPOVER_OPEN`. DATA(popover) = Z2UI5_cl_xml_view=>factory_popup( - )->popover( placement = |Left| + )->popover( placement = `Left` )->text( `this is a popover` )->button( id = `my_id` @@ -109,7 +109,7 @@ METHOD Z2UI5_if_app~main. xml = view->stringify( ) by_id = `my_id` ). - WHEN |POPOVER_CLOSE|. + WHEN `POPOVER_CLOSE`. client->popover_destroy( ). ENDCASE. diff --git a/docs/development/specific/barcodes.md b/docs/development/specific/barcodes.md index 43bd3a6..5cf73ce 100644 --- a/docs/development/specific/barcodes.md +++ b/docs/development/specific/barcodes.md @@ -23,14 +23,14 @@ METHOD z2ui5_if_app~main. )->barcode_scanner_button( dialogtitle = `Barcode Scanner` scansuccess = client->_event( - val = |SCAN_SUCCESS| - t_arg = VALUE #( + val = `SCAN_SUCCESS` + t_arg = VALUE #( ( `${$parameters>/text}` ) ( `${$parameters>/format}` ) ) ) ). client->view_display( lo_view->stringify( ) ). - IF client->get( )-event = |SCAN_SUCCESS|. + IF client->get( )-event = `SCAN_SUCCESS`. DATA(lv_input) = client->get_event_arg( 1 ). DATA(lv_format) = client->get_event_arg( 2 ). @@ -88,10 +88,10 @@ CLASS z2ui5_cl_sample_focus IMPLEMENTATION. ENDIF. CASE client->get( )-event. - WHEN |one_enter|. + WHEN `one_enter`. focus_id = 'id2'. client->view_model_update( ). - WHEN |two_enter|. + WHEN `two_enter`. focus_id = 'id1'. client->view_model_update( ). ENDCASE. @@ -128,17 +128,17 @@ CLASS z2ui5_cl_sample_sound IMPLEMENTATION. value = client->_bind_edit( company_code ) type = `Number` placeholder = `Company Code` - submit = client->_event( |CUSTOM_JS_FROM_EB| ) ). + submit = client->_event( `CUSTOM_JS_FROM_EB` ) ). vbox->button( text = `call custom JS from EB` - press = client->_event( |CUSTOM_JS_FROM_EB| ) ). + press = client->_event( `CUSTOM_JS_FROM_EB` ) ). client->view_display( view->stringify( ) ). ENDIF. - IF client->get( )-event = |CUSTOM_JS_FROM_EB|. + IF client->get( )-event = `CUSTOM_JS_FROM_EB`. IF company_code IS INITIAL. client->follow_up_action( val = `playSound()` ). - client->message_box_display( type = |error| text = |Input is empty!| ). + client->message_box_display( type = `error` text = `Input is empty!` ). ELSE. CLEAR company_code. ENDIF. diff --git a/docs/development/specific/camera.md b/docs/development/specific/camera.md index cc208de..eba81c5 100644 --- a/docs/development/specific/camera.md +++ b/docs/development/specific/camera.md @@ -18,10 +18,10 @@ CLASS z2ui5_cl_demo_app_306 IMPLEMENTATION. METHOD z2ui5_if_app~main. IF client->check_on_init( ). - DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( )->page( |abap2UI5 - Device Camera Picture| + DATA(page) = z2ui5_cl_xml_view=>factory( )->shell( )->page( `abap2UI5 - Device Camera Picture` )->_z2ui5( )->camera_picture( value = client->_bind_edit( mv_picture_base ) - onphoto = client->_event( |CAPTURE| ) ). + onphoto = client->_event( `CAPTURE` ) ). client->view_display( page->stringify( ) ). ENDIF. diff --git a/docs/development/specific/files.md b/docs/development/specific/files.md index 6386585..11f30ae 100644 --- a/docs/development/specific/files.md +++ b/docs/development/specific/files.md @@ -25,12 +25,12 @@ CLASS z2ui5_cl_sample_upload IMPLEMENTATION. )->_z2ui5( )->file_uploader( value = client->_bind_edit( mv_value ) path = client->_bind_edit( mv_path ) - placeholder = |filepath here...| - upload = client->_event( |UPLOAD| ) + placeholder = `filepath here...` + upload = client->_event( `UPLOAD` ) )->stringify( ) ). CASE client->get( )-event. - WHEN |UPLOAD|. + WHEN `UPLOAD`. "process with mv_value and mv_path... client->message_box_display( `file uploaded` ). ENDCASE. @@ -47,12 +47,12 @@ METHOD z2ui5_if_app~main. client->view_display( z2ui5_cl_xml_view=>factory( )->page( )->button( - text = |Open Download Popup| - press = client->_event( |BUTTON_DOWNLOAD| ) + text = `Open Download Popup` + press = client->_event( `BUTTON_DOWNLOAD` ) )->stringify( ) ). CASE client->get( )-event. - WHEN |BUTTON_DOWNLOAD|. + WHEN `BUTTON_DOWNLOAD`. DATA(lv_name) = `Default_File_Name.jpg`. DATA(lv_content) = `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAApgAAA` && `KYB3X3/OAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAANCSURBVEiJtZZPbBtFFMZ/M7ubXdtdb1xSFyeilBapySVU8h8OoFaooFSqiihIVIp` && diff --git a/docs/development/specific/formatter.md b/docs/development/specific/formatter.md index c5b0146..8a44211 100644 --- a/docs/development/specific/formatter.md +++ b/docs/development/specific/formatter.md @@ -98,9 +98,9 @@ CLASS z2ui5_cl_demo_app_067 IMPLEMENTATION. path = abap_true ) }', '{ client->_bind_edit( val = currency path = abap_true ) }'], type: 'sap.ui.model.type.Currency' , formatOptions: \{ style : 'long' \} \}| - )->label( |event| - )->button( text = |send| - press = client->_event( |BUTTON| ) ). + )->label( `event` + )->button( text = `send` + press = client->_event( `BUTTON` ) ). page->simple_form( title = 'No Zeros' editable = abap_true diff --git a/docs/development/specific/geolocation.md b/docs/development/specific/geolocation.md index a1b4503..f73d31c 100644 --- a/docs/development/specific/geolocation.md +++ b/docs/development/specific/geolocation.md @@ -38,7 +38,7 @@ CLASS z2ui5_cl_sample_geolocation IMPLEMENTATION. )->stringify( ) ). CASE client->get( )-event. - WHEN |POST|. + WHEN `POST`. "processing... ENDCASE. diff --git a/docs/development/specific/xlsx.md b/docs/development/specific/xlsx.md index 5d08e3e..1d349c9 100644 --- a/docs/development/specific/xlsx.md +++ b/docs/development/specific/xlsx.md @@ -29,11 +29,11 @@ CLASS z2ui5_cl_sample_upload IMPLEMENTATION. )->_z2ui5( )->file_uploader( value = client->_bind_edit( mv_value ) path = client->_bind_edit( mv_path ) - placeholder = |filepath here...| - upload = client->_event( |UPLOAD| ) + placeholder = `filepath here...` + upload = client->_event( `UPLOAD` ) )->stringify( ) ). - IF client->get( )-event = |UPLOAD|. + IF client->get( )-event = `UPLOAD`. data(lr_itab) = lcl_help=>itab_get_by_xlsx( mv_value ). "further process with itab... @@ -92,8 +92,8 @@ Convert an internal table to an XLSX file and download it to the frontend: client->view_display( z2ui5_cl_xml_view=>factory( )->page( )->button( - text = |Open Download Popup| - press = client->_event( |DOWNLOAD| ) + text = `Open Download Popup` + press = client->_event( `DOWNLOAD` ) )->stringify( ) ). IF client->get( )-event = `DOWNLOAD`. @@ -107,9 +107,9 @@ Convert an internal table to an XLSX file and download it to the frontend: TYPES ty_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. DATA(lt_tab) = VALUE ty_tab( - ( count = |1| value = `red` descr = `this is a description` ) - ( count = |2| value = `red` descr = `this is a description` ) - ( count = |3| value = `red` descr = `this is a description` ) ). + ( count = `1` value = `red` descr = `this is a description` ) + ( count = `2` value = `red` descr = `this is a description` ) + ( count = `3` value = `red` descr = `this is a description` ) ). DATA(lv_file) = lcl_help=>xlsx_get_by_itab( lt_tab ). client->follow_up_action( val = client->_event_client( @@ -188,8 +188,8 @@ METHOD z2ui5_if_app~main. client->view_display( z2ui5_cl_xml_view=>factory( )->page( )->button( - text = |Open Download Popup| - press = client->_event( |DOWNLOAD| ) + text = `Open Download Popup` + press = client->_event( `DOWNLOAD` ) )->stringify( ) ). IF client->get( )-event = `DOWNLOAD`. @@ -203,9 +203,9 @@ METHOD z2ui5_if_app~main. TYPES ty_tab TYPE STANDARD TABLE OF ty_row WITH EMPTY KEY. DATA(lt_tab) = VALUE ty_tab( - ( count = |1| value = `red` descr = `this is a description` ) - ( count = |2| value = `red` descr = `this is a description` ) - ( count = |3| value = `red` descr = `this is a description` ) ). + ( count = `1` value = `red` descr = `this is a description` ) + ( count = `2` value = `red` descr = `this is a description` ) + ( count = `3` value = `red` descr = `this is a description` ) ). DATA(lv_file) = lcl_help=>get_xlsx_by_itab( lt_tab ). client->follow_up_action( val = client->_event_client( diff --git a/docs/get_started/hello_world.md b/docs/get_started/hello_world.md index 8785f78..24e23a3 100644 --- a/docs/get_started/hello_world.md +++ b/docs/get_started/hello_world.md @@ -59,13 +59,13 @@ CLASS z2ui5_cl_app_hello_world IMPLEMENTATION. METHOD z2ui5_if_app~main. client->view_display( z2ui5_cl_xml_view=>factory( - )->page( |abap2UI5 - Hello World| - )->text( |My Text| - )->button( text = |post| press = client->_event( |POST| ) ) ). + )->page( `abap2UI5 - Hello World` + )->text( `My Text` + )->button( text = `post` press = client->_event( `POST` ) ) ). CASE client->get( )-event. - WHEN |POST|. - client->message_box_display( |Hello World!| ). + WHEN `POST`. + client->message_box_display( `Hello World!` ). RETURN. ENDCASE. @@ -88,13 +88,13 @@ CLASS z2ui5_cl_app_hello_world IMPLEMENTATION. METHOD z2ui5_if_app~main. client->view_display( z2ui5_cl_xml_view=>factory( - )->page( |abap2UI5 - Hello World| - )->text( |My Text| - )->button( text = |post| press = client->_event( |POST| ) + )->page( `abap2UI5 - Hello World` + )->text( `My Text` + )->button( text = `post` press = client->_event( `POST` ) )->input( client->_bind_edit( name ) ) ). CASE client->get( )-event. - WHEN |POST|. + WHEN `POST`. client->message_box_display( |Your name is { name }.| ). RETURN. ENDCASE. diff --git a/docs/technical/dx.md b/docs/technical/dx.md index 36da7b3..65c9d01 100644 --- a/docs/technical/dx.md +++ b/docs/technical/dx.md @@ -71,7 +71,7 @@ CLASS zcl_app_input IMPLEMENTATION. client->view_display( z2ui5_cl_xml_view=>factory( )->input( client->_bind_edit( pa_arbgb ) - )->button( text = |post| press = client->_event( |POST| ) ) ). + )->button( text = `post` press = client->_event( `POST` ) ) ). RETURN. ENDIF.