Uploaded image for project: 'Grouper'
  1. Grouper
  2. GRP-942

send total number of elements back on paged call



    • Type: New Feature
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.4.0
    • Component/s: WS
    • Labels:


      I could look into that too… btw, you can chain up your find groups calls in weird ways… if you have a simple call like the one you suggest, then the paging will work, if it is more complex, then not.

      From: Geert van der Ploeg gvanderploeg
      Sent: Thursday, October 17, 2013 9:38 AM
      To: Chris Hyzer
      Cc: grouper-users
      Subject: Re: [grouper-users] Grouper client: getting total result count when performing paginated query


      I would certainly be interested in a fix for this feature. We use 2.1.5 right now, a patched version of that release would work fine for us.
      By the way, would the same fix work for a likewise call to GetGroups?
      WsGetGroupsResults results = new GcGetGroups()

      Some background information: Currently I'm working on replacing our 1.6.3 Grouper installation with an up to date version. This also includes removing some direct database calls to the Grouper database and replace them with proper calls to the Grouper web service.
      Pagination is one key issue to be solved, the other one is getting a list of 'my groups', but filtered on (part of) the group name (and paginated as well). Maybe this will result in a feature request as well, but we will see.

      Thank you!


      On 17 October 2013 14:34, Chris Hyzer <mchyzer> wrote:
      Unfortunately right now it doesn’t return that right now. I could probably add that in for you if you wanted to get the latest 2.1.4 and rebuild, is that something you are interested in?


      From: grouper-users-request grouper-users-request On Behalf Of Geert van der Ploeg
      Sent: Thursday, October 17, 2013 5:56 AM
      To: grouper-users
      Subject: [grouper-users] Grouper client: getting total result count when performing paginated query

      Hi all,

      I'm trying to use Grouper client to get a list of groups, but I want the results paginated.
      So I include a WsQueryFilter to contain a pageSize and pageNumber.
      This indeed returns a paged 'slice' of the results.

      But how can I figure out the total result count of the request (if it weren't paginated)?
      Only then I could render a message like "Displaying results 11-20 of 87" and decide whether to hide/show 'next page' links etc, in my user interface.

      Code I use right now:
      WsQueryFilter filter = new WsQueryFilter();
      String personId = "urn:collab:person:example.com:admin";
      WsFindGroupsResults results = new GcFindGroups()
      .assignActAsSubject(new WsSubjectLookup(personId, null, null))

      Running the same query but without filter would probably return the whole set. But that would defeat the purpose of the pagination (not having to query a huge list of groups).

      Thanks for any hints.

      Kind regards,

        Smart Checklist




              chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
              chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
              0 Vote for this issue
              1 Start watching this issue