From 795f390cc6b2d978b7f1bdcb0eba50beacf6bffe Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 21 Jul 2026 18:49:20 +0000 Subject: [PATCH] Migrate control_by_id calls to the view parameter Drop the positional view slot from control_by_id t_arg in follow_up_action and _event_client calls; pass the view via the new view parameter where it is not the main view (app 170: cs_view-popup). Main-view calls simply omit the slot. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01Ar8FTqFRTaZ9r5jcje9J9n --- src/01/01/z2ui5_cl_demo_app_447.clas.abap | 5 ++--- src/01/02/z2ui5_cl_demo_app_088.clas.abap | 2 +- src/01/02/z2ui5_cl_demo_app_170.clas.abap | 3 ++- src/01/02/z2ui5_cl_demo_app_202.clas.abap | 7 ++++--- src/01/02/z2ui5_cl_demo_app_448.clas.abap | 4 ++-- src/01/02/z2ui5_cl_demo_app_449.clas.abap | 4 ++-- src/01/02/z2ui5_cl_demo_app_465.clas.abap | 4 ++-- 7 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/01/01/z2ui5_cl_demo_app_447.clas.abap b/src/01/01/z2ui5_cl_demo_app_447.clas.abap index f3d85f14..fe1bc2fd 100644 --- a/src/01/01/z2ui5_cl_demo_app_447.clas.abap +++ b/src/01/01/z2ui5_cl_demo_app_447.clas.abap @@ -46,17 +46,16 @@ CLASS z2ui5_cl_demo_app_447 IMPLEMENTATION. CASE client->get( )-event. - " t_arg is positional: id, view (`` = global lookup), method, params + " t_arg is positional: id, method, params (the view defaults to + " cs_view-main and can be omitted for a main-view control) WHEN `FOCUS`. client->follow_up_action( val = z2ui5_if_client=>cs_event-control_by_id t_arg = VALUE #( ( `nameInput` ) - ( `` ) ( `focus` ) ) ). WHEN `SCROLL`. client->follow_up_action( val = z2ui5_if_client=>cs_event-control_by_id t_arg = VALUE #( ( `bigTable` ) - ( `` ) ( `scrollToIndex` ) ( `25` ) ) ). diff --git a/src/01/02/z2ui5_cl_demo_app_088.clas.abap b/src/01/02/z2ui5_cl_demo_app_088.clas.abap index 7bde211f..5fc8b17c 100644 --- a/src/01/02/z2ui5_cl_demo_app_088.clas.abap +++ b/src/01/02/z2ui5_cl_demo_app_088.clas.abap @@ -64,7 +64,7 @@ CLASS z2ui5_cl_demo_app_088 IMPLEMENTATION. page->icon_tab_header( selectedkey = client->_bind( mv_selected_key ) select = client->_event_client( val = client->cs_event-control_by_id - t_arg = VALUE #( ( `NavCon` ) ( `MAIN` ) ( `to` ) ( `${$parameters>/selectedKey}` ) ) ) + t_arg = VALUE #( ( `NavCon` ) ( `to` ) ( `${$parameters>/selectedKey}` ) ) ) mode = `Inline` )->items( )->icon_tab_filter( key = `page1` diff --git a/src/01/02/z2ui5_cl_demo_app_170.clas.abap b/src/01/02/z2ui5_cl_demo_app_170.clas.abap index 6534fd7f..2653be72 100644 --- a/src/01/02/z2ui5_cl_demo_app_170.clas.abap +++ b/src/01/02/z2ui5_cl_demo_app_170.clas.abap @@ -29,7 +29,8 @@ CLASS z2ui5_cl_demo_app_170 IMPLEMENTATION. DATA(content) = dialog->icon_tab_bar( selectedkey = client->_bind( mv_selected_key ) select = client->_event_client( val = client->cs_event-control_by_id - t_arg = VALUE #( ( `NavCon` ) ( `POPUP` ) ( `to` ) ( `${$parameters>/selectedKey}` ) ) ) + view = client->cs_view-popup + t_arg = VALUE #( ( `NavCon` ) ( `to` ) ( `${$parameters>/selectedKey}` ) ) ) headermode = `Inline` expanded = abap_true expandable = abap_false diff --git a/src/01/02/z2ui5_cl_demo_app_202.clas.abap b/src/01/02/z2ui5_cl_demo_app_202.clas.abap index 946819d1..7694b88b 100644 --- a/src/01/02/z2ui5_cl_demo_app_202.clas.abap +++ b/src/01/02/z2ui5_cl_demo_app_202.clas.abap @@ -84,13 +84,14 @@ CLASS Z2UI5_CL_DEMO_APP_202 IMPLEMENTATION. 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) + " id, method, params (the step params are control ids; the view + " defaults to cs_view-main) client->follow_up_action( val = z2ui5_if_client=>cs_event-control_by_id - t_arg = VALUE #( ( `wiz` ) ( `MAIN` ) ( `discardProgress` ) ( `STEP2` ) ) ). + t_arg = VALUE #( ( `wiz` ) ( `discardProgress` ) ( `STEP2` ) ) ). client->follow_up_action( val = z2ui5_if_client=>cs_event-control_by_id - t_arg = VALUE #( ( `STEP2` ) ( `MAIN` ) ( `setNextStep` ) ( client->get( )-event ) ) ). + t_arg = VALUE #( ( `STEP2` ) ( `setNextStep` ) ( client->get( )-event ) ) ). ENDCASE. client->view_model_update( ). diff --git a/src/01/02/z2ui5_cl_demo_app_448.clas.abap b/src/01/02/z2ui5_cl_demo_app_448.clas.abap index a694de02..b57e195e 100644 --- a/src/01/02/z2ui5_cl_demo_app_448.clas.abap +++ b/src/01/02/z2ui5_cl_demo_app_448.clas.abap @@ -36,11 +36,11 @@ CLASS z2ui5_cl_demo_app_448 IMPLEMENTATION. WHEN `TOGGLE`. " invert the mirrored state and call the whitelisted setExpanded on " the panel - client-side, after the response renders, no rebuild. - " t_arg is positional: id, view (`` = global lookup), method, params + " t_arg is positional: id, method, params (the view defaults to + " cs_view-main and can be omitted for a main-view control) expanded = xsdbool( expanded = abap_false ). client->follow_up_action( val = z2ui5_if_client=>cs_event-control_by_id t_arg = VALUE #( ( `demoPanel` ) - ( `` ) ( `setExpanded` ) ( CONV string( expanded ) ) ) ). diff --git a/src/01/02/z2ui5_cl_demo_app_449.clas.abap b/src/01/02/z2ui5_cl_demo_app_449.clas.abap index eec825a2..2ff6a88f 100644 --- a/src/01/02/z2ui5_cl_demo_app_449.clas.abap +++ b/src/01/02/z2ui5_cl_demo_app_449.clas.abap @@ -34,10 +34,10 @@ CLASS z2ui5_cl_demo_app_449 IMPLEMENTATION. WHEN `OPEN`. " open the popup-mode PDFViewer via the whitelisted open method - " the viewer brings its own dialog and close button. - " t_arg is positional: id, view (`` = global lookup), method + " t_arg is positional: id, method (the view defaults to cs_view-main + " and can be omitted for a main-view control) client->follow_up_action( val = z2ui5_if_client=>cs_event-control_by_id t_arg = VALUE #( ( `demoPdf` ) - ( `` ) ( `open` ) ) ). ENDCASE. diff --git a/src/01/02/z2ui5_cl_demo_app_465.clas.abap b/src/01/02/z2ui5_cl_demo_app_465.clas.abap index 9f904d00..aa01a07a 100644 --- a/src/01/02/z2ui5_cl_demo_app_465.clas.abap +++ b/src/01/02/z2ui5_cl_demo_app_465.clas.abap @@ -35,10 +35,10 @@ CLASS z2ui5_cl_demo_app_465 IMPLEMENTATION. " toggle the popover open/closed, anchored to the pressed button's DOM " ref - the whitelisted toggleBy opens it if closed, closes it if open " (the controller pattern oPopover.openBy(oButton) / oPopover.close()). - " t_arg is positional: id, view (`` = global lookup), method, anchor id + " t_arg is positional: id, method, anchor id (the view defaults to + " cs_view-main and can be omitted for a main-view control) client->follow_up_action( val = z2ui5_if_client=>cs_event-control_by_id t_arg = VALUE #( ( `demoPopover` ) - ( `` ) ( `toggleBy` ) ( client->get_event_arg( ) ) ) ).