From d1fab1b96e75d96eaa5b5840a924ea268888996d Mon Sep 17 00:00:00 2001 From: Patrick Schmitz Date: Thu, 17 Dec 2009 20:15:10 +0000 Subject: [PATCH] NOJIRA - Fixed missing setup call to make vocabulary items support pagination. --- .../services/vocabulary/VocabularyResource.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/services/vocabulary/service/src/main/java/org/collectionspace/services/vocabulary/VocabularyResource.java b/services/vocabulary/service/src/main/java/org/collectionspace/services/vocabulary/VocabularyResource.java index 359580097..9b6737ab7 100644 --- a/services/vocabulary/service/src/main/java/org/collectionspace/services/vocabulary/VocabularyResource.java +++ b/services/vocabulary/service/src/main/java/org/collectionspace/services/vocabulary/VocabularyResource.java @@ -402,8 +402,11 @@ public class VocabularyResource extends AbstractCollectionSpaceResource { // Note that docType defaults to the ServiceName, so we're fine with that. ServiceContext ctx = MultipartServiceContextFactory.get().createServiceContext(null, getItemServiceName()); DocumentHandler handler = createItemDocumentHandler(ctx, parentcsid); - DocumentFilter myFilter = new DocumentFilter( - "vocabularyitems_common:inVocabulary='" + parentcsid + "'", 0, 0); + MultivaluedMap queryParams = ui.getQueryParameters(); + DocumentFilter myFilter = + DocumentFilter.CreatePaginatedDocumentFilter(queryParams); + myFilter.setWhereClause( + "vocabularyitems_common:inVocabulary='" + parentcsid + "'"); handler.setDocumentFilter(myFilter); getRepositoryClient(ctx).getFiltered(ctx, handler); vocabularyItemObjectList = (VocabularyitemsCommonList) handler.getCommonPartList(); -- 2.47.3