Directory

← Back

Paginator

Web Component providing an easy way to display a full functioning paginator.

Author

Rating

Popularity

100+

Usage

Paginator is a Web Component , that provides an easy way to display a full functioning paginator on a webpage. It provides ability to navigate through list of pages, by clicking on page number or First/Last buttons.

Client-side implementation

This is the server-side (Java) API for Vaadin Platform for the vcf-paginator component. Looking for the client-side version? It can be found here: https://vaadin.com/directory/component/vaadin-component-factoryvcf-paginator

License & Author

This Add-on is distributed under Apache 2.0

Component Factory Paginator is written by Vaadin Ltd.

Major pieces of development of this add-on has been sponsored by multiple customers of Vaadin. Read more about Expert on Demand at: Support and Pricing

Sample code

Paginator paginator = new Paginator(10, 1, "beginning", "end");

paginator.addChangeSelectedPageListener(event -> {
    h3.setText("Page: " + event.getPage());
});
Grid<Person> grid = new Grid<>();

grid.addColumn(Person::firstName);
grid.addColumn(Person::lastName);

List<Person> people = generatePeople(100);

Paginator gridPaginator = new Paginator();

int numberItems = people.size();
int itemsPerPage = 10;
int numberPages = numberItems / itemsPerPage;

gridPaginator.setNumberOfPages(numberPages);

gridPaginator.addChangeSelectedPageListener(event -> {
    loadItems(people,grid,event.getPage(),itemsPerPage);
});

loadItems(people,grid,1,itemsPerPage);
add(grid,gridPaginator);

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Update to Vaadin 14 and change the license to Apache 2.0

Released
2020-12-10
Maturity
STABLE
License
Apache License 2.0

Compatibility

Framework
Vaadin 14
Vaadin 10+ in 1.1.0
Browser
N/A

Paginator - Vaadin Add-on Directory

Web Component providing an easy way to display a full functioning paginator. Paginator - Vaadin Add-on Directory
## Usage Paginator is a Web Component , that provides an easy way to display a full functioning paginator on a webpage. It provides ability to navigate through list of pages, by clicking on page number or First/Last buttons. ### Client-side implementation This is the server-side (Java) API for Vaadin Platform for the vcf-paginator component. Looking for the client-side version? It can be found here: https://vaadin.com/directory/component/vaadin-component-factoryvcf-paginator ## License & Author This Add-on is distributed under Apache 2.0 Component Factory Paginator is written by Vaadin Ltd. ### Sponsored development Major 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)
Online