Skip to Content

SAPUI5 Array of array presentation. Double Items aggregation

Dec 15, 2016 at 02:17 PM


avatar image

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 : 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:




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


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


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


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

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







untitled.png (4.8 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Radek Chudziak Dec 15, 2016 at 04:07 PM

Try the Tree container or the Tree Table

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

untitled.png (4.8 kB)
Sergio Guerrero Dec 15, 2016 at 09:55 PM

what if you had a horizontal layout:

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!

viewimg.png (28.9 kB)
controllerimg.png (33.3 kB)
uiimg.png (15.5 kB)
10 |10000 characters needed characters left characters exceeded