cancel
Showing results for 
Search instead for 
Did you mean: 

Sorting and pagination queries in ADF

ranjeetsi
Star Contributor
Star Contributor

Specifications: Alfresco 5.2.3 enterprise, ADF 3.4

 

·         Considering 100 documents in a folder, and Item per page as 25,  when we navigate through the document library in ADF, we have a requirement of sorting documents by ‘Created date’ (oldest to newest) which we have implemented and works fine if we see the first page. If we go to 2nd page (i.e second set of documents – no. 26 to 50), the sorting starts again for the new set of documents. For example: 1st page gives 25 documents (starting from Sep 15 to Sep 30), 2nd page which gives 25 documents does not start from Sep 30. It seems like for each click of page (items per page), it is fetching a separate set of documents from back end and performing sort on that new set. This is not matching our requirement. Normally when user navigates to next page, he is expecting sort order to start from the same date as left on previous page.

 

·          There is a default behavior with ADF and share document library that when the user clicks the column (example: Created date), the sorting of docs is done based on the created date. And the same sorting order is carried forward to all next pages or folders where he navigates. Our requirement is that user wants different sorting order for different set of folders (taxonomy folders in our project) – which we have set it and works fine, but we have to keep it fixed. User cannot change it when clicked on document library column. What user is asking is – they want the sorting order fixed when they navigate inside that particular folder but along with that, they should also be able to change sorting order by clicking on any columns. This scenario is not working. Either we are able to make columns fixed (folder wise), OR make it allowable for users to change sort order under any folders.

Alfresco Content Services Certified Engineer (ACSCE)
3 REPLIES 3

dvuika
Star Collaborator
Star Collaborator

I can confirm that certain components use client-side sorting instead of server-side sorting, that is why you see such behaviour.

ranjeetsi
Star Contributor
Star Contributor

Do we have any way to do sorting/pagination as per our requirement. Page wise.

Alfresco Content Services Certified Engineer (ACSCE)

srikanth94
Confirmed Champ
Confirmed Champ

Hi ranjeetsi,

We came across the same issue as you mentioned

"For example: 1st page gives 25 documents (starting from Sep 15 to Sep 30), 2nd page which gives 25 documents does not start from Sep 30. It seems like for each click of page (items per page), it is fetching a separate set of documents from back end and performing sort on that new set."

What i observed is the sorting is happening only on the chuncks of documents that are present in particular page.

Where you able to solve this issue, making the documents appear in an order when we navigate, instead of chuncks. If so please let us know how you were able to achive the Ordering of documents