04-08-2010 01:36 PM
fileFolderService.listFiles(spaceNodeRef)
, this service return ALL files… So it is not possible to use this service's method… ops: searchService.query(params);
, by setting a limit of record to return params.setLimit(limit); params.setLimitBy(LimitBy.FINAL_SIZE);
. So for the first page, I will fixe the limit to 10 (if I want 10 files per page). for the second page, I will fixe the limit to 20 (and I will filter the result list to take the last 10 files…), and so one… So If I want to see the page #15, I will oblige to set the limit to 150 !! So you can imagine that for first pages my solution is simple, but for all last pages it is the same solution than using fileFolderService.listFiles(spaceNodeRef)
…
// Create the model object
HashMap model = new HashMap(1, 1.0f);
TemplateNode templateNode = new TemplateNode(spaceNodeRef, this.serviceRegistry, null);
model.put("thespace", templateNode);
// Template freemarker
String xChilds = super.getTemplateService().processTemplateString("freemarker", "<#list thespace.children as child><#if child.isDocument>x</#if></#list>", model);
int totalGeneral = xChilds.length();
Ok I agree that it is not the best solution… but how to know the number of file in a space !???setSkipCount(int skipCount) with the exaplaintation => Set the skip count - the number of rows to skip at the start of the query.
04-13-2010 08:27 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.