Best practice to create paginated display of custom components

Hi Vaadin Experts,

I’m in the development of a Liferay Portlet and I’m using Vaadin as the UI Framework. I have created custom component to render the records of my ServiceBuilder generated entities. I don’t want to show too much of them on the same page, as they takes big space of the screen, so I want to display only 5 at once. As the users wont be able to find out all the data they could use to filter the results to show only 5 or less items, I want to enable pagination for the list of the components.

The question is, whether there is a best practice/trick/hint what could help me with this issue?

I saw paginable tables, but I didn’t defined datasource yet and not sure whether I need that to do what I want.

Currently I have the entities, from the DB and the component to render them. Now I limit the result to 5 so I cannot navigate on my layout to the next 5 components.

It’s OK to write it from scratch if there’s no already implemented solution, just need some pattern to follow.

Regards,
Vilmos

Any suggestions?

As far as I remember, the last time we needed pagination we created it from scratch. It is quite straightforward with Liferay service builder, You can add navigation buttons and send start/end parameters to ServiceUtil methods. Filters are different story.