留言板

LR 6.1.1 adding DLFolder programatically

thumbnail
mohammad azaruddin,修改在11 年前。

LR 6.1.1 adding DLFolder programatically

Expert 帖子: 492 加入日期: 12-9-17 最近的帖子
Hi all
i'm creating dlfolder using
DLFolder dlFolder=DLFolderLocalServiceUtil.addFolder(themeDisplay.getUserId(),
themeDisplay.getScopeGroupId(),0L,mountPoint,0L,foldername,
description, serviceContext);


Folder is stored in database dlfolder table.but not visible as shown in attachment.

And i'm getting error
11:08:45,743 ERROR [IncludeTag:426] Current URL /group/control_panel/manage?p_p_id=20&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&doAsGroupId=10180&refererPlid=10183 generates exception: com.liferay.portal.kernel.repository.RepositoryException: No Repository exists with the primary key 0
11:08:45,746 ERROR [IncludeTag:154] com.liferay.portal.kernel.repository.RepositoryException: No Repository exists with the primary key 0
thumbnail
Prakash Khanchandani,修改在11 年前。

RE: LR 6.1.1 adding DLFolder programatically

Expert 帖子: 329 加入日期: 11-2-10 最近的帖子
Pass the groupId as the repositoryId instead of passing 0L.
thumbnail
mohammad azaruddin,修改在11 年前。

RE: LR 6.1.1 adding DLFolder programatically

Expert 帖子: 492 加入日期: 12-9-17 最近的帖子
Prakash Khanchandani:
Pass the groupId as the repositoryId instead of passing 0L.


Thanks for ur reply :-)
how to get default repositoryId .Is it possible to create new repository programatically..?i have created one folder using control panel and group id is stored as 10180 in DB.
thumbnail
mohammad azaruddin,修改在11 年前。

RE: LR 6.1.1 adding DLFolder programatically

Expert 帖子: 492 加入日期: 12-9-17 最近的帖子
hi
Prakash Khanchandani:
I use
themeDisplay.getLayout().getGroupId()

Thank you.It works fineemoticon
thumbnail
Mika Koivisto,修改在11 年前。

RE: LR 6.1.1 adding DLFolder programatically

Liferay Legend 帖子: 1519 加入日期: 06-8-7 最近的帖子
Don't use any DLxxxx in 6.1+ it's internal implementation for LiferayRepository. The correct service to use is DLAppService.