Questions tagged [pagination]

Pagination is the process of dividing information into discrete pages.

Pagination is the process of dividing information into discrete pages. Pagination is often used for the purpose of printing or searching information.

Pagination in Web content (HTML, ASP, PHP, and others)

On the Internet, pagination is used for such things as displaying a limited number of results on search engine results pages, or showing a limited number of posts when viewing a forum thread. Pagination is used in some form in almost every web application to divide returned data and display it on multiple pages. Pagination also includes the logic of preparing and displaying the links to the various pages.

Links

Wikipedia Pagination

17657 questions
45
votes
10 answers

How can I paginate a merged collection in Laravel 5?

I am creating a stream which contains two types of objects, BluePerson and RedPerson. To create the stream, I fetch all of both objects, then merge them into one collection. After doing so, I need to paginate them, however paginate is for eloquent…
KinsDotNet
  • 1,500
  • 5
  • 25
  • 53
45
votes
3 answers

How to correctly use PagedResourcesAssembler from Spring Data?

I'm using Spring 4.0.0.RELEASE, Spring Data Commons 1.7.0.M1, Spring Hateoas 0.8.0.RELEASE My resource is a simple POJO: public class UserResource extends ResourceSupport { ... } My resource assembler converts User objects to UserResource…
Benjamin M
  • 23,599
  • 32
  • 121
  • 201
44
votes
3 answers

jQuery DataTables Pagination Size

I've been using jQuery DataTables plugin ( http://datatables.net ) for quite some time and usually we're super fine using the default sizes and using "bStateSave": true option. But now I really need to set the sizing of the pagination not as…
Sam
  • 16,435
  • 6
  • 55
  • 89
43
votes
3 answers

Paginating text in Android

I am writing a simple text/eBook viewer for Android, so I have used a TextView to show the HTML formatted text to the users, so they can browse the text in pages by going back and forth. But my problem is that I can not paginate the text in…
Ho1
  • 1,239
  • 1
  • 11
  • 29
43
votes
7 answers

Python requests arguments/dealing with api pagination

I'm playing around with the Angel List (AL) API and want to pull all jobs in San San Francisco. Since I couldn't find an active Python wrapper for the api (if I make any headway, I think I'd like to make my own), I'm using the requests library. The…
crock1255
  • 1,025
  • 2
  • 12
  • 23
42
votes
5 answers

Rails 3 pagination, will_paginate vs. Kaminari

My setup: Rails 3.0.9, Ruby 1.9.2 I'm looking into a pagination solution for my app and saw that there is a new-ish gem Kaminari compared to the trusty will_paginate. It looks like will_paginate wasn't updated for awhile but has since came back with…
Bob
  • 8,424
  • 17
  • 72
  • 110
42
votes
13 answers

JDBC Pagination

I want to implement pagination using JDBC. The actual thing I want to know is "How can i get first 50 and then next 50 records from database for page 1 and 2 respectively" My Query is Select * from data [data table contains 20,000 rows] For page #1…
Zeeshan
  • 1,173
  • 5
  • 19
  • 26
42
votes
14 answers

Limit amount of links shown with Laravel pagination

Any easy way to limit how many links are shown with Laravels pagination? Currently it shows 13 links at most (Prev, 1 2 3 4 5 7 8 .. 78 79 next) This however is too much for mobile devices and becomes a two line navigation... is there any way to set…
Lovelock
  • 7,689
  • 19
  • 86
  • 186
41
votes
9 answers

Changing pagination colour Bootstrap

Here is my pagination control: I am trying to make the labels of the pagination purple, so far I have been unable to override it. Here is my CSS: /* pagination */ .pagination { height: 36px; margin: 18px 0; color:…
user3754111
  • 859
  • 1
  • 10
  • 20
41
votes
7 answers

ui-bootstrap pagination resetting current page on initialization

I am using the pagination directive from the ui-bootstrap (angular-bootstrap) library. I am having an issue when it initializes. My issue occurs when I navigate to a specific page via url. What is happening is that my controller initializes with…
pcgilday
  • 1,032
  • 2
  • 10
  • 15
41
votes
11 answers

Is there a more efficient way of making pagination in Hibernate than executing select and count queries?

Usually pagination queries look like this. Is there a better way instead of making two almost equal methods, one of which executing "select *..." and the other one "count *..."? public List findCats(String name, int offset, int limit) { …
serg
  • 109,619
  • 77
  • 317
  • 330
40
votes
6 answers

Get total number of results with pagination

I'd like to get the total number of users on a page where all the users are listed. This page should be paginated. So far, this is what I've come up with: Controller $users = User::paginate(10); return View::make('index',…
PeterInvincible
  • 2,230
  • 5
  • 34
  • 62
39
votes
6 answers

Random order & pagination Elasticsearch

In this issue is a feature request for ordering with optional seed allowing for recreation of random order. I need to be able to paginate random ordered results. How could this be be done with Elasticsearch 0.19.1 ? Thanks.
Yeggeps
  • 2,055
  • 2
  • 25
  • 34
39
votes
2 answers

How to use MongoDB aggregation for pagination?

I want to perform an aggregation query that does basic pagination: Find all orders that belongs to a certain company_id Sort the orders by order_number Count the total number of documents Skips to e.g. document number 100 and passes on the…
JohnSmith1976
  • 536
  • 2
  • 12
  • 35
39
votes
3 answers

pagination logic in calculating total of pages

I'm using a react component that need me to pass in below prop I can't figure out the calculation as in the api I have total_items, not totalPages. if I have 50 total_items, how can I produce 5…
Cecilia Chan
  • 679
  • 2
  • 8
  • 17