0

I am creating web application for booking tickets. After querying from DB for given inputs now i have 230 records (ticket informations) which has been added to list ,as objects (pojo's) .in JSF i am using "ui:repeat" to iterate the list. Here got confused how to create pagination on this. (i want to display 40 records /page). I should not hit the backend for each and every "NEXT" or "PREVIOUS" click .. Any help would be thankful.

Note: when i hit search button my flow will navigate to result.jsf page where i passed the 230 records for display. Technology: Spring web flow and JSF 2

Manu
  • 3,179
  • 23
  • 57
  • 69
  • I hope this [answer](http://stackoverflow.com/questions/3519569/jsf2-paging-pager-for-repeater) could help – landal79 Jan 08 '14 at 16:06
  • If you don't want to perform ajax requests when next-previous clicking, you'll need to use javascript to hide/show each page. You'll probably need to play with `ui:repeat`'s `varStatus` properties to assign-locate page id's and you'll also need an `h:panelGroup` or a `div` in order to wrap each page's content. – Aritz Jan 09 '14 at 07:47

1 Answers1

-1

simplest solution is to use PrimeFaces DataTable Pagination or equivalent without reinventing the wheel

Michele Mariotti
  • 7,372
  • 5
  • 41
  • 73
  • Since application is for ticket booking (need to show many records) and requires more customization in UI(front end) to display data. using primeface framework will it be good???. – Manu Jan 21 '14 at 17:58
  • I think you MUST use it! IMO PF is the best UI framework (for JSF) out there: has a component for every need, but payback is that you need time to know well each one. Check the showcase to get an idea ;) – Michele Mariotti Jan 21 '14 at 21:05