My scenario is like this, I have List, I am iterating my list using <h:dataTable> and populate the values in my jsp. I want to define some size to my table whether or not my list contains data. If the list size is increases beyond the Tabel size I don�t want to increase the Table size rather I need to implement vertical scroll bar.
You can always control the size of the list from the managed bean. With the help of iterator, restrict the size of the list to say 10 and then bind that list to the datatable.
In case of MVC, View should not decide how much data to be displayed. It should be governed by the controller only. If this is a consistent feature required by you then go for developing the custom tag as per your need.