I’m using Primefaces 2.2.1 and JSF 2.0 and I’m trying to show a list on a single row using p:dataTable. If I use the standard p:column, every list member it is shown on different rows.
So if I have an ArrayList, how to show it on a single row, multiple columns?
Thank you!
How do you want to display your list members? Separated by a comma, for example?
In that case you could use something like this:
Notice that the #{bean.fakeList} must return a list of 1 element, so that the dataTable will have an item to iterate, otherwise it’ll show you the ‘No records’ message.
The output of this code will come in a single row and will be something like: value1, value2, value3, …
I’m not sure if that was what you were looking for.