cancel
Showing results for 
Search instead for 
Did you mean: 

Get childs node paginated

nonets
Champ on-the-rise
Champ on-the-rise

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 3

afaust
Legendary Innovator
Legendary Innovator

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
Star Contributor
Star Contributor

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

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

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