Skip to content

Commit b3ba885

Browse files
oblomov-devclaude
andauthored
Replace _bind_edit with _bind for read-only bindings (#687)
* Remove inactive view parameter from _bind_edit calls (package 01) The view parameter of _bind/_bind_edit is inactive: it is never forwarded to the binding service internally. Remove the explicit view = ... arguments from the package 01 sample calls. * Replace obsolete _bind_edit calls with _bind in package 01 _bind_edit is functionally identical to _bind (both two-way binding) and marked obsolete. Migrate all 228 _bind_edit calls across package 01 to _bind. Explanatory comments referencing _bind_edit are left as-is. --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent a94f536 commit b3ba885

75 files changed

Lines changed: 228 additions & 228 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/01/01/z2ui5_cl_demo_app_009.clas.abap

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ CLASS z2ui5_cl_demo_app_009 IMPLEMENTATION.
182182

183183
form->label( `Input with suggestion items`
184184
)->input(
185-
value = client->_bind_edit( s_screen-color_01 )
185+
value = client->_bind( s_screen-color_01 )
186186
placeholder = `fill in your favorite colour`
187187
suggestionitems = client->_bind( t_suggestion )
188188
showsuggestion = abap_true
@@ -194,25 +194,25 @@ CLASS z2ui5_cl_demo_app_009 IMPLEMENTATION.
194194

195195
form->label( `Input only numbers allowed`
196196
)->input(
197-
value = client->_bind_edit( s_screen-quantity )
197+
value = client->_bind( s_screen-quantity )
198198
type = `Number`
199199
placeholder = `quantity` ).
200200

201201
form->label( `Input with value`
202202
)->input(
203-
value = client->_bind_edit( s_screen-color_02 )
203+
value = client->_bind( s_screen-color_02 )
204204
placeholder = `fill in your favorite colour`
205205
showvaluehelp = abap_true
206206
valuehelprequest = client->_event( `POPUP_TABLE_VALUE` ) ).
207207

208208
form->label( `Custom value Popup`
209209
)->input(
210-
value = client->_bind_edit( s_screen-name )
210+
value = client->_bind( s_screen-name )
211211
placeholder = `name`
212212
showvaluehelp = abap_true
213213
valuehelprequest = client->_event( `POPUP_TABLE_VALUE_CUSTOM` )
214214
)->input(
215-
value = client->_bind_edit( s_screen-lastname )
215+
value = client->_bind( s_screen-lastname )
216216
placeholder = `lastname`
217217
showvaluehelp = abap_true
218218
valuehelprequest = client->_event( `POPUP_TABLE_VALUE_CUSTOM` ) ).
@@ -242,7 +242,7 @@ CLASS z2ui5_cl_demo_app_009 IMPLEMENTATION.
242242
DATA(dialog) = popup->dialog( `abap2UI5 - Value Help` ).
243243
DATA(tab) = dialog->table(
244244
mode = `SingleSelectLeft`
245-
items = client->_bind_edit( t_suggestion_sel ) ).
245+
items = client->_bind( t_suggestion_sel ) ).
246246

247247
tab->columns(
248248
)->column( `20rem`
@@ -274,7 +274,7 @@ CLASS z2ui5_cl_demo_app_009 IMPLEMENTATION.
274274
dialog->simple_form(
275275
)->label( `Location`
276276
)->input(
277-
value = client->_bind_edit( s_screen-city )
277+
value = client->_bind( s_screen-city )
278278
suggestionitems = client->_bind( t_cities )
279279
showsuggestion = abap_true
280280
)->get(
@@ -290,7 +290,7 @@ CLASS z2ui5_cl_demo_app_009 IMPLEMENTATION.
290290
DATA(tab) = dialog->table(
291291
headertext = `Employees`
292292
mode = `SingleSelectLeft`
293-
items = client->_bind_edit( t_employees_sel ) ).
293+
items = client->_bind( t_employees_sel ) ).
294294

295295
tab->columns(
296296
)->column( `10rem`

src/01/01/z2ui5_cl_demo_app_024.clas.abap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,12 @@ CLASS Z2UI5_CL_DEMO_APP_024 IMPLEMENTATION.
107107
text = `call new app (set Event)`
108108
press = client->_event( `CALL_NEW_APP_EVENT` )
109109
)->label( `Demo`
110-
)->input( client->_bind_edit( input )
110+
)->input( client->_bind( input )
111111
)->button(
112112
text = `call new app (set data)`
113113
press = client->_event( `CALL_NEW_APP_READ` )
114114
)->label( `some data, you can read in the next app`
115-
)->input( client->_bind_edit( input2 ) ).
115+
)->input( client->_bind( input2 ) ).
116116

117117
client->view_display( view->stringify( ) ).
118118

src/01/01/z2ui5_cl_demo_app_025.clas.abap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ CLASS z2ui5_cl_demo_app_025 IMPLEMENTATION.
9999
text = `read`
100100
press = client->_event( `BUTTON_READ_PREVIOUS` )
101101
)->label( `Call previous app and show data of this app`
102-
)->input( client->_bind_edit( input )
102+
)->input( client->_bind( input )
103103
)->button(
104104
text = `back`
105105
press = client->_event( `BACK_WITH_EVENT` ) ).

src/01/01/z2ui5_cl_demo_app_026.clas.abap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ CLASS z2ui5_cl_demo_app_026 IMPLEMENTATION.
102102
text = `Documentation UI5 Popover Control`
103103
href = `https://openui5.hana.ondemand.com/entity/sap.m.Popover`
104104
)->label( `placement`
105-
)->segmented_button( client->_bind_edit( placement )
105+
)->segmented_button( client->_bind( placement )
106106
)->items(
107107
)->segmented_button_item(
108108
key = `Left`

src/01/01/z2ui5_cl_demo_app_047.clas.abap

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ CLASS Z2UI5_CL_DEMO_APP_047 IMPLEMENTATION.
4040
dec2 = 2 / 3.
4141

4242
mt_tab = VALUE #( ( date = sy-datum time = sy-uzeit ) ).
43-
client->_bind_edit( mt_tab ).
43+
client->_bind( mt_tab ).
4444
ENDIF.
4545

4646
CASE client->get( )-event.
@@ -68,31 +68,31 @@ CLASS Z2UI5_CL_DEMO_APP_047 IMPLEMENTATION.
6868
)->content( `form`
6969
)->title( `Input`
7070
)->label( `integer`
71-
)->input( client->_bind_edit( int1 )
72-
)->input( client->_bind_edit( int2 )
71+
)->input( client->_bind( int1 )
72+
)->input( client->_bind( int2 )
7373
)->input( enabled = abap_false
74-
value = client->_bind_edit( int_sum )
74+
value = client->_bind( int_sum )
7575
)->button( text = `calc sum`
7676
press = client->_event( `BUTTON_INT` )
7777
)->label( `decimals`
78-
)->input( client->_bind_edit( dec1 )
79-
)->input( client->_bind_edit( dec2 )
78+
)->input( client->_bind( dec1 )
79+
)->input( client->_bind( dec2 )
8080
)->input( enabled = abap_false
81-
value = client->_bind_edit( dec_sum )
81+
value = client->_bind( dec_sum )
8282
)->button( text = `calc sum`
8383
press = client->_event( `BUTTON_DEC` )
8484
)->label( `date`
85-
)->input( client->_bind_edit( date )
85+
)->input( client->_bind( date )
8686
)->label( `time`
87-
)->input( client->_bind_edit( time ) ).
87+
)->input( client->_bind( time ) ).
8888

8989
DATA(tab) = page->scroll_container( height = `70%`
9090
vertical = abap_true
9191
)->table(
9292
growing = abap_true
9393
growingthreshold = `20`
9494
growingscrolltoload = abap_true
95-
items = client->_bind_edit( mt_tab )
95+
items = client->_bind( mt_tab )
9696
sticky = `ColumnHeaders,HeaderToolbar` ).
9797

9898
tab->columns(

src/01/01/z2ui5_cl_demo_app_052.clas.abap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ CLASS z2ui5_cl_demo_app_052 IMPLEMENTATION.
8383

8484
DATA(cont) = page->content( `f` ).
8585
DATA(tab) = cont->table( id = `tab`
86-
items = client->_bind_edit( val = mt_table ) ).
86+
items = client->_bind( val = mt_table ) ).
8787

8888
DATA(lo_columns) = tab->columns( ).
8989
lo_columns->column( )->text( `Product` ).

src/01/01/z2ui5_cl_demo_app_061.clas.abap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ CLASS Z2UI5_CL_DEMO_APP_061 IMPLEMENTATION.
3838
class = `sapUiSmallMargin` ).
3939

4040
DATA(tab) = page->table(
41-
items = client->_bind_edit( <tab> )
41+
items = client->_bind( <tab> )
4242
mode = `MultiSelect`
4343
)->header_toolbar(
4444
)->overflow_toolbar(

src/01/01/z2ui5_cl_demo_app_065.clas.abap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ CLASS z2ui5_cl_demo_app_065 IMPLEMENTATION.
4444
press = client->_event( `NEST` )
4545
)->button( text = `Update only nested MODEL (nest_view_model_update)`
4646
press = client->_event( `NEST_MODEL` )
47-
)->input( client->_bind_edit( mv_input_main ) ).
47+
)->input( client->_bind( mv_input_main ) ).
4848

4949
DATA(lo_view_nested) = z2ui5_cl_xml_view=>factory(
5050
)->page( `Nested View`
5151
)->button( text = `event`
5252
press = client->_event( `TEST` )
53-
)->input( client->_bind_edit( mv_input_nest ) ).
53+
)->input( client->_bind( mv_input_nest ) ).
5454

5555
IF client->check_on_init( ).
5656
client->view_display( lo_view->stringify( ) ).

src/01/01/z2ui5_cl_demo_app_067.clas.abap

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,49 +46,49 @@ CLASS Z2UI5_CL_DEMO_APP_067 IMPLEMENTATION.
4646
href = `https://sapui5.hana.ondemand.com/#/entity/sap.ui.model.type.Currency`
4747
)->label( `One field`
4848
)->input(
49-
|\{ parts: [ '{ client->_bind_edit( val = amount
50-
path = abap_true ) }', '{ client->_bind_edit(
49+
|\{ parts: [ '{ client->_bind( val = amount
50+
path = abap_true ) }', '{ client->_bind(
5151
val = currency
5252
path = abap_true ) }'], type: 'sap.ui.model.type.Currency' \}|
5353
)->label( `Two field`
5454
)->input(
55-
|\{ parts: [ '{ client->_bind_edit( val = amount
56-
path = abap_true ) }', '{ client->_bind_edit(
55+
|\{ parts: [ '{ client->_bind( val = amount
56+
path = abap_true ) }', '{ client->_bind(
5757
val = currency
5858
path = abap_true ) }'], type: 'sap.ui.model.type.Currency' , formatOptions: \{showMeasure: false\} \}|
5959
)->input(
60-
|\{ parts: [ '{ client->_bind_edit( val = amount
61-
path = abap_true ) }', '{ client->_bind_edit(
60+
|\{ parts: [ '{ client->_bind( val = amount
61+
path = abap_true ) }', '{ client->_bind(
6262
val = currency
6363
path = abap_true ) }'], type: 'sap.ui.model.type.Currency' , formatOptions: \{showNumber: false\} \}|
6464
)->label( `Default`
6565
)->text(
66-
|\{ parts: [ '{ client->_bind_edit( val = amount
67-
path = abap_true ) }', '{ client->_bind_edit(
66+
|\{ parts: [ '{ client->_bind( val = amount
67+
path = abap_true ) }', '{ client->_bind(
6868
val = currency
6969
path = abap_true ) }'], type: 'sap.ui.model.type.Currency' \}|
7070
)->label( `preserveDecimals:false`
71-
)->text( |\{ parts: [ '{ client->_bind_edit( val = amount
72-
path = abap_true ) }', '| && client->_bind_edit(
71+
)->text( |\{ parts: [ '{ client->_bind( val = amount
72+
path = abap_true ) }', '| && client->_bind(
7373
val = currency
7474
path = abap_true ) &&
7575
|'], type: 'sap.ui.model.type.Currency' , formatOptions: \{ preserveDecimals : false \} \}|
7676
)->label( `currencyCode:false`
77-
)->text( |\{ parts: [ '{ client->_bind_edit( val = amount
78-
path = abap_true ) }', '| && client->_bind_edit(
77+
)->text( |\{ parts: [ '{ client->_bind( val = amount
78+
path = abap_true ) }', '| && client->_bind(
7979
val = currency
8080
path = abap_true ) &&
8181
|'], type: 'sap.ui.model.type.Currency' , formatOptions: \{ currencyCode : false \} \}|
8282
)->label( `style:'short'`
8383
)->text(
84-
|\{ parts: [ '{ client->_bind_edit( val = amount
85-
path = abap_true ) }', '{ client->_bind_edit(
84+
|\{ parts: [ '{ client->_bind( val = amount
85+
path = abap_true ) }', '{ client->_bind(
8686
val = currency
8787
path = abap_true ) }'], type: 'sap.ui.model.type.Currency' , formatOptions: \{ style : 'short' \} \}|
8888
)->label( `style:'long'`
8989
)->text(
90-
|\{ parts: [ '{ client->_bind_edit( val = amount
91-
path = abap_true ) }', '{ client->_bind_edit(
90+
|\{ parts: [ '{ client->_bind( val = amount
91+
path = abap_true ) }', '{ client->_bind(
9292
val = currency
9393
path = abap_true ) }'], type: 'sap.ui.model.type.Currency' , formatOptions: \{ style : 'long' \} \}|
9494
)->label( `event`
@@ -103,12 +103,12 @@ CLASS Z2UI5_CL_DEMO_APP_067 IMPLEMENTATION.
103103
)->link( text = `https://sapui5.hana.ondemand.com/sdk/#/api/sap.ui.model.odata.type.String%23methods/formatValue`
104104
href = `https://sapui5.hana.ondemand.com/sdk/#/api/sap.ui.model.odata.type.String%23methods/formatValue`
105105
)->label( `Numeric`
106-
)->input( client->_bind_edit( val = numeric )
106+
)->input( client->_bind( val = numeric )
107107

108108
)->label( `Without leading Zeros`
109109

110110
)->text(
111-
|\{path : '{ client->_bind_edit(
111+
|\{path : '{ client->_bind(
112112
val = numeric
113113
path = abap_true ) }', type : 'sap.ui.model.odata.type.String', constraints : \{ isDigitSequence : true \} \}| ).
114114

src/01/01/z2ui5_cl_demo_app_071.clas.abap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,12 @@ CLASS Z2UI5_CL_DEMO_APP_071 IMPLEMENTATION.
6868
)->title( `Input`
6969
)->label( `Link`
7070
)->label( `setSizeLimit`
71-
)->input( client->_bind_edit( mv_set_size_limit )
71+
)->input( client->_bind( mv_set_size_limit )
7272
)->button(
7373
text = `update size limit`
7474
press = client->_event( val = `UPDATE` )
7575
)->label( `Number of Entries`
76-
)->input( client->_bind_edit( mv_combo_number )
76+
)->input( client->_bind( mv_combo_number )
7777
)->button(
7878
text = `update number entries`
7979
press = client->_event( val = `UPDATE_MODEL` )

0 commit comments

Comments
 (0)