Reputation: 399
Hi I have a datatable suppose office. Inside that datatable I have datatable department.
After clicking of rowtoggler of office datatable I show information related to office and respected department table. And I want after clicking rowtoggler of department datatable I can get information related to department.
But even after clicking rowtoggler of department datatable I get info of office and department table again, added to bottom.
I guess its calling same method which it calls for office datatable.
<p:dataTable id="officeDataTable" value="#{mybean.officeList}">
<p:column>...</p:column>
<p:column>...</p:column>
<p:column>...</p:column>
<p:column><p:rowToggler/></p:column>
<p:rowExpansion>
.....
.....
.....
<p:dataTable id="departmentDataTable" value="#{mybean.officeList.departmentList}">
<p:column>...</p:column>
<p:column>...</p:column>
<p:column>...</p:column>
<p:column><p:rowToggler/></p:column>
<p:rowExpansion>
.....
.....
.....
</p:rowExpansion>
</p:dataTable>
</p:rowExpansion>
</p:dataTable>
Upvotes: 0
Views: 8556
Reputation: 1885
There seems to be an issue with nested datatables, with a possible solution found here:
https://code.google.com/archive/p/primefaces/issues/1727
You also might want to consider using a treetable instead:
Upvotes: 2