This is a lazy p:dataTable example (with illogical dummy data) using rowToggler and rowExpansion
This is a sample maven project that uses Latest PrimeFaces Release version and the jakarta-namespace (Jakarta EE 9+) instead of the javax-namespace (Java EE 8). If you have a PrimeFaces issue, please download or fork this project. Then, you should change these files by yourself so that PrimeFaces Team can see your problem. Finally, you can send a link or attach the project. Please make sure that project is runnable with the command below.
You can execute the sample with mvn jetty:run command and hit http://localhost:8080/primefaces-test to run the page.
Per default the application uses Mojarra 3.0.x. You can also use other versions with the available maven profiles: myfaces30, myfaces40, mojarra40
mvn clean jetty:run -Pmyfaces30
mvn clean jetty:run -Pmyfaces40
mvn clean jetty:run -Pmojarra30
mvn clean jetty:run -Pmojarra40