Skip to content

Commit 4dee671

Browse files
committed
docs: drop the /XX/ model-path prefix from all path examples
The two-way view-model separation removed the /XX/ node - bound data now lives directly under the root model. Update the resolved-path examples in expression_binding, formatter and concept accordingly (e.g. {/XX/NAME} -> {/NAME}). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent f4d9aa1 commit 4dee671

4 files changed

Lines changed: 14 additions & 14 deletions

File tree

docs/cookbook/model/expression_binding.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ The inputs use a UI5 type binding (`{ type: ..., path: "..." }`) for integer val
1313

1414
| ABAP code | UI5 binding result |
1515
|---|---|
16-
| `client->_bind( val = input31 path = abap_true )` | `/XX/INPUT31` (raw path for type binding) |
17-
| `client->_bind( input31 )` | `{/XX/INPUT31}` (full binding for expression) |
18-
| `` `{= Math.max($` && client->_bind( input31 ) && `, $` && client->_bind( input32 ) && `) }` `` | `{= Math.max(${/XX/INPUT31}, ${/XX/INPUT32}) }` |
16+
| `client->_bind( val = input31 path = abap_true )` | `/INPUT31` (raw path for type binding) |
17+
| `client->_bind( input31 )` | `{/INPUT31}` (full binding for expression) |
18+
| `` `{= Math.max($` && client->_bind( input31 ) && `, $` && client->_bind( input32 ) && `) }` `` | `{= Math.max(${/INPUT31}, ${/INPUT32}) }` |
1919

2020
```abap
2121
CLASS z2ui5_cl_demo_app_max_val DEFINITION PUBLIC.
@@ -34,15 +34,15 @@ CLASS z2ui5_cl_demo_app_max_val IMPLEMENTATION.
3434
view->shell( )->page(
3535
)->label( `max value of the first two inputs`
3636
"UI5 type binding — validates integer input
37-
"resolves to: { type: "sap.ui.model.type.Integer", path: "/XX/INPUT31" }
37+
"resolves to: { type: "sap.ui.model.type.Integer", path: "/INPUT31" }
3838
)->input( `{ type : "sap.ui.model.type.Integer",` &&
3939
` path:"` && client->_bind( val = input31
4040
path = abap_true ) && `" }`
4141
)->input( `{ type : "sap.ui.model.type.Integer",` && |\n| &&
4242
` path:"` && client->_bind( val = input32
4343
path = abap_true ) && `" }`
4444
"Expression binding — computed in the browser
45-
"resolves to: {= Math.max(${/XX/INPUT31}, ${/XX/INPUT32}) }
45+
"resolves to: {= Math.max(${/INPUT31}, ${/INPUT32}) }
4646
)->input(
4747
value = `{= Math.max($` && client->_bind( input31 ) &&`, $` && client->_bind( input32 ) && `) }`
4848
enabled = abap_false ).
@@ -54,7 +54,7 @@ ENDCLASS.
5454

5555
#### Conditionally Set Input Field Editability
5656

57-
The `enabled` property uses an expression binding that resolves to `{= 500===${/XX/QUANTITY} }` — the product field becomes editable only when the quantity equals 500 exactly. Note that `===` is the JavaScript strict equality operator.
57+
The `enabled` property uses an expression binding that resolves to `{= 500===${/QUANTITY} }` — the product field becomes editable only when the quantity equals 500 exactly. Note that `===` is the JavaScript strict equality operator.
5858

5959
```abap
6060
CLASS z2ui5_cl_demo_editable DEFINITION PUBLIC.
@@ -75,7 +75,7 @@ CLASS z2ui5_cl_demo_editable IMPLEMENTATION.
7575
)->input( `{ type : "sap.ui.model.type.Integer",` &&
7676
` path:"` && client->_bind( val = quantity
7777
path = abap_true ) && `" }`
78-
"enabled resolves to: {= 500===${/XX/QUANTITY} }
78+
"enabled resolves to: {= 500===${/QUANTITY} }
7979
)->input(
8080
value = client->_bind( product )
8181
enabled = `{= 500===$` && client->_bind( quantity ) && ` }` ).

docs/cookbook/model/formatter.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ For example, this ABAP code:
2121
```
2222
produces this UI5 binding string at runtime:
2323
```text
24-
{ parts: ["/XX/AMOUNT"], type: 'sap.ui.model.type.Currency' }
24+
{ parts: ["/AMOUNT"], type: 'sap.ui.model.type.Currency' }
2525
```
2626

2727
The sections below show the binding-string pattern for each ABAP type that needs a formatter. Each pattern is the minimum that makes the value display and parse correctly — for runnable apps with full `formatOptions`, `constraints`, and read-only variants, see the [samples repository](https://github.com/abap2UI5/samples).
@@ -177,7 +177,7 @@ CLASS z2ui5_cl_demo_app_067 IMPLEMENTATION.
177177
href = `https://sapui5.hana.ondemand.com/#/entity/sap.ui.model.type.Currency`
178178
179179
"Currency in one field — shows amount and currency symbol together
180-
"resolves to: { parts: ["/XX/AMOUNT", "/XX/CURRENCY"], type: 'sap.ui.model.type.Currency' }
180+
"resolves to: { parts: ["/AMOUNT", "/CURRENCY"], type: 'sap.ui.model.type.Currency' }
181181
)->label( `One field`
182182
)->input(
183183
|\{ parts: [ `{ client->_bind( val = amount
@@ -245,7 +245,7 @@ CLASS z2ui5_cl_demo_app_067 IMPLEMENTATION.
245245
246246
"Remove leading zeros from a numeric string with OData type formatting
247247
"isDigitSequence: true tells the formatter to treat the value as a digit sequence
248-
"resolves to: { path: "/XX/NUMERIC", type: 'sap.ui.model.odata.type.String', constraints: { isDigitSequence: true } }
248+
"resolves to: { path: "/NUMERIC", type: 'sap.ui.model.odata.type.String', constraints: { isDigitSequence: true } }
249249
page->simple_form( title = `No Zeros`
250250
editable = abap_true
251251
)->content( `form`

docs/cookbook/view/xml_templating.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ abap2UI5 wires up the templating model for you. Every variable you bind with `cl
2424
| ABAP binding | Path inside templates |
2525
| ---------------------------------- | --------------------------- |
2626
| `client->_bind( mt_layout )` | `{template>/MT_LAYOUT}` |
27-
| `client->_bind( mv_flag )` | `{template>/XX/MV_FLAG}` |
27+
| `client->_bind( mv_flag )` | `{template>/MV_FLAG}` |
2828

2929
The `template>` model is the templating engine's view of the data — distinct from the default model used by runtime bindings like `{MT_DATA}`.
3030

@@ -70,7 +70,7 @@ The full sample is `Z2UI5_CL_DEMO_APP_173`.
7070
```abap
7171
client->_bind( mv_flag ).
7272
73-
view->template_if( `{template>/XX/MV_FLAG}`
73+
view->template_if( `{template>/MV_FLAG}`
7474
)->template_then(
7575
)->icon( src = `sap-icon://accept`
7676
color = `green` )->get_parent(
@@ -79,7 +79,7 @@ view->template_if( `{template>/XX/MV_FLAG}`
7979
color = `red` ).
8080
```
8181

82-
The test argument follows the same rules as in UI5: any binding expression is fine, and the string `"false"` is treated as boolean `false` (a UI5 convenience). For richer conditions use expression binding, e.g. `` `{= ${template>/XX/MV_COUNT} > 0 }` ``.
82+
The test argument follows the same rules as in UI5: any binding expression is fine, and the string `"false"` is treated as boolean `false` (a UI5 convenience). For richer conditions use expression binding, e.g. `` `{= ${template>/MV_COUNT} > 0 }` ``.
8383

8484
`template:elseif` is also supported by UI5; check `Z2UI5_CL_XML_VIEW` for the corresponding fluent method or fall back to the generic builder (see [Definition](/cookbook/view/definition#the-fully-generic-builder)).
8585

docs/technical/concept.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ A typical backend response holds the XML View:
158158
<form:content>
159159
<Title text="Make an input here and send it to the server..."/>
160160
<Label text="Name"/>
161-
<Input value="{/XX/NAME}"/>
161+
<Input value="{/NAME}"/>
162162
<Button press=".eB(['BUTTON_POST'])" text="post"/>
163163
</form:content>
164164
</form:SimpleForm>

0 commit comments

Comments
 (0)