With h:datatable we can display data as follows
but can I display the same as shown below:
You can use t:dataTable component that support "newspaperColumns" and "newspaperOrientation" attributes. newspaperColumns determine the number of columns the table will be divided over and newspaperOrientation the orientation of the newspaper columns in the newspaper table.
In your example, the bean:
public class Bean {
public List getPeople() {
List people = new ArrayList();
people.add("Jems");
people.add("tom");
people.add("chirs");
people.add("harry");
return people;
}
}
And JSF:
Render as:
1 Jems 2 tom
3 chirs 4 harry