{"id":19655919,"url":"https://github.com/vaadin-component-factory/paginator","last_synced_at":"2025-10-04T01:40:21.629Z","repository":{"id":47468629,"uuid":"184378449","full_name":"vaadin-component-factory/paginator","owner":"vaadin-component-factory","description":"Java API for vcf-paginator","archived":false,"fork":false,"pushed_at":"2021-08-30T16:26:23.000Z","size":122,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-27T02:18:27.695Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vaadin-component-factory.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-01T06:36:53.000Z","updated_at":"2020-12-10T12:11:18.000Z","dependencies_parsed_at":"2022-09-15T17:50:50.709Z","dependency_job_id":null,"html_url":"https://github.com/vaadin-component-factory/paginator","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/vaadin-component-factory/paginator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaadin-component-factory%2Fpaginator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaadin-component-factory%2Fpaginator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaadin-component-factory%2Fpaginator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaadin-component-factory%2Fpaginator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vaadin-component-factory","download_url":"https://codeload.github.com/vaadin-component-factory/paginator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaadin-component-factory%2Fpaginator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278254470,"owners_count":25956598,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-03T02:00:06.070Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T15:24:58.686Z","updated_at":"2025-10-04T01:40:21.611Z","avatar_url":"https://github.com/vaadin-component-factory.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Component Factory Paginator for Vaadin 10+\n\nThis is server-side component of [\u0026lt;vcf-paginator\u0026gt;](https://github.com/vaadin-component-factory/vcf-paginator) Web Component.\nIt displays full functioning paginator on a webpage.\n\n[Live Demo ↗](https://incubator.app.fi/paginator-demo/paginator)\n\n[\u003cimg src=\"https://raw.githubusercontent.com/vaadin/incubator-paginator/master/screenshot.png\" width=\"400\" alt=\"Screenshot of incubator-paginator\"\u003e](https://vaadin.com/directory/component/vaadinincubator-paginator)\n\n\n## Usage\n\nA simple use of the paginator component would be the following: create paginator, set total pages number, current page number \nand optionally, text for first and last page buttons. Add paginator to page and add listener for change of selected page to paginator.\n```\n// 10 pages, current page 1\nPaginator paginator = new Paginator(15, 1, \"First\", \"Last\");\n\npaginator.addChangeSelectedPageListener(event -\u003e {\n    h3.setText(\"Page: \" + event.getPage());\n});\n```\n\n### With a grid\nThe content of the grid can be displayed in a paginated way using the paginator.\nThis requires some basic configuration of the grid and the paginator.\n\n```java\nGrid\u003cPerson\u003e grid = new Grid\u003c\u003e();\n\ngrid.addColumn(Person::firstName);\ngrid.addColumn(Person::lastName);\n\nList\u003cPerson\u003e people = generatePeople(100);\n\nPaginator gridPaginator = new Paginator();\n\nint numberItems = people.size();\nint itemsPerPage = 10;\nint numberPages = numberItems / itemsPerPage;\n\ngridPaginator.setNumberOfPages(numberPages);\n\ngridPaginator.addChangeSelectedPageListener(event -\u003e {\n    loadItems(people,grid,event.getPage(),itemsPerPage);\n});\n\nloadItems(people,grid,1,itemsPerPage);\nadd(grid,gridPaginator);\n```\n\n\n## Setting up for development:\n\nClone the project in GitHub (or fork it if you plan on contributing)\n\n```\ngit clone git@github.com/vaadin-component-factory/paginator.git\n```\n\nTo build and install the project into the local repository run \n\n```mvn install -DskipITs```\n\nin the root directory. `-DskipITs` will skip the integration tests, which require a TestBench license. If you want to run all tests as part of the build, run\n\n```mvn install```\n\n## Demo\n\nThe Demo can be run going to the project paginator-demo and executing the maven goal:\n\n```mvn jetty:run```\n\n\n## License \u0026 Author\n\nThis Add-on is distributed under Apache 2.0\n\nComponent Factory Paginator is written by Vaadin Ltd.\n\n### Sponsored development\nMajor pieces of development of this add-on has been sponsored by multiple customers of Vaadin. Read more  about Expert on Demand at: [Support](https://vaadin.com/support) and  [Pricing](https://vaadin.com/pricing)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaadin-component-factory%2Fpaginator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaadin-component-factory%2Fpaginator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaadin-component-factory%2Fpaginator/lists"}