I have been looking for that some days ago, and I found the jenia4faces library.
With the DataTools family components you can do theses things (I haven't try it at this momment, but with other jenia components I have no problems with seam, so I suposse that it will work).
Thanks alot man, I tried it and it worked fine. thanx again....
But there is a little performace issue, I am using DataModel and i loads whole of the data in it from the DataBase. Now this data can be up to thousands of records. Now this raises the memory issue, the server may ran out of memory. how can i solve this issue.
I mean it would be better if it get, suppose 100 records and populate it in the datamodel and on the jsf page it shows 10 records at a time. when we reach the 11th page then it fetches the next 100 records.
Is it possible?
Thanx again man for the reference and everything.
The Query API may help.
Query setFirstResult(int startPosition) Set the position of the first result to retrieve. Query setMaxResults(int maxResult) Set the maximum number of results to retrieve.
Look at EntityQuery in the Seam application framework. You can get a paginated query perfect for populating a datatable in just a few minutes.
First of all thank you for your support, its very nice of you,
The scenario on which I am working is, I want pagination which i have been able to do with the jenia's library. And i want grid facility in it, which is provided by the seam by using the @DataModel and @DataModelSelection.
Now the only problem which I see in what i did is, the memory. Now my DataModel fetches the full resultset from the db which might get up to 1 million records. In this case how can i efficiently use my DataModel to fetch only chunks of records not full list.
the pagination of google search is great I wonder how can we do that in seam using the datamodel.
any advice which you can give, I will be gratefull
thank you in advance
Dear Norman Richards,
can you plz send me a sample code for the EntityQuery, or any hint. other than EntityQuery :) thanx
Take a look at the booking example, in particular HotelSearchingAction.