Perguntas Frequentes
Perguntas Frequentes
An error occurred while processing the template.
Java method "com.sun.proxy.$Proxy70.getCategory(long)" threw an exception when invoked on com.sun.proxy.$Proxy70 object "com.liferay.asset.categories.internal.service.AssetCategoryPropertyAssetCategoryLocalServiceWrapper@7a97e769"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign filteredCategoryName = catLoc... [in template "20098#20124#363587" at line 10, column 9] ----
1<#-- ADT PARA O PORTLET NAVEGAÇÃO POR CATEGORIAS -->
2
3<#-- Ao utilizar vocabulários com categoria iniciado em "FAQ -",
4este início do nome do vocabulário é apagado - para uso na
5página de Dúvidas Frequentes. -->
6<#assign catLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService" )>
7
8<#assign catFiltered = themeDisplay.getURLCurrent()?keep_after("categories/")?keep_before("?") />
9<#if catFiltered?has_content>
10 <#assign filteredCategoryName = catLocalService.getCategory(catFiltered?number).getName() />
11</#if>
12<#if entries?has_content>
13 <div id="categorias-antt">
14 <h5 class="selecione-categoria">
15 Selecione um assunto
16 </h5>
17 <#list entries as entry>
18 <#assign style = "" />
19 <#if filteredCategoryName??>
20 <#list entry.getCategories() as cat>
21 <#if cat.getName() == filteredCategoryName>
22 <#assign style= "style=\"display: block\"" />
23 </#if>
24 </#list>
25 </#if>
26 <div class="panel" role="tablist">
27 <a
28 class="row no-gutters collapse-icon panel-header collapse-icon-middle collapsed"
29 href="#collapse${entry?index}"
30 role="button"
31 aria-expanded="false"
32 aria-controls="collapseCat"
33 >
34 <span class="col-auto collapse-icon-closed">
35 <i class="fas fa-${style?has_content?then('minus', 'plus')}"></i>
36 </span>
37 <span class="col-auto collapse-icon-open">
38 <i class="fas fa-minus"></i>
39 </span>
40 <h3 class="panel-title col-11">
41 <#assign tituloVocabulario = entry.getUnambiguousTitle(entries, themeDisplay.getSiteGroupId(), themeDisplay.getLocale()) />
42 <#if tituloVocabulario?contains("FAQ -")>
43 ${tituloVocabulario?keep_after("FAQ - ")}
44 <#else>
45 ${tituloVocabulario}
46 </#if>
47 </h3>
48 </a>
49 <div class="panel-collapse gov-collapse collapse" id="collapse${entry?index}" role="tabpanel" ${style}>
50 <div class="panel-body">
51 <#assign categories = entry.getCategories() />
52 <@displayCategories categories=categories />
53 </div>
54 </div>
55 </div>
56 </#list>
57 </div>
58</#if>
59
60<#macro displayCategories categories>
61 <#if categories?has_content>
62 <ul class="categories">
63 <#list categories as category>
64 <li>
65 <#assign categoryURL = renderResponse.createRenderURL() />
66
67 ${categoryURL.setParameter("resetCur", "true")}
68 ${categoryURL.setParameter("categoryId", category.getCategoryId()?string)}
69
70 <a href="${categoryURL}">${category.getName()}</a>
71
72 <#if serviceLocator??>
73 <#assign
74 assetCategoryService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryService")
75
76 childCategories = assetCategoryService.getChildCategories(category.getCategoryId())
77 />
78
79 <@displayCategories categories=childCategories />
80 </#if>
81 </li>
82 </#list>
83 </ul>
84 </#if>
85</#macro>