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
8 changes: 4 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -774,10 +774,10 @@ follow these so new/edited samples stay consistent:
- `(C)` — uses an abap2UI5 **custom control** (`view->_z2ui5( )->…`, or the
`z2ui5` cc namespace: `_generic( … ns = `z2ui5` … )`, `z2ui5.cc`, `xmlns:z2ui5`).
- `(A)` — performs a **frontend action**: `client->_event_client( )`,
`client->follow_up_action( )`, `control_call`/`control_call_by_id`,
`binding_call`/`binding_call_by_id`, or a client-side interaction like
drag-and-drop. The ubiquitous back-button `client->_event_nav_app_leave( )`
does **not** count.
`client->follow_up_action( )` (including the `cs_event-control_by_id` /
`cs_event-control_global` / `cs_event-binding_call` events), or a
client-side interaction like drag-and-drop. The ubiquitous back-button
`client->_event_nav_app_leave( )` does **not** count.
- `(A,C)` — both. Regenerate the overviews after changing any DESCRIPT (§4).

- **A read-only info form disables its inputs** (`enabled = abap_false`) — do not
Expand Down
58 changes: 0 additions & 58 deletions src/01/01/z2ui5_cl_demo_app_001.clas.abap

This file was deleted.

16 changes: 0 additions & 16 deletions src/01/01/z2ui5_cl_demo_app_001.clas.xml

This file was deleted.

3 changes: 0 additions & 3 deletions src/01/01/z2ui5_cl_demo_app_025.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ CLASS z2ui5_cl_demo_app_025 IMPLEMENTATION.
WHEN `BUTTON_RESTART`.
client->nav_app_call( NEW z2ui5_cl_demo_app_025( ) ).

WHEN `BUTTON_CHANGE_APP`.
client->nav_app_call( NEW z2ui5_cl_demo_app_001( ) ).

WHEN `BUTTON_READ_PREVIOUS`.
DATA(app_024) = CAST z2ui5_cl_demo_app_024( client->get_app( client->get( )-s_draft-id_prev_app ) ).
input_previous = app_024->input2.
Expand Down
36 changes: 20 additions & 16 deletions src/01/01/z2ui5_cl_demo_app_446.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,28 @@
CASE client->get( )-event.

WHEN `TOAST`.
client->control_call( object = `MESSAGE_TOAST`
method = `show`
params = VALUE #( ( `Hello from control_call!` ) ) ).
client->follow_up_action( val = z2ui5_if_client=>cs_event-control_global

Check failure on line 35 in src/01/01/z2ui5_cl_demo_app_446.clas.abap

View check run for this annotation

abaplint / abaplint

Component "control_global" not found in structure

https://rules.abaplint.org/check_syntax
t_arg = VALUE #( ( `MESSAGE_TOAST` )
( `show` )
( `Hello from CONTROL_GLOBAL!` ) ) ).

WHEN `MSGBOX`.
client->control_call( object = `MESSAGE_BOX`
method = `show`
params = VALUE #( ( `A message box, opened via control_call.` ) ) ).
client->follow_up_action( val = z2ui5_if_client=>cs_event-control_global

Check failure on line 41 in src/01/01/z2ui5_cl_demo_app_446.clas.abap

View check run for this annotation

abaplint / abaplint

Component "control_global" not found in structure

https://rules.abaplint.org/check_syntax
t_arg = VALUE #( ( `MESSAGE_BOX` )
( `show` )
( `A message box, opened via CONTROL_GLOBAL.` ) ) ).

WHEN `THEME_DARK`.
client->control_call( object = `THEMING`
method = `setTheme`
params = VALUE #( ( `sap_horizon_dark` ) ) ).
client->follow_up_action( val = z2ui5_if_client=>cs_event-control_global

Check failure on line 47 in src/01/01/z2ui5_cl_demo_app_446.clas.abap

View check run for this annotation

abaplint / abaplint

Component "control_global" not found in structure

https://rules.abaplint.org/check_syntax
t_arg = VALUE #( ( `THEMING` )
( `setTheme` )
( `sap_horizon_dark` ) ) ).

WHEN `THEME_LIGHT`.
client->control_call( object = `THEMING`
method = `setTheme`
params = VALUE #( ( `sap_horizon` ) ) ).
client->follow_up_action( val = z2ui5_if_client=>cs_event-control_global

Check failure on line 53 in src/01/01/z2ui5_cl_demo_app_446.clas.abap

View check run for this annotation

abaplint / abaplint

Component "control_global" not found in structure

https://rules.abaplint.org/check_syntax
t_arg = VALUE #( ( `THEMING` )
( `setTheme` )
( `sap_horizon` ) ) ).

ENDCASE.

Expand All @@ -64,14 +68,14 @@

DATA(page) = view->shell(
)->page(
title = `abap2UI5 - Action - control_call`
title = `abap2UI5 - Action - CONTROL_GLOBAL`
navbuttonpress = client->_event_nav_app_leave( )
shownavbutton = client->check_app_prev_stack( ) ).

page->message_strip(
text = `Each button lets the backend call a method on a global frontend object ` &&
`(MessageToast, MessageBox, Theming) - client-side, after the response renders, ` &&
`without wiring a control event.`
text = `Each button lets the backend call a whitelisted method on a global frontend object ` &&
`(MessageToast, MessageBox, Theming) via follow_up_action( cs_event-control_global ) - ` &&
`client-side, after the response renders, without wiring a control event.`
type = `Information`
showicon = abap_true
class = `sapUiSmallMargin` ).
Expand Down
22 changes: 14 additions & 8 deletions src/01/01/z2ui5_cl_demo_app_447.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,19 @@

CASE client->get( )-event.

" t_arg is positional: id, view (`` = global lookup), method, params
WHEN `FOCUS`.
client->control_call_by_id( id = `nameInput`
method = `focus` ).
client->follow_up_action( val = z2ui5_if_client=>cs_event-control_by_id

Check failure on line 51 in src/01/01/z2ui5_cl_demo_app_447.clas.abap

View check run for this annotation

abaplint / abaplint

Component "control_by_id" not found in structure

https://rules.abaplint.org/check_syntax
t_arg = VALUE #( ( `nameInput` )
( `` )
( `focus` ) ) ).

WHEN `SCROLL`.
client->control_call_by_id( id = `bigTable`
method = `scrollToIndex`
params = VALUE #( ( `25` ) ) ).
client->follow_up_action( val = z2ui5_if_client=>cs_event-control_by_id

Check failure on line 57 in src/01/01/z2ui5_cl_demo_app_447.clas.abap

View check run for this annotation

abaplint / abaplint

Component "control_by_id" not found in structure

https://rules.abaplint.org/check_syntax
t_arg = VALUE #( ( `bigTable` )
( `` )
( `scrollToIndex` )
( `25` ) ) ).

ENDCASE.

Expand All @@ -68,13 +73,14 @@

DATA(page) = view->shell(
)->page(
title = `abap2UI5 - Action - control_call_by_id`
title = `abap2UI5 - Action - CONTROL_BY_ID`
navbuttonpress = client->_event_nav_app_leave( )
shownavbutton = client->check_app_prev_stack( ) ).

page->message_strip(
text = `The backend calls a whitelisted method on a control resolved by id, after the ` &&
`response renders: focus() on the input, scrollToIndex() on the table.`
text = `The backend calls a whitelisted method on a control resolved by id via ` &&
`follow_up_action( cs_event-control_by_id ), after the response renders: ` &&
`focus() on the input, scrollToIndex() on the table.`
type = `Information`
showicon = abap_true
class = `sapUiSmallMargin` ).
Expand Down
5 changes: 3 additions & 2 deletions src/01/02/z2ui5_cl_demo_app_088.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@

page->message_strip(
text = `Selecting a tab in the IconTabHeader switches the NavContainer page on the client via the ` &&
`nav_container_to front-end action, without a backend roundtrip.`
`generic CONTROL_BY_ID front-end action (whitelisted method 'to'), without a backend roundtrip.`
type = `Information`
showicon = abap_true
class = `sapUiSmallMargin` ).

page->icon_tab_header( selectedkey = client->_bind_edit( mv_selected_key )
select = client->_event_client( val = client->cs_event-nav_container_to t_arg = VALUE #( ( `NavCon` ) ( `${$parameters>/selectedKey}` ) ) )
select = client->_event_client( val = client->cs_event-control_by_id

Check failure on line 66 in src/01/02/z2ui5_cl_demo_app_088.clas.abap

View check run for this annotation

abaplint / abaplint

Component "control_by_id" not found in structure

https://rules.abaplint.org/check_syntax
t_arg = VALUE #( ( `NavCon` ) ( `MAIN` ) ( `to` ) ( `${$parameters>/selectedKey}` ) ) )
mode = `Inline`
)->items(
)->icon_tab_filter( key = `page1`
Expand Down
3 changes: 2 additions & 1 deletion src/01/02/z2ui5_cl_demo_app_170.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
)->content( ).

DATA(content) = dialog->icon_tab_bar( selectedkey = client->_bind_edit( mv_selected_key )
select = client->_event_client( val = `POPUP_NAV_CONTAINER_TO` t_arg = VALUE #( ( `NavCon` ) ( `${$parameters>/selectedKey}` ) ) )
select = client->_event_client( val = client->cs_event-control_by_id

Check failure on line 31 in src/01/02/z2ui5_cl_demo_app_170.clas.abap

View check run for this annotation

abaplint / abaplint

Component "control_by_id" not found in structure

https://rules.abaplint.org/check_syntax
t_arg = VALUE #( ( `NavCon` ) ( `POPUP` ) ( `to` ) ( `${$parameters>/selectedKey}` ) ) )
headermode = `Inline`
expanded = abap_true
expandable = abap_false
Expand Down
15 changes: 8 additions & 7 deletions src/01/02/z2ui5_cl_demo_app_202.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,16 @@
ENDIF.

CASE client->get( )-event.
WHEN `STEP22`.
WHEN `STEP22` OR `STEP23`.
" the original wizard flow (discardProgress + setNextStep) as two
" generic whitelisted control calls - t_arg is positional:
" id, view, method, params (the step params are control ids)
client->follow_up_action(
val = z2ui5_if_client=>cs_event-wizard_set_next_step
t_arg = VALUE #( ( `wiz` ) ( `STEP2` ) ( `STEP22` ) ) ).

WHEN `STEP23`.
val = z2ui5_if_client=>cs_event-control_by_id

Check failure on line 89 in src/01/02/z2ui5_cl_demo_app_202.clas.abap

View check run for this annotation

abaplint / abaplint

Component "control_by_id" not found in structure

https://rules.abaplint.org/check_syntax
t_arg = VALUE #( ( `wiz` ) ( `MAIN` ) ( `discardProgress` ) ( `STEP2` ) ) ).
client->follow_up_action(
val = z2ui5_if_client=>cs_event-wizard_set_next_step
t_arg = VALUE #( ( `wiz` ) ( `STEP2` ) ( `STEP23` ) ) ).
val = z2ui5_if_client=>cs_event-control_by_id

Check failure on line 92 in src/01/02/z2ui5_cl_demo_app_202.clas.abap

View check run for this annotation

abaplint / abaplint

Component "control_by_id" not found in structure

https://rules.abaplint.org/check_syntax
t_arg = VALUE #( ( `STEP2` ) ( `MAIN` ) ( `setNextStep` ) ( client->get( )-event ) ) ).

ENDCASE.
client->view_model_update( ).
Expand Down
15 changes: 9 additions & 6 deletions src/01/02/z2ui5_cl_demo_app_448.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,14 @@

WHEN `TOGGLE`.
" invert the mirrored state and call the whitelisted setExpanded on
" the panel - client-side, after the response renders, no rebuild
" the panel - client-side, after the response renders, no rebuild.
" t_arg is positional: id, view (`` = global lookup), method, params
expanded = xsdbool( expanded = abap_false ).
client->control_call_by_id( id = `demoPanel`
method = `setExpanded`
params = VALUE #( ( CONV string( expanded ) ) ) ).
client->follow_up_action( val = z2ui5_if_client=>cs_event-control_by_id

Check failure on line 41 in src/01/02/z2ui5_cl_demo_app_448.clas.abap

View check run for this annotation

abaplint / abaplint

Component "control_by_id" not found in structure

https://rules.abaplint.org/check_syntax
t_arg = VALUE #( ( `demoPanel` )
( `` )
( `setExpanded` )
( CONV string( expanded ) ) ) ).

ENDCASE.

Expand All @@ -52,13 +55,13 @@

DATA(page) = view->shell(
)->page(
title = `abap2UI5 - Panel - setExpanded via control_call_by_id`
title = `abap2UI5 - Panel - setExpanded via CONTROL_BY_ID`
navbuttonpress = client->_event_nav_app_leave( )
shownavbutton = client->check_app_prev_stack( ) ).

page->message_strip(
text = `The button toggles the panel via the whitelisted setExpanded method ` &&
`(control_call_by_id), client-side after render - no view rebuild.`
`(follow_up_action with cs_event-control_by_id), client-side after render - no view rebuild.`
type = `Information`
showicon = abap_true
class = `sapUiSmallMargin` ).
Expand Down
13 changes: 8 additions & 5 deletions src/01/02/z2ui5_cl_demo_app_449.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@

WHEN `OPEN`.
" open the popup-mode PDFViewer via the whitelisted open method -
" the viewer brings its own dialog and close button
client->control_call_by_id( id = `demoPdf`
method = `open` ).
" the viewer brings its own dialog and close button.
" t_arg is positional: id, view (`` = global lookup), method
client->follow_up_action( val = z2ui5_if_client=>cs_event-control_by_id

Check failure on line 38 in src/01/02/z2ui5_cl_demo_app_449.clas.abap

View check run for this annotation

abaplint / abaplint

Component "control_by_id" not found in structure

https://rules.abaplint.org/check_syntax
t_arg = VALUE #( ( `demoPdf` )
( `` )
( `open` ) ) ).

ENDCASE.

Expand All @@ -48,7 +51,7 @@

DATA(page) = view->shell(
)->page(
title = `abap2UI5 - PDF Viewer - Display via control_call_by_id`
title = `abap2UI5 - PDF Viewer - Display via CONTROL_BY_ID`
navbuttonpress = client->_event_nav_app_leave( )
shownavbutton = client->check_app_prev_stack( ) ).

Expand All @@ -63,7 +66,7 @@

page->message_strip(
text = `The button opens the popup-mode PDFViewer via the whitelisted open method ` &&
`(control_call_by_id), client-side after render.`
`(follow_up_action with cs_event-control_by_id), client-side after render.`
type = `Information`
showicon = abap_true
class = `sapUiSmallMargin` ).
Expand Down
31 changes: 19 additions & 12 deletions src/01/02/z2ui5_cl_demo_app_454.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,24 @@ CLASS Z2UI5_CL_DEMO_APP_454 IMPLEMENTATION.
" client-side after the response renders. The model data stays
" untouched (no table copy, no view_model_update); an empty query
" clears the filter again.
client->binding_call_by_id( id = `productList`
params = VALUE #( ( `NAME` )
( `Contains` )
( client->get_event_arg( ) ) ) ).
" t_arg is positional: id, aggregation, method, params
client->follow_up_action( val = z2ui5_if_client=>cs_event-binding_call
t_arg = VALUE #( ( `productList` )
( `items` )
( `filter` )
( `NAME` )
( `Contains` )
( client->get_event_arg( ) ) ) ).

WHEN `SORT_ASC` OR `SORT_DESC`.
client->binding_call_by_id( id = `productList`
method = `sort`
params = VALUE #( ( `NAME` )
( COND #( WHEN client->get( )-event = `SORT_DESC`
THEN `true`
ELSE `false` ) ) ) ).
client->follow_up_action( val = z2ui5_if_client=>cs_event-binding_call
t_arg = VALUE #( ( `productList` )
( `items` )
( `sort` )
( `NAME` )
( COND #( WHEN client->get( )-event = `SORT_DESC`
THEN `true`
ELSE `false` ) ) ) ).

ENDCASE.

Expand All @@ -81,8 +87,9 @@ CLASS Z2UI5_CL_DEMO_APP_454 IMPLEMENTATION.
shownavbutton = client->check_app_prev_stack( ) ).

page->message_strip(
text = `Search and sort are applied to the list's items BINDING via binding_call_by_id ` &&
`- the UI5 controller pattern getBinding('items').filter(...). The model stays untouched.`
text = `Search and sort are applied to the list's items BINDING via follow_up_action ` &&
`with cs_event-binding_call - the UI5 controller pattern getBinding('items').filter(...). ` &&
`The model stays untouched.`
type = `Information`
showicon = abap_true
class = `sapUiSmallMargin` ).
Expand Down
1 change: 0 additions & 1 deletion src/01/z2ui5_cl_demo_app_g00.clas.abap
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ CLASS z2ui5_cl_demo_app_g00 IMPLEMENTATION.
( group = `Basic I` header = `Binding` sub = `Expression Binding` app = `z2ui5_cl_demo_app_027` )
( group = `Basic I` header = `Binding` sub = `Formatting Currencies` app = `z2ui5_cl_demo_app_067` )
( group = `Basic I` header = `Binding` sub = `Formatting Integers, Decimals, Dates & Time` app = `z2ui5_cl_demo_app_047` )
( group = `Basic I` header = `Binding` sub = `Level Simple` app = `z2ui5_cl_demo_app_001` )
( group = `Basic I` header = `Binding` sub = `Level Structure/Component` app = `z2ui5_cl_demo_app_166` )
( group = `Basic I` header = `Binding` sub = `Level Table/Cell` app = `z2ui5_cl_demo_app_144` )
( group = `Basic I` header = `Event` sub = `Additional Infos with t_args` app = `z2ui5_cl_demo_app_167` )
Expand Down
Loading