on 11-04-2017 8:31 PM
Let's say I have Employee entity associated with Address entity in XSOData and I want to bind them to a single control - StandardListItem. How to achieve this?
<List id="EmployeeList" headerText="Employees" items="{ path: '/Employee'}">
<items>
<StandardListItem title="{Name}" //from Employee entity
description="{Address}" //from Address entity
/>
</items>
</List>
Associated address details available at Employee('emp1')/Address/
TIA.
You have to add a binding specific parameter that the associated Address is expandend. Then you can access the properties of the Address via "Address/<property name>" (e.g. Address/City - if "City" is a valid property of course).
<List id="EmployeeList" headerText="Employees" items="{ path: '/Employee', parameters: { expand: 'Address'} }">
<items>
<StandardListItem title="{Name}" //from Employee entity
description="{Address/City}" //from Address entity
/>
</items>
</List>
If you wanna combine different Address properties for your description field you can use expression binding or the parts syntax.
Regards,
Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.