jQuery in Action, 3rd edition
The moose likes JSF and the fly likes h:dataTable new rows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "h:dataTable new rows" Watch "h:dataTable new rows" New topic

h:dataTable new rows

Richard Green
Ranch Hand

Joined: Aug 25, 2005
Posts: 536
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?

MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
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:


Richard Green
Ranch Hand

Joined: Aug 25, 2005
Posts: 536
thanks a lot mate. you are a legend.
I agree. Here's the link: http://aspose.com/file-tools
subject: h:dataTable new rows
It's not a secret anymore!