Skip to content

Commit f4d9aa1

Browse files
committed
docs: reword prose that still described the one-way/two-way split
Follow-up to the _bind_edit sweep: update the sentences that explained binding in terms of _bind (one-way) vs _bind_edit (two-way), and drop the last /XX/ model-path references (the prefix no longer exists). Covers tables, trees, formatter, full_example, dx, snippets, odata, xml_templating, draft_handling, common_failures and agent.md. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent 78da82d commit f4d9aa1

11 files changed

Lines changed: 15 additions & 15 deletions

File tree

docs/advanced/agent.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ CLASS zcl_app_xxx DEFINITION PUBLIC.
132132
133133
PUBLIC SECTION.
134134
INTERFACES z2ui5_if_app.
135-
" bound data (public DATA attributes used by _bind / _bind_edit)
135+
" bound data (public DATA attributes used by _bind)
136136
137137
PROTECTED SECTION.
138138
DATA client TYPE REF TO z2ui5_if_client.
@@ -239,7 +239,7 @@ When an AI needs deeper information than this page provides:
239239
| Architecture, request roundtrip | [Concept](/technical/concept), [How It All Works](/technical/how_it_all_works) |
240240
| Lifecycle and `IF` / `ELSEIF` dispatcher pattern | [Cookbook → Life Cycle](/cookbook/event_navigation/life_cycle) |
241241
| Building views, control choice | [Cookbook → View Definition](/cookbook/view/definition) |
242-
| Data binding (`_bind`, `_bind_edit`) | [Cookbook → Binding](/cookbook/model/binding) |
242+
| Data binding (`_bind`) | [Cookbook → Binding](/cookbook/model/binding) |
243243
| Tables and trees | [Cookbook → Tables](/cookbook/model/tables), [Trees](/cookbook/model/trees) |
244244
| Events, actions, exceptions | [Cookbook → Event, Navigation](/cookbook/event_navigation/life_cycle) |
245245
| Popups and popovers | [Cookbook → Popup, Popover](/cookbook/popup_popover/popup) |

docs/cookbook/eml_cds_sql/draft_handling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ ENDCLASS.
222222
That's a complete, working draft app. The three numbered comments map one-to-one onto the lifecycle diagram: **open → edit → activate**.
223223

224224
::: warning Why two steps to save?
225-
Notice that *Save* does two things: `UPDATE FIELDS` (copy the user's typed values into the draft) **then** `Activate` (promote the draft to active). The fields are two-way bound with `_bind_edit`, so on each roundtrip the user's input lives in your ABAP variables — but it is **not** in the draft yet until you push it back with `UPDATE FIELDS`. Forgetting this step is the most common beginner mistake: the activate succeeds but saves the *old* values.
225+
Notice that *Save* does two things: `UPDATE FIELDS` (copy the user's typed values into the draft) **then** `Activate` (promote the draft to active). The fields are two-way bound with `_bind`, so on each roundtrip the user's input lives in your ABAP variables — but it is **not** in the draft yet until you push it back with `UPDATE FIELDS`. Forgetting this step is the most common beginner mistake: the activate succeeds but saves the *old* values.
226226
:::
227227

228228
## The Full App — A Real-World Edit Screen

docs/cookbook/expert_more/odata.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ outline: [2, 4]
33
---
44
# OData
55

6-
By default, you bind public attributes of your class to UI5 properties with `_bind` and `_bind_edit`. For cases where you need access to large datasets, you can also use existing OData services. OData offers features like pagination and growing that improve performance with large amounts of data.
6+
By default, you bind public attributes of your class to UI5 properties with `_bind`. For cases where you need access to large datasets, you can also use existing OData services. OData offers features like pagination and growing that improve performance with large amounts of data.
77

88
#### Define Additional Model
99
As an example, we use the test OData service `/sap/opu/odata/DMO/UI_FLIGHT_R_V2/`, available on most ABAP systems. Make sure the service is publicly reachable. The method below defines the model and exposes it under the name `FLIGHT`:

docs/cookbook/expert_more/snippets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ ENDCLASS.
4141

4242
## Selection Screen
4343

44-
A classic input form: a few fields bound with `_bind_edit`, a button that triggers backend logic, results shown after submission.
44+
A classic input form: a few fields bound with `_bind`, a button that triggers backend logic, results shown after submission.
4545

4646
```abap
4747
CLASS z2ui5_cl_app_selection DEFINITION PUBLIC.

docs/cookbook/model/formatter.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ UI5 formatter types use a special JSON-based binding syntax with these key eleme
1313

1414
Note on ABAP syntax: inside string templates (`|...|`), escape the curly braces as `\{` and `\}`, because `{ }` normally denotes an embedded ABAP expression.
1515

16-
The `path = abap_true` parameter on `_bind` / `_bind_edit` returns only the raw model path rather than the full binding expression, so you can embed it inside the `parts` array or a single-path `path:` entry. For `_bind_edit` the path is e.g. `/XX/AMOUNT`; read-only `_bind` paths have no `/XX/` segment (`/AMOUNT`).
16+
The `path = abap_true` parameter on `_bind` returns only the raw model path rather than the full binding expression, so you can embed it inside the `parts` array or a single-path `path:` entry. The path is e.g. `/AMOUNT`.
1717

1818
For example, this ABAP code:
1919
```abap
@@ -93,7 +93,7 @@ ABAP `abap_bool` is `"X"` or `""`. UI5's `CheckBox` expects `true` / `false`. Tw
9393
```abap
9494
)->checkbox( selected = `{= $` && client->_bind( mv_flag ) && ` === 'X' }` )
9595
```
96-
This resolves to `{= ${/MV_FLAG} === 'X' }` — read-only `_bind` paths have no `/XX/` prefix (that segment marks two-way `_bind_edit` bindings). Note that expression bindings cannot write back — checking the box will not flip the ABAP attribute.
96+
This resolves to `{= ${/MV_FLAG} === 'X' }`. Note that expression bindings cannot write back — checking the box will not flip the ABAP attribute.
9797

9898
**ABAP-side conversion** — keep a parallel `string`-typed attribute (`'true'` / `'false'`) for two-way binding, and translate before/after each event:
9999
```abap

docs/cookbook/model/tables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ ENDCLASS.
5252
```
5353

5454
### Editable
55-
To make a table editable, switch the binding to `_bind_edit`:
55+
To make a table editable, use editable cell controls (e.g. `input`) — the binding is the same `_bind`:
5656
```abap
5757
METHOD z2ui5_if_app~main.
5858

docs/cookbook/model/trees.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ ENDCLASS.
7575

7676
The child table field (`nodes` in the example above) is the key: UI5 follows that field name to locate sub-items at each level. The name must match across all levels but can be anything you choose.
7777

78-
Note that the example binds with `_bind_edit` so that the user's selection (`IS_SELECTED`) is synced back to ABAP. For a purely read-only tree, `_bind` is enough.
78+
Note that the example binds `IS_SELECTED` to an editable control so the user's selection is synced back to ABAP. A display-only tree needs no editable cells.

docs/cookbook/troubleshooting/common_failures.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ Not every problem raises an ABAP exception. Many failures surface only in the br
77

88
## Binding-Path Mismatch
99

10-
When a `_bind` / `_bind_edit` path does not resolve against the JSON model on the frontend — typically because the public attribute was renamed, the data was never sent, or the path is mistyped — UI5 does **not** raise an ABAP exception. The control simply renders empty or with a default value.
10+
When a `_bind` path does not resolve against the JSON model on the frontend — typically because the public attribute was renamed, the data was never sent, or the path is mistyped — UI5 does **not** raise an ABAP exception. The control simply renders empty or with a default value.
1111

1212
Where to look:
1313
- **Browser console.** UI5 logs a warning like `Binding "/path/to/field" was not found in model` from `sap.ui.model.json.JSONModel`. Open the browser DevTools console and filter by `sap.ui.model`.
1414
- **Network tab.** Inspect the abap2UI5 response payload — the JSON model is included verbatim. If the field is absent or named differently than your binding path, you have your answer.
1515
- **ABAP side.** Nothing. The backend never learns the binding failed. Asserting "no console warnings" is the only way to catch this in tests.
1616

17-
Two-way binding (`_bind_edit`) silently drops the write-back when the path is invalid — your ABAP attribute keeps its old value after the next event. Cross-check the attribute value in the debugger if data is mysteriously not updating.
17+
Two-way binding silently drops the write-back when the path is invalid — your ABAP attribute keeps its old value after the next event. Cross-check the attribute value in the debugger if data is mysteriously not updating.
1818

1919
## Bound Attribute Not Public
2020

docs/cookbook/view/xml_templating.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ Plain ABAP control flow covers most cases and is easier to debug. Reach for `tem
136136

137137
#### Tips
138138

139-
- Always bind the data that drives a template (`client->_bind` / `client->_bind_edit`) **before** the builder call that references it. The binding registers the path that `{template>/...}` resolves against.
139+
- Always bind the data that drives a template (`client->_bind`) **before** the builder call that references it. The binding registers the path that `{template>/...}` resolves against.
140140
- Inside `template:repeat`, prefer `{var>FIELD}` over deeper paths — it keeps the body readable and lets you nest repeats with distinct `var` names (`L0`, `L1`, ...) without collisions.
141141
- Use expression binding (`{= ... }`) when the value you need is a binding string itself. Templating-time expressions can read `${var>...}` and concatenate strings, which is how dynamic cell bindings are assembled.
142142
- If a templated control does not update after a data change, you forgot to rebuild — call `view_display` or `nest_view_display` again.

docs/get_started/full_example.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ The `main` method is a pure dispatcher — the same pattern as in [Hello World](
7979

8080
Two things are new compared to Hello World: `shell( )` wraps the page in the standard UI5 app frame, and the `navbuttonpress` / `shownavbutton` parameters add a back button when the app was called from another app (details under [Navigation](/cookbook/event_navigation/navigation)). Further down, `get_parent( )` moves one level back up in the builder tree, so the next `column( )` becomes a sibling instead of a child — see [View → Definition](/cookbook/view/definition).
8181

82-
The two date pickers and the customer input use `_bind_edit`, so whatever the user types travels back to the ABAP attributes automatically. The table uses read-only `_bind` since the rows are only displayed:
82+
The two date pickers and the customer input are bound with `_bind`, so whatever the user types travels back to the ABAP attributes automatically. The table is bound with `_bind` too; since its cells are display-only, nothing syncs back:
8383

8484
```abap
8585
METHOD view_display.
@@ -219,7 +219,7 @@ A popup is built exactly like the main view — same fluent builder, just create
219219
ENDMETHOD.
220220
```
221221

222-
The date picker in the dialog binds to `s_edit-delivery_date` with `_bind_edit` — when the user picks a new date, the attribute is already updated by the time the next event reaches your ABAP code.
222+
The date picker in the dialog binds to `s_edit-delivery_date` with `_bind` — when the user picks a new date, the attribute is already updated by the time the next event reaches your ABAP code.
223223

224224
### Step 5 — Posting the Change
225225

0 commit comments

Comments
 (0)