Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
lou cat
document library display: limited max folders?
November 15, 2012 9:32 AM
Answer

lou cat

Rank: Regular Member

Posts: 196

Join Date: January 26, 2012

Recent Posts

Hello!

In LR 6.0.6 (and for sure also in 5.2) it doesn't seem possible to display more than a certain numbers of folders in the configuration view..
For example if I have 40 subfolders and I try to choose one of those sub-folders as root from the configuration of the portlet, it won't show me more than 27 folders so I'm not able to display as root the folders from 28 to 40!

Does it have anything to do with this?

http://www.liferay.com/community/wiki/-/wiki/Main/SQL+Query+Limits+and+the+Document+Library

Can you please suggest a way to fix this (or explaining it a bit better than in that wiki)?

thanks!!
lou cat
RE: document library display: limited max folders?
November 16, 2012 7:46 AM
Answer

lou cat

Rank: Regular Member

Posts: 196

Join Date: January 26, 2012

Recent Posts

Ok I've found a fix that works for me:

I created a jsp hook for /html/portlet/document_library/select_folder.jsp

and I replaced

List results = DLFolderServiceUtil.getFolders(scopeGroupId, folderId, searchContainer.getStart(), searchContainer.getEnd());

that was giving a results.size = 20 even if the number of folders were more than 20

with
List results = DLFolderServiceUtil.getFolders(scopeGroupId, folderId, searchContainer.getStart(), total);

where total has been calculated before as: int total = DLFolderServiceUtil.getFoldersCount(scopeGroupId, folderId);