Hello,
for one of our projects we implemented class called Paging. This class has
interface which is easy to use at client side (pageSize, currentPage) and
method which should calculate maxResults from this parameters.
Paging has also boolean parameter "count" which will force service
to return number of rows matching criteria and calculate maxPages for
better GUI handling.
Return parameter from service method return Paging and result set was embeded
inside Paging. GUI paging component is nativelly working with Paging.

When "count" is set to false another parameter in Paging will say how many
pages forward we have to look that GUI can show only so many pages forward
in pager.

GUI handling in pager isn't as simple as it looks and every service
call is expensive.

Pavel


On Sun, Nov 23, 2008 at 11:03 AM, Steffen Stundzig <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> what i mean is, e.g. on each findAll we could generate two findAll methods
> in services and/or repositories. The first is the current one, the second
> (new) contains 2 additional parameters (int firstResult, int maxResults). So
> we are compatible with older versions.
>
> These parameters could we very simple propagated to the criteria based
> FinderAccessApi-classes with criteria.setMaxResults() and so on.
>
> These feature is generic and should be paramterizable per
> generate.pagination.
>
> I'm implementing it in my local sculptor-generator project and be very
> appreciated if it could be in the main trunk. So the diff between the
> generator branches is a little bit smaller. ;-)
>
> I don't know how we could implement this without hibernate but with real
> JPA, but I'm sure it's possible.
>
>
> What do you mean?
>
> regards
>   Steffen...
>
>
> --
> View this message in context: 
> http://www.nabble.com/-sculptor--pagination-tp20636538s17564p20644645.html
> Sent from the Fornax-Platform mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Fornax-developer mailing list
> Fornax-developer@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fornax-developer
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Fornax-developer mailing list
Fornax-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Reply via email to