1

Header and Details recursive tables

I have requirement to implement table structure like in picture (header table followed by details table). We have an employee class and his/her certification details are modeled by another class.

I have list of these 2 classes available to be iterated over. How do i implement desired table structure. Will it be one datatable within the other or UI repeat would help.

  • Or simply use a nested `ui:repeat` that creates table rows and cells: http://stackoverflow.com/questions/15726600/how-to-use-uirepeat-to-iterate-over-a-nested-list – Kukeltje Jan 05 '17 at 19:37
  • @Kukeltje: you mean by using native HTML table, TR, td tags? Isn't there something in JSF which could help – true_programmer Jan 05 '17 at 20:29
  • @BalusC: Any advise please – true_programmer Jan 05 '17 at 23:00
  • `ui:repeat` IS jsf. Otherwise see the answer – Kukeltje Jan 06 '17 at 07:31
  • @Kukeltje: I apologies if i wasn't clear earlier. What i meant was - isn't there a way in JSF to get control of defining rows in data table other than creating table using native HTML tags. For my situation, if i use data table within data table, i won't get desired result. It will first show all rows on Employee and then all rows of certification. What i want is to show certification details per employee and not for all of them together. – true_programmer Jan 06 '17 at 19:19

1 Answers1

0

Can you use third party libaries? I would recommend you dataTable from primefaces. http://www.primefaces.org/showcase/ui/data/datatable/subTable.xhtml

jklee
  • 2,198
  • 2
  • 15
  • 25