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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/advanced/extensibility/custom_js.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
14 changes: 7 additions & 7 deletions docs/development/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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.

Expand All @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions docs/development/general.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
10 changes: 5 additions & 5 deletions docs/development/messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
```
Expand Down Expand Up @@ -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 ) ).

Expand Down
8 changes: 4 additions & 4 deletions docs/development/model/model.md
Original file line number Diff line number Diff line change
Expand Up @@ -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( ) ).
Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions docs/development/navigation/app_state.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions docs/development/navigation/share.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
40 changes: 20 additions & 20 deletions docs/development/popups.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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`
Expand All @@ -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.

Expand Down
24 changes: 12 additions & 12 deletions docs/development/specific/barcodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ METHOD z2ui5_if_app~main.
)->page(
)->barcode_scanner_button(
dialogtitle = `Barcode Scanner`
scansuccess = client->_event(
val = 'SCAN_SUCCESS'
t_arg = VALUE #(
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 ).
Expand Down Expand Up @@ -75,23 +75,23 @@ 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( ) ).

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.
Expand Down Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions docs/development/specific/camera.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
12 changes: 6 additions & 6 deletions docs/development/specific/files.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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` &&
Expand Down
10 changes: 5 additions & 5 deletions docs/development/specific/formatter.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/development/specific/geolocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ CLASS z2ui5_cl_sample_geolocation IMPLEMENTATION.
)->stringify( ) ).

CASE client->get( )-event.
WHEN 'POST'.
WHEN `POST`.
"processing...
ENDCASE.

Expand Down
Loading