Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

h:dataTable new rows

 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a testbean that has a List of Defect beans.

A defect has a status, number, recommendation, updated, message and comment.
I would like to display the defects as follows:-



(with message and comment displayed on a new row). How do I do this using dataTable?
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use h:panelGrid inside h:dataTable. Ugly code and output, but as h:dataTable don't understand colspans and rowgroups, there's no other solution. Or you have to create your own component extending UIData.

Here is a basic example with panelGrid:

JSF

CSS
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot mate. you are a legend.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic