Skip to content

Commit 679c515

Browse files
oblomov-devclaude
andauthored
Drop /XX/ view-model prefix from samples (#690)
The framework no longer routes two-way data through a dedicated XX/ view- model node - every binding now lives on the root model. Update the samples that referenced the /XX/ model path directly: - app_173 / app_176: template model paths {template>/XX/...} -> {template>/...} - app_346: custom JS model.setProperty("/XX/FOCUSCOLUMN"/"/XX/FOCUSROW") -> root paths - app_461: comment describing the resolved binding-context paths (the end-anchored parser already handles the shorter path unchanged) Claude-Session: https://claude.ai/code/session_01BRbBrfS2hPi9EFQqjjgfHX Co-authored-by: Claude <noreply@anthropic.com>
1 parent 60aacd8 commit 679c515

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

src/00/05/z2ui5_cl_demo_app_346.clas.abap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ CLASS z2ui5_cl_demo_app_346 IMPLEMENTATION.
6666
&& ` const m = focusCtrlId.match(/(\d+$)/);`
6767
&& ` const model = z2ui5.oView.getModel() ;`
6868
&& ` model.setProperty("/FOCUSID",focusCtrlId);`
69-
&& ` model.setProperty("/XX/FOCUSCOLUMN",column);`
70-
&& ` model.setProperty("/XX/FOCUSROW",m[1]);`
69+
&& ` model.setProperty("/FOCUSCOLUMN",column);`
70+
&& ` model.setProperty("/FOCUSROW",m[1]);`
7171
&& ` } catch(e){}`
7272
&& `}, true);`
7373
&& ``

src/01/01/z2ui5_cl_demo_app_173.clas.abap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ CLASS Z2UI5_CL_DEMO_APP_173 IMPLEMENTATION.
5555

5656
view->table( client->_bind( mt_data )
5757
)->columns(
58-
)->template_repeat( list = `{template>/XX/MT_LAYOUT}`
58+
)->template_repeat( list = `{template>/MT_LAYOUT}`
5959
var = `L0`
6060
)->column( mergeduplicates = `{L0>MERGE}`
6161
visible = `{L0>VISIBLE}` )->text( `{L0>FNAME}` )->get_parent(
6262
)->get_parent( )->get_parent(
6363
)->items(
6464
)->column_list_item(
6565
)->cells(
66-
)->template_repeat( list = `{template>/XX/MT_LAYOUT}`
66+
)->template_repeat( list = `{template>/MT_LAYOUT}`
6767
var = `L1`
6868
)->object_identifier( text = `{= '{' + ${L1>FNAME} + '}' }` ).
6969

@@ -72,7 +72,7 @@ CLASS Z2UI5_CL_DEMO_APP_173 IMPLEMENTATION.
7272
change = client->_event( `CHANGE_FLAG` ) ).
7373
view = view->vbox( ).
7474

75-
view->template_if( `{template>/XX/MV_FLAG}`
75+
view->template_if( `{template>/MV_FLAG}`
7676
)->template_then(
7777
)->icon( src = `sap-icon://accept`
7878
color = `green` )->get_parent(

src/01/01/z2ui5_cl_demo_app_176.clas.abap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ CLASS z2ui5_cl_demo_app_176 IMPLEMENTATION.
7676
lo_view_nested->shell( )->page( `Nested View`
7777
)->table( i_client->_bind( mt_data )
7878
)->columns(
79-
)->template_repeat( list = `{template>/XX/MT_LAYOUT}`
79+
)->template_repeat( list = `{template>/MT_LAYOUT}`
8080
var = `LO`
8181
)->column( mergeduplicates = `{LO>MERGE}`
8282
visible = `{LO>VISIBLE}` )->get_parent(
8383
)->get_parent( )->get_parent(
8484
)->items(
8585
)->column_list_item(
8686
)->cells(
87-
)->template_repeat( list = `{template>/XX/MT_LAYOUT}`
87+
)->template_repeat( list = `{template>/MT_LAYOUT}`
8888
var = `LO2`
8989
)->object_identifier( text = `{= '{' + ${LO2>FNAME} + '}' }` ).
9090

src/01/02/z2ui5_cl_demo_app_461.clas.abap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ CLASS Z2UI5_CL_DEMO_APP_461 IMPLEMENTATION.
5353

5454
WHEN `MOVE_NODE`.
5555
" both event args arrive resolved client-side: the binding context
56-
" paths of the dragged and the drop target item. The two-way model
57-
" prefixes them with /XX/, e.g. /XX/T_NODES/0/NODES/1 (a file) and
58-
" /XX/T_NODES/2 (a folder) - so parse from the END of the path
56+
" paths of the dragged and the drop target item, e.g.
57+
" /T_NODES/0/NODES/1 (a file) and /T_NODES/2 (a folder) - so parse
58+
" from the END of the path
5959
SPLIT client->get_event_arg( ) AT `/` INTO TABLE DATA(lt_drag).
6060
SPLIT client->get_event_arg( 2 ) AT `/` INTO TABLE DATA(lt_drop).
6161
DATA(lv_drag_lines) = lines( lt_drag ).

0 commit comments

Comments
 (0)