on ‎2016 Nov 08 1:27 PM
Hi Experts,
when I recently browsed the SAPUI5 Explored section I found some code in the tree table (XML View for Tree Table) I didn't understand:
<TreeTable
id="TreeTableBasic"
rows="{path:'/catalog/clothing', parameters: {arrayNames:['categories']}}"
selectionMode="MultiToggle"
enableSelectAll="false"
ariaLabelledBy="title">
....
It aparrently uses a complex binding syntax for the "rows" aggregation. I am familiar with the "path" notation along with formatters. But I never saw the "parameters" notation before. Can someone enlighten me and provide some information about it? I could not find some documentation in the SAPUI5 developers guide.
Regards
Tobias
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hi Tobias ,
Actually these are binding related parameters. These parameters depends on type of binding (json,oData,oDatav2,oDatav4). Like if you check the second sample of the tree table on explorer (oDataV2 Tree Binding Example) there you find treeAnnotationProperties and countMode as parameters so these are parameters of oData V2 model binding.
For any binding method(binAggreagtion,bindItem) we have parameter field to pass binding dependent parameters to the binding (of any type) as marked in screenshot

So every type of model binding have some extra parameters which we can pass to configure(operations,filtering,annotations,count,binding mode etc) the data according to our needs before attaching to the control .
So for Json tree binding we have this arrayNames parameter similarly for ODataTreeBinding V2 we have treeAnnotationProperties and ODataBinding V2 we have countMode.
Check these api References for the parameters of different bindings (i think jsonBinding or JSONTreeBinding we don't have such doc but if you check out these api references of other types of bindings you will understand what parameter field is all about in binding 😞
1. sap.ui.model.odata.v2.ODataTreeBinding
2. sap.ui.model.odata.v2.ODataListBinding
3. sap.ui.model.odata.v4.ODataListBinding
4. sap.ui.model.odata.ODataListBinding
thanks
Viplove
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 13 | |
| 8 | |
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.