cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hello,

I'm currently at a point where I dont get, how I can get on.

I have some code like this:

Could someone explain me in detail how I can use two different Entity Sets within one Page?

Many thanks in advance

Best regards

Johannes

0 Likes
View Entire Topic
SergioG_TX
SAP Champion
SAP Champion
0 Likes

think of the Entities as lists or properties of an object.

Supposed you have a model which contains a simple property (name), and a complex property (addresses). Think about addresses for a second. Addresses is a list of Address. Further, Address is a complex object itself probably composed of Street, City, State, Country, etc.

so if you had a list of address, then you would bind your UI list control with the Addresses (to bind the root) and then each Address item could have text properties of the Address properties (Street, City, State, Country), etc.

(pseudo code for simple explanation)

<List items="{Addresses}"> <!-- this line binds the list -->

<ObjectItem>

<Text text="{Street}, {State}" /> <!-- notice you can also put multiple properties on the same property binding -->

<Label text="{Country}" />

</ObjectItem>

</List>

hope this helps understand the binding... also, please take a look at the sapui5 explored tab - aggregation binding