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
Sharathmg
Active Contributor
0 Likes

Entity is like a data set which holds the values in variables/properties. You first say that which is the dataset i.e. entity for the table. Then, bind the properties in that entity to the columns or rows in the table. In a view XML, you can map only one entity set for a control.

If you want to use data from multiple entities, then you have to manually set the properties to the controls in the table.

Regards,

Sharath

Former Member
0 Likes

Hi,

thx for you answer.

The binding works via <table [...] items="{XY}">.

All data is now visible.

Is it also possible to filter this data to only see the relevant data based on the atm viewed detail page?
I'm pretty sure this is only possible with the help of the controller, but I cant get it going.

best regards

Johannes

Sharathmg
Active Contributor
0 Likes

You can append the filters to the entity. You can choose to do it in XML(if the filters are static) else in the controller.

// bind aggregation
table.bindAggregation("rows",{ path:"/<entity>", filters:[filter string]..}); 

Regards,

Sharath

Former Member
0 Likes

Hi,

thx for input, your answer got me further.

Now I'm trying to get that filter dynamic with the help of some controller logic. But it keeps saying that there is no template for the aggregation, even though I wrote one. Any idea?

Sharathmg
Active Contributor
0 Likes

Check with sample codes. The code used to bind templates seems wrong.

Former Member

Hi,

i got the issue solved today. Thank you a lot for your patience and answers.

The reason was that there was no navigation property/association between the detaildata and the masterlist data in the oData Service. I got it this morning.

Best regards

Johannes