cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 Array of array presentation. Double Items aggregation

Former Member
0 Kudos

Hello all,

A have a data organized as a tree, in first level I have a parent, on the second - it's children

I need some control/controls to present such a data

For example <Flexbox> has an items aggregation, so I can present all parents

Each parent has a list of children. Something like the next:

When I'm trying to use any items aggregation control, like another Flexbox or table, i'm receiving the next error :

sapui5.hana.ondemand.com/1.40.12/resources/sap-ui-core.js:160 2016-12-15

16:13:44.684850 During a clone operation, a template was found that neither was marked with 'templateShareable:true' nor 'templateShareable:false'. The framework won't destroy the template. This could cause errors (e.g. duplicate IDs) or memory leaks (The template is used in aggregation 'columns' of object '__table2').For more information, see documentation under 'Aggregation Binding'. -

Can you suggest any other way to reach two <items> aggregations one inside other?

The example:

<FlexBox

direction="Column"

alignItems="Start"

items="{ path: 'model>/parents' }">

<items>

<Text text="{model>name} {model>version}" ></Text>

<FlexBox

items="{ path: 'model>children' }">

<items>

<Image src="{ path: 'model>src',

formatter: '.formatter.imageformat' }"/>

</items>

</FlexBox>

</items>

</FlexBox>

Thanks

Maya

Accepted Solutions (0)

Answers (2)

Answers (2)

SergioG_TX
Active Contributor
0 Kudos

what if you had a horizontal layout:

https://sapui5.netweaver.ondemand.com/sdk/explored.html#/entity/sap.ui.layout.HorizontalLayout/aggre...

then via JavaScript, onBeforeRendering(), you could add the content from your model (children) - for each children, you can add a control into the content aggregation.

hope this helps

--- edited:

here is the view

the controller

and how it looks - after here you will need to play with CSS ...

if you have an array.. then you can read the array in a for loop and create and add the controls.

good luck!

Former Member
0 Kudos

Try the Tree container or the Tree Table

Former Member
0 Kudos

I need to get something like this:

So Tree table or StandardTreeItem can't help here cause I need different behavior for parent and children items

Children supposed to be a horizontal list of images, if I imagine the table - the number of children is a number of columns

and all this supposed to be inserted into one row