| Author |
Variable number of columns within dataTable
|
Rory Evans
Greenhorn
Joined: Feb 19, 2010
Posts: 18
|
|
Hi,
On my backing bean, I have a list of Player objects. Each Player object has a list of Card objects.
On my jsf page, I want to display a dataTable with one row per Player and one column per Card. Since each player may have a different number of cards, I need to have a way of determining how many columns to create.
My initial idea was to use something like:
but this renders no columns at all (after reading around the subject, I understand why this is the case). Can anyone suggest a suitable alternative or workaround for the problem described above?
Thanks
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14491
|
|
You're not the first one to discover that the ui:repeat element doesn't work well in tables.
Your best bet, I think, is to bind the table itself to a backing bean and construct the columns in backing bean code. Or you could use the RichFaces DataGrid control.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
 |
|
|
subject: Variable number of columns within dataTable
|
|
|