How to iterate an object in List if I don't know when it ends?

0

How can I iterate an object if I don't when it ends? More like iterate a list of list... For example I have a Father with children, this children have an children and and this children have his children and so on.

fsi2's picture
6
Joined: Aug 29 2015 - 6:37pm
Last seen: 4 years 3 months ago

3 Answers:

0

Just recurse through the children.

hozawa's picture
64038
Joined: Apr 24 2010 - 4:31pm
Last seen: 1 year 1 month ago
0

But i dont know in list, for example $F{attribute.children} will only get the children, how about other children inside of this children?

fsi2's picture
6
Joined: Aug 29 2015 - 6:37pm
Last seen: 4 years 3 months ago
0

$F{attribute.children} isn't a list. It's just a field. If you're assigning an entity to the field, you'll probably have to write a Scriplet to get a value that can be displayed in a report.

hozawa's picture
64038
Joined: Apr 24 2010 - 4:31pm
Last seen: 1 year 1 month ago
Feedback
randomness