I’m looking for techniques/best-practices to do deal with the way our web-based application works.
Currently when a user searches a field it can returns more than 10000 records at once which to me is a waste of bandwidth and memory.
Is there a way to limit the number of returned rows based on the numbers of rows selected to display. i.e. if on the web page user selects 100 rows per page then only return the 100 rows instead of loading all 10000 at once , then when next-page is clicked the next 100 number of rows will be loaded and so on.
UPDATE : The current implementation fetches all the data, binds it to the t:datatable and t:dataScroller for navigation between the pages.
From my reading in JFS 1.1 there is no server-side pagination provided (Correct me if i’m wrong) and to provide such mechanism i need to write custom code such as http://wiki.apache.org/myfaces/WorkingWithLargeTables
Can someone confirm is this is a good solution? Using RichFaces is not an option.
thanks
You should do server-side pagination using a jsf component, as an example in richfaces:
http://katzmaier.blogspot.com/2010/03/richfaces-server-side-pagination.html