Here is my model :
User.java
public class User {
//...
public List<User> getFriends() {
// ...
}
}
I would like to build a table of user friends like this :
users.jsf
+----------+------------+ | USER | FRIENDS | +----------+------------+ | | ALICE | | +------------+ | ADAM | BOB | | +------------+ | | PITT | +----------+------------+ | | | ....
Since there are many users, it's not possible to dump the user table in one go.
The datatable component is ideal in this case because it has built-in pagination support. It is ideal too because it's possible to sort columns...
Unfortunately, I wasn't able to find through the Primefaces examples a way for changing the rowspan in user columns.
How can I build this datatable ?
Some other OP having this similar issue:
- Primefaces/JSF Nested Data Table
- How to do a dataTable containing a subtable with Primefaces in the same row? What's doing with mine?
- Primefaces dataTable with rowspan
- ... Add yours?
EDIT
Here is the final solution I came up with.