Get childs node paginated

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
nonets
Active Member

Get childs node paginated

We're currently getting all child nodes using this java code:

NodeRef nodeRef = ...;

AlfrescoModelAssocList childAssocs = new AlfrescoModelAssocList(nodeService.getChildAssocs(nodeRef);

for (AlfrescoModelAssoc childAssoc : childAssocs) {

    /*...*/

}

We're are looking up a way to get those children nodes, but using pagination.

Is there anyway to get it?

We're using 4.2.f version.

Thanks.

3 Replies
afaust
Master

Re: Get childs node paginated

The only service API which provides pagination for child elements is the FileFolderService#list operation, which inherently restricts the potential child node types to regular cm:folder, cm:content and their sub-types, with the exclusion of cm:systemfolder and sub-types.

roberto_gamiz
Established Member II

Re: Get childs node paginated

Hello,

 

You could try to encapsulate the call to getChildAssocs in a function that accept a PagingRequest parameter and return a PagingResults value.

 

You must handle yourself the creation of the object PagingResults in the new function.

 

Regards

nonets
Active Member

Re: Get childs node paginated

Could you please provide any atraightforward helping code about how to get it.

Please, also remember I'm using 4.2.f java code.