I want to pass data from database to JSF page as a table. I know that I can use ArrayList but I need more efficient way because I have database tables with 2000+ rows and more. I;m not sure but the ArrayList will consume too much memory. Is there more memory efficient way to send the data to the JSF page?
P.S maybe using pagination?
You can start with a simple PrimeFaces – DataTable – Pagination Example… its really simple and efficient…
Then if you will deal with really huge data you can take a look at a more advanced example.
Take a look at the PrimeFaces DataTable – Lazy Loading example
And here is a link to all PrimeFaces Datatable ability’s