How to display many to many jpa collection in jsf?

前端 未结 1 897

i made many to many join table between users and groups tables . so i have a collection in each entitie ( Users and groups )

@ManyToMany(mappedBy = \"usersCo         


        
1条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-14 19:53

    You normally use an iterating component such as or to iterate over a collection. You can perfectly nest it inside another iterating component.

    E.g.

     
        
            

    Unrelated to the concrete problem, you've there some poor naming convention. One group should be represented by a class named Group, not Groups. I suggest to rename the one and other so that the code becomes so much more self documenting:

     
        
            

    The plural s in the field/variable name should already be indicative that it concerns a collection.

    0 讨论(0)
提交回复
热议问题