I have a list of items. Lets say list has the following elements: A,B,C,D,E,F.
I want to display these elements in a h:dataTable in the following manner.
A B C
D E F
arranged in 3 cols and in the said fashion above.
I am new to JSF and am struggling to get it.
If any one has some sample code or any pointers, please post it back.
That will be of great help.
posted 6 years ago
I don't think that the h:datatable is a good way to solve this problem. I would use the datatable component for collections of complex objects, but to display simple strings in a table I would use the h:panelGrid tag:
Note that I've use the forEach-tag of the JSTL and so I had to make sure that the JSTL is installed on my server. To complete the coding you need a PoJo which you bind to the myBean variable (faces-config.xml).