Let's say I have the following class Book
class Book{
String author;
String title;
}
I retrieve a list of Book ( List<Book>
) and I want to display it in a table like
author1:
title1
title11
author2:
title2
title22
title222
I was thinking to create a hashmap mapping author => list of books but , as I have read in SO, hashmap is not supported in h:datatable, nor in ui:repeat.
Any tips on how to achieve this?
Thank you.
PS: I am using jsf 1.2
Feel free to suggest a better title