Pular para o Conteúdo
Navegação do site

Navegação do site

Aplicações Aninhadas

Editais

Um erro ocorreu enquanto processava o modelo.
Java method "com.sun.proxy.$Proxy177.getFileEntryByUuidAndGroupId(String, long)" threw an exception when invoked on com.sun.proxy.$Proxy177 object "com.liferay.portlet.documentlibrary.service.impl.DLFileEntryServiceImpl@6b08f6c"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign dlFileEntry = dlFileEntryServ...  [in template "10154#10192#1477636" at line 8, column 15]
----
1<#if entries?has_content> 
2    <ul> 
3        <#list entries as curEntry> 
4					  <#assign dlFileEntryService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryService")> 
5						<#assign classUuid = curEntry.getClassUuid()?string/> 
6            <#assign groupId = curEntry.getGroupId()?number/> 
7						<#if classUuid?has_content && groupId?has_content> 
8              <#assign dlFileEntry = dlFileEntryService.getFileEntryByUuidAndGroupId(classUuid, groupId)> 
9						</#if> 
10						<li class="row-pdf"pdf="${dlFileEntry.fileEntryId}" title="${dlFileEntry.getTitle()}"> 
11                <a href="${themeDisplay.getPortalURL()}/documents/${curEntry.getGroupId()}/0/-/${curEntry.getClassUuid()}" 
12                    target="_blank">${curEntry.getTitle(locale)}</a> 
13                <#assign assetRenderer=curEntry.getAssetRenderer()> 
14                    <#assign editURL=assetRenderer.getURLEdit(renderRequest,renderResponse) + "&doAsGroupId=" + 
15                        curEntry.getGroupId() + "&_15_groupId=" + curEntry.getGroupId() + "_15_articleId=" + 
16                        curEntry.getEntryId()> 
17                        <#if assetRenderer.hasEditPermission(themeDisplay.getPermissionChecker())> 
18                           
19													  <@getEditIcon /> 
20													  <span> 
21					                    <a href="javascript:;" class="excluir-conteudo taglib-icon focus" role="menuitem" tabindex="0" title="Excluir"> 
22					                      <img src="/o/tjpe-theme/images/common/trash.png" alt="Excluir" title="Excluir" 
23					                      style="background-image: url('/o/tjpe-theme/images/common/trash.png'); background-position: 50% -1688px; background-repeat: no-repeat; height: 16px; width: 16px;"> 
24					                    </a> 
25				                    </span> 
26													 
27                        </#if> 
28            </li> 
29        </#list> 
30    </ul> 
31    <#macro getEditIcon> 
32        <#if assetRenderer.hasEditPermission(themeDisplay.getPermissionChecker())> 
33            <#assign editPortletURL=assetRenderer.getURLEdit(renderRequest, renderResponse, 
34                windowStateFactory.getWindowState("NORMAL"), themeDisplay.getURLCurrent())!"" /> 
35					  ${editPortletURL.setParameter("_com_liferay_document_library_web_portlet_DLAdminPortlet_portletResource","com_liferay_asset_publisher_web_portlet_AssetPublisherPortlet")} 
36 
37            <#if validator.isNotNull(editPortletURL)> 
38                <#assign title=languageUtil.format(locale, "edit-x" , entryTitle, false) /> 
39 
40                <@liferay_ui["icon"] cssClass="icon-monospaced" icon="pencil" markupView="lexicon" message=title 
41                    url=editPortletURL.toString() /> 
42            </#if> 
43        </#if> 
44    </#macro> 
45		<script>        
46            $('.excluir-conteudo').on('click', function(){ 
47							var pdf = $(this).closest('.row-pdf').attr('pdf'); 
48							var title = $(this).closest('.row-pdf').attr('title'); 
49							var myHeaders = new Headers(); 
50                myHeaders.append("accept", "application/json"); 
51 
52                var requestOptions = { 
53                    method: 'DELETE', 
54                    headers: myHeaders, 
55                    redirect: 'follow' 
56                }; 
57							  if(confirm('Você deseja excluir definitivamente o documento com nome '+ title +'?')) { 
58                    fetch("/o/headless-delivery/v1.0/documents/" + pdf + "?p_auth=" + Liferay.authToken, requestOptions) 
59                    .then((response) => { 
60                        if(response.status == 204){ 
61                            return true 
62
63                    }) 
64                    .then((response) => { 
65                        alert("Documento "+ title + " excluído com sucesso !") 
66                        window.location.reload(); 
67                    }) 
68                    .catch(error => console.log('error', error)); 
69                }else { 
70                    return false 
71                }  
72                 
73                                 
74                 
75            }) 
76        </script> 
77</#if>