Use an af:treeTable for this. There are a couple of samples for af:treetables available like https://tompeez.wordpress.com/2018/08/23/adf-treetable-advanced-sample/ or Andrej Baranovskij Blog: Tree Table Component in Oracle ADF
They are not exactly what you want but they should help you understand the concept.
Has the dynamicComponent been used? ADF Faces provides a dynamic component (
af:dynamicComponent) that determines what components to display, and their values, at runtime.