Fórum
Error template freemarker use method getPreviewURL
Patricia Hevia, modificado 9 Anos atrás.
Error template freemarker use method getPreviewURL
Junior Member Postagens: 69 Data de Entrada: 24/03/11 Postagens Recentes
Hello,
I am developing templates with freemarker, I use this code:
<#assign dlFolderLocalService = serviceLocator.findService('com.liferay.portlet.documentlibrary.service.DLFolderLocalService')/>
<#assign dlFolder = dlFolderLocalService.getDLFolderByUuidAndGroupId(dummy.folderId, getterUtil.getLong(groupId))/>
<#assign dlFileLocalService = serviceLocator.findService('com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService') />
<#assign fileEntries = dlFileLocalService.getFileEntries(getterUtil.getLong(groupId), dlFolder.folderId)/>
<# assign urlFile = dlUtil.getPreviewURL (fileEntries[0], fileEntries[0].getVersion (), themeDisplay, "") />
But I get the following error:
An error occurred while processing the template.
No signature of method matches the arguments getPreviewURL
Can anyone help me?
Thank you very much!.
I am developing templates with freemarker, I use this code:
<#assign dlFolderLocalService = serviceLocator.findService('com.liferay.portlet.documentlibrary.service.DLFolderLocalService')/>
<#assign dlFolder = dlFolderLocalService.getDLFolderByUuidAndGroupId(dummy.folderId, getterUtil.getLong(groupId))/>
<#assign dlFileLocalService = serviceLocator.findService('com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService') />
<#assign fileEntries = dlFileLocalService.getFileEntries(getterUtil.getLong(groupId), dlFolder.folderId)/>
<# assign urlFile = dlUtil.getPreviewURL (fileEntries[0], fileEntries[0].getVersion (), themeDisplay, "") />
But I get the following error:
An error occurred while processing the template.
No signature of method matches the arguments getPreviewURL
Can anyone help me?
Thank you very much!.
Zsigmond Rab, modificado 9 Anos atrás.
RE: Error template freemarker use method getPreviewURL
Liferay Master Postagens: 728 Data de Entrada: 05/01/10 Postagens Recentes
Hi Patricia,
I don't know if this is really the cause of the error or it's a typo only here, but there is a missing comma in the call of getPreviewURL.
Regards,
Zsigmond
I don't know if this is really the cause of the error or it's a typo only here, but there is a missing comma in the call of getPreviewURL.
Regards,
Zsigmond
Patricia Hevia, modificado 9 Anos atrás.
RE: Error template freemarker use method getPreviewURL
Junior Member Postagens: 69 Data de Entrada: 24/03/11 Postagens Recentes
Hello,
Thanks, I added the comma but still gives the same error!.
Regards,
Thanks, I added the comma but still gives the same error!.
Regards,
Zsigmond Rab, modificado 9 Anos atrás.
RE: Error template freemarker use method getPreviewURL
Liferay Master Postagens: 728 Data de Entrada: 05/01/10 Postagens Recentes
Hi Patricia,
I don't know immediately what else can be the problem
Is there any exception in the log, or you get only the message on the UI?
Is it possible that the fileEntries is empty or there is any problem with an of the parameters?
Regards,
Zsigmond
I don't know immediately what else can be the problem
Is there any exception in the log, or you get only the message on the UI?
Is it possible that the fileEntries is empty or there is any problem with an of the parameters?
Regards,
Zsigmond
Pier Paolo Ramon, modificado 9 Anos atrás.
R: Error template freemarker use method getPreviewURL
Junior Member Postagens: 90 Data de Entrada: 25/05/10 Postagens Recentes
Are you sure it is on the LOCAL service? Usually byUuidAndGroupId is in the remote/secure/non-local ones.
Sent from my iPhone with Liferay.com Forums
Sent from my iPhone with Liferay.com Forums
Pier Paolo Ramon, modificado 9 Anos atrás.
R: Error template freemarker use method getPreviewURL
Junior Member Postagens: 90 Data de Entrada: 25/05/10 Postagens Recentes
Sushil Patidar, modificado 9 Anos atrás.
RE: Error template freemarker use method getPreviewURL
Expert Postagens: 467 Data de Entrada: 31/10/11 Postagens Recentes
Hi,
You are supplying wrong paramater in the following line
The second argument of the getPreviewURL method takes parameter of the type FileVersion, while the parameter you are supplying fileEntries[0].getVersion () is of string type.
Regards
You are supplying wrong paramater in the following line
<# assign urlFile = dlUtil.getPreviewURL (fileEntries[0], fileEntries[0].getVersion (), themeDisplay, "") />
The second argument of the getPreviewURL method takes parameter of the type FileVersion, while the parameter you are supplying fileEntries[0].getVersion () is of string type.
Regards
Mohammad Azharuddin, modificado 7 Anos atrás.
RE: Error template freemarker use method getPreviewURL
Expert Postagens: 492 Data de Entrada: 17/09/12 Postagens Recentes
HI
how you got DLUtil object in template
I am getting error with below snippet
<#assign dlUtil = staticUtil["com.liferay.document.library.kernel.util.DLUtil"] />
how you got DLUtil object in template
I am getting error with below snippet
<#assign dlUtil = staticUtil["com.liferay.document.library.kernel.util.DLUtil"] />