Skip to content

Commit

Permalink
LPS-86636 Use total count to fix pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduardo Garcia authored and brianchandotcom committed Oct 24, 2018
1 parent 72b8935 commit 87607db
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ public SearchContainer getOrganizationSearchContainer()
organizationSearchContainer.getStart(),
organizationSearchContainer.getEnd());

total = organizations.size();
total = _organizationODataRetriever.getResultsCount(
segmentsEntry.getCompanyId(), segmentsEntry.getCriteria(),
_themeDisplay.getLocale());
}
catch (PortalException pe) {
_log.error(
Expand Down Expand Up @@ -329,12 +331,14 @@ public SearchContainer getUserSearchContainer() throws PortalException {
"no-users-were-found-that-matched-the-segment-criteria");

try {
total = _userODataRetriever.getResultsCount(
segmentsEntry.getCompanyId(), segmentsEntry.getCriteria(),
_themeDisplay.getLocale());

users = _userODataRetriever.getResults(
segmentsEntry.getCompanyId(), segmentsEntry.getCriteria(),
_themeDisplay.getLocale(), userSearchContainer.getStart(),
userSearchContainer.getEnd());

total = users.size();
}
catch (PortalException pe) {
_log.error(
Expand Down

0 comments on commit 87607db

Please sign in to comment.