How to represent nested data in a Primefaces datatable?

后端 未结 5 2089
天命终不由人
天命终不由人 2020-12-09 12:58

Here is my model :

User.java

public class User {
   //...

   public List getFriends() {
      // ...
   }
}
         


        
5条回答
  •  天涯浪人
    2020-12-09 13:47

    Based on @Kerem's answer, here is the solution I came up with:

    In order to make the nested datable like own rows of main datatable, I have overriden the CSS class .ui-dt-c. Check in h:head the style tag for details.

    
    
    
        USERS and their friends
        
    
    
    
    
    
        
            
                
                
            
        
    
        #{u.name}
        
            
                #{f.name}
            
        
    
    
    

提交回复
热议问题