on 12-15-2016 2:17 PM
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
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try the Tree container or the Tree Table
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.