Fórum

Image not viewable in folder

simon maskell, modificado 12 Anos atrás.

Image not viewable in folder

New Member Postagens: 5 Data de Entrada: 27/03/12 Postagens Recentes
I am using the below code to create a folder but when I add images to the folder the # no entries is incremented in the folder but I can't see the images. I have found that if I go in and edit the folder make no changes and then save, I am able to then see the images in the folder.

Has anyone got a fix for this?


IGFolder igFolder;
try {
igFolder = IGFolderLocalServiceUtil.getFolder(groupId, 10398, actionRequest.getRemoteUser());
} catch (Exception e) {
_log.info("create folder " + actionRequest.getRemoteUser());
igFolder = IGFolderLocalServiceUtil.createIGFolder(CounterLocalServiceUtil.increment());
igFolder.setGroupId(groupId);
igFolder.setUserId(Long.valueOf(actionRequest.getRemoteUser()));
igFolder.setCompanyId(PortalUtil.getCompanyId(actionRequest));
igFolder.setParentFolderId(10398);
igFolder.setDescription("");
igFolder.setCreateDate(new Date());
igFolder.setName(actionRequest.getRemoteUser());
IGFolderLocalServiceUtil.updateIGFolder(igFolder, false);
IGFolderLocalServiceUtil.addFolderResources(igFolder, true, true);

IGFolderUtil.cacheResult(igFolder);

}
thumbnail
David H Nebinger, modificado 12 Anos atrás.

RE: Image not viewable in folder

Liferay Legend Postagens: 14916 Data de Entrada: 02/09/06 Postagens Recentes
You may need to reindex after the image add...