Skip to content

Commit 1de4474

Browse files
authored
Update property-metadata-binding-f5aa4bb.md
Adds the binding procedure of a property that doesn't occur in the default model
1 parent 910d40b commit 1de4474

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

docs/04_Essentials/property-metadata-binding-f5aa4bb.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,18 @@ The binding must then know the metadata part of the binding expression. The path
2727
var myLabel = new sap.m.Label({text:"{/#Company/CompanyName/@sap:label}"});
2828
```
2929

30+
To use the absolute binding for a property that doesn't occur in a EnttityType of the default model, the reference to the correct model defined in the manifest can be added as a prefix.
31+
If you’re not adding the model the framework will tell you in the development console that the mentioned Entity is not present.
32+
Defining the target model can be done by adding `myModel>` in the beginning of the binding string.
33+
34+
35+
Example:
36+
37+
```js
38+
39+
var myLabel = new sap.m.Label({text:"{myModel>/#Company/CompanyName/@sap:label}"});
40+
```
41+
3042
- Relative Binding
3143
3244
A relative binding path can be resolved relative to a data path/context.
@@ -39,5 +51,3 @@ The binding must then know the metadata part of the binding expression. The path
3951
var myLabel2 = new sap.m.Label({text:"{City/#@sap:label}"});
4052
myLabel2.bindElement("/Companies(1)");
4153
```
42-
43-

0 commit comments

Comments
 (0)