• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to implement custom pagenation in jsf f table

 
raj talatam
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i want to implement custom pagenation , lets say i have 98 records i want to display them in 10 in a page , if i click on forward button it has to show next ten records if i click on previous ,last ten records has to show..


Thanks
Rajendar
 
Tim Holloway
Bartender
Posts: 18414
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's a lot easier/faster/cheaper to simply employ one of the JSF extension tagsets that provide table pagination. You don't have to spend a lot of time designing and debugging what has been done many times before.

However, basically, the dataTable's backing Model object (DataModel) is the reference for the data that gets displayed. By making this model be a subset window onto the larger data set that you want to page through, you can display as many or as few lines in the table as you like. When the user clicks a table nagivation button, just update the wrapped data collection for the datamodel to reference the rows that the updates View should show.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!