Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » Pagination for data coming from a OSGi Persistence Service
Pagination for data coming from a OSGi Persistence Service [message #820393] Wed, 14 March 2012 04:10 Go to next message
Cristiano Gavião is currently offline Cristiano GaviãoFriend
Messages: 279
Registered: July 2009
Senior Member
Hi,

Currently I have a persistence bundle (using gemini JPA + eclipselink) that exposes some business data services. Basically the methods of those services returns collection of entity pojos.

what would be the best approach to use the pagination widget for presenting data from my persistence service?

should I modify the query methods somehow to return just a number of entities at time?

cheers,

Cristiano
Re: Pagination for data coming from a OSGi Persistence Service [message #825187 is a reply to message #820393] Tue, 20 March 2012 15:26 Go to previous message
Angelo ZERR is currently offline Angelo ZERRFriend
Messages: 122
Registered: July 2009
Senior Member
Hi Christiano,

We uses Nebula Pagination Control in our Eclipse RCP/RAP XDocReport http://xdocreport-rap.opensagres.cloudbees.net/xdocreport?startup=fr.opensagres.xdocreport.eclipse.ui.application (and you can browse source at http://code.google.com/p/xdocreport/source/browse/?repo=eclipse)

We uses Eclipse Gemini Blueprint, EclipseLink, JPA but with Spring Data, which is very very impressive (no need to code your JPA Query for CRUD). So I suggest you to use it.

Nebula Pagination Control provides the capability to paginate by using ResultPage structure, but it's extensible and we have created an extension to works with Spring Data Structure (Pageable, Page) (see http://code.google.com/p/xdocreport/source/browse/?repo=eclipse#git%2Fcommons%2Forg.eclipse.nebula.widgets.pagination.springdata)

We have an abstract class SearchDialog http://code.google.com/p/xdocreport/source/browse/commons/fr.opensagres.xdocreport.eclipse.ui/src/fr/opensagres/xdocreport/eclipse/ui/dialogs/SearchDialog.java?repo=eclipse which implements org.eclipse.nebula.widgets.pagination.springdata.ISpringDataPageLoader

(See the code in this classto create the Pagination Control with Spring Data).

Here an example of implementation of SearchDialog http://code.google.com/p/xdocreport/source/browse/dynaresume/org.dynaresume.eclipse.search.ui/src/org/dynaresume/eclipse/search/ui/dialogs/SearchResumeDialog.java?repo=eclipse

public Page<Resume> loadPage(PageableController controller) {
  return resumeService.findByFirstNameAndLastName(firstNameCriteria, lastNameCriteria, (Pageable) controller);
}


This method implements ISpringDataPageLoader to load paginated data with Spring Data.

Hope my explanation will help you.

Regards Angelo
Previous Topic:Center text in GridColumnGroup
Next Topic:CalendarCombo: how can I open the calendar with another month then the actual month?
Goto Forum:
  


Current Time: Thu Apr 25 17:52:49 GMT 2024

Powered by FUDForum. Page generated in 0.03311 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top