Resíduo de Execução e BNDT Resíduo de Execução e BNDT

Um erro ocorreu enquanto processava o modelo.
Error on line 23, column 1 in 20155#20195#1419196
folderLocalService.getFolder(fid) is undefined.
It cannot be assigned to f
1<style> 
2    .bs-example { 
3        margin: 20px; 
4
5 
6    .aui .collapse.in.collapsed { 
7        display: block; 
8
9 
10    .aui .collapse.collapsed { 
11        display: none; 
12
13 
14    .panel-title .glyphicon { 
15        font-size: 14px; 
16
17</style> 
18 
19<#assign folderLocalService = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFolderLocalService")> 
20<#assign fileLocalService = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService")> 
21<#assign gid = getterUtil.getLong("20182")>  
22<#assign fid = getterUtil.getLong(folderID.getData())> 
23<#assign f = folderLocalService.getFolder(fid)> 
24<#assign subFolders = folderLocalService.getFolders(gid,fid)>  
25 
26<#if ordem.getSiblings()?has_content> 
27     <#assign o = ""> 
28     <#list ordem.getSiblings() as cur_ordem> 
29         <#if getterUtil.getBoolean(cur_ordem.getData())> 
30              <#assign o = "${o}desc/"> 
31         <#else> 
32              <#assign o = "${o}asc/">  
33         </#if> 
34     </#list> 
35</#if> 
36 
37<#if (f.description != "")> 
38    ${f.description} 
39</#if> 
40<div class="bs-example"> 
41    <div class="panel-group"> 
42 
43        <#list o?split("/") as x> 
44            <#assign ordem = x> 
45            <#if x_index == 0> 
46                <#break> 
47            </#if> 
48        </#list> 
49        <#if ordem == "desc"> 
50            <#assign ordenado = subFolders?sort_by("name")?reverse> 
51        <#elseif ordem == "asc">  
52	        <#assign ordenado = subFolders?sort_by("name")> 
53	    <#else> 
54	        <#assign ordenado = subFolders> 
55        </#if> 
56 
57        <#list ordenado as sub> 
58            <#if !sub.getName()?starts_with("/")>         
59            <div class="panel panel-default"> 
60                <div class="panel-heading"> 
61                    <h4 class="panel-title"> 
62                        <a data-toggle="collapse" href="#collapse${fid}${sub_index}"> 
63                            <span class="glyphicon glyphicon-plus"></span> 
64                            ${sub.getName()} 
65			            </a> 
66                    </h4> 
67                </div> 
68                <div id="collapse${fid}${sub_index}" class="panel-collapse collapse collapsed"> 
69                    <ul class="list-group"> 
70                        <li class="list-group-item"> 
71                        <#assign files = fileLocalService.getFileEntries(gid, sub.getFolderId())> 
72 
73                        <#list o?split("/") as x> 
74                            <#assign ordem = x> 
75                            <#if x_index == 1> 
76                                <#break> 
77                            </#if> 
78                        </#list> 
79                        <#if ordem == "desc"> 
80                            <#assign ordenado1 = files?sort_by("name")?reverse> 
81                        <#elseif ordem == "asc">  
82	                        <#assign ordenado1 = files?sort_by("name")> 
83	                    <#else> 
84	                        <#assign ordenado1 = files> 
85                        </#if> 
86 
87                        <#list ordenado1 as doc> 
88                            <#if !doc.getTitle()?starts_with("/")> 
89                                <#assign uet = httpUtil.encodeURL(htmlUtil.unescape(doc.getTitle()))> 
90                                <a href="/documents/${gid}/${sub.getFolderId()}/${uet}" target="_blank">${doc.getTitle()}</a>  
91                                <small>(atualizado em ${doc.getModifiedDate()?string["dd/MM/yyyy HH:mm"]}</small><br/> 
92                            </#if> 
93                        </#list> 
94                        <#assign subFoldersa = folderLocalService.getFolders(gid, sub.getFolderId())> 
95 
96                        <#list o?split("/") as x> 
97                            <#assign ordem = x> 
98                            <#if x_index == 2> 
99                                <#break> 
100                            </#if> 
101                        </#list> 
102                        <#if ordem == "desc"> 
103                            <#assign ordenado1 = subFoldersa?sort_by("name")?reverse> 
104                        <#elseif ordem == "asc">  
105	                        <#assign ordenado1 = subFoldersa?sort_by("name")> 
106	                    <#else> 
107	                         <#assign ordenado1 = subFoldersa> 
108                        </#if> 
109 
110                        <#list ordenado1 as suba> 
111                            <#if !suba.getName()?starts_with("/")> 
112                                 <#if (suba_index == 0)> 
113                                      <b>${suba.getName()}</b> 
114                                 <#else> 
115                                      <br/> 
116                                      <b>${suba.getName()}</b> 
117                                 </#if> 
118                                 <#assign files = fileLocalService.getFileEntries(gid, suba.getFolderId())> 
119 
120                                 <#list o?split("/") as x> 
121                                     <#assign ordem = x> 
122                                     <#if x_index == 2> 
123                                         <#break> 
124                                     </#if> 
125                                 </#list> 
126                                 <#if ordem == "desc"> 
127                                      <#assign ordenado2 = files?sort_by("name")?reverse> 
128                                 <#elseif ordem == "asc">  
129	                                  <#assign ordenado2 = files?sort_by("name")> 
130	                             <#else> 
131	                                  <#assign ordenado2 = files> 
132                                 </#if> 
133 
134                                 <#list ordenado2 as doc> 
135                                     <#if !doc.getTitle()?starts_with("/")> 
136                                           <#assign uet = httpUtil.encodeURL(htmlUtil.unescape(doc.getTitle()))> 
137                                           <br/>&#160;&#160;&#160;&#160;<a href="/documents/${gid}/${suba.getFolderId()}/${uet}" target="_blank">${doc.getTitle()}</a> 
138                                           <small>(atualizado em ${doc.getModifiedDate()?string["dd/MM/yyyy HH:mm"]}</small> 
139                                     </#if> 
140                                 </#list> 
141                            </#if> 
142                        </#list> 
143                        </li> 
144                    </ul> 
145                </div> 
146            </div> 
147            </#if> 
148        </#list>  
149    </div> 
150</div> 
151 
152<script> 
153    $(document).ready(function () { 
154        // Add minus icon for collapse element which is open by default 
155        $(".collapse.in").each(function () { 
156            $(this) 
157                .siblings(".panel-heading") 
158                .find(".glyphicon") 
159                .addClass("glyphicon-minus") 
160                .removeClass("glyphicon-plus"); 
161        }); 
162 
163        // Toggle plus minus icon on show hide of collapse element 
164        $(".collapse") 
165            .on('show.bs.collapse', function () { 
166                $(this) 
167                    .parent() 
168                    .find(".glyphicon") 
169                    .removeClass("glyphicon-plus") 
170                    .addClass("glyphicon-minus"); 
171            }) 
172            .on('hide.bs.collapse', function () { 
173                $(this) 
174                    .parent() 
175                    .find(".glyphicon") 
176                    .removeClass("glyphicon-minus") 
177                    .addClass("glyphicon-plus"); 
178            }); 
179    }); 
180</script>