Crédito para Corporate - Produtos e Serviços - Banco do Nordeste
Crédito para Corporate
Crédito para investimento, comercial e capital de giro para a sua empresa realizar grande.
Mais Crédito para Corporate
Um erro ocorreu enquanto processava o modelo.
The following has evaluated to null or missing:
==> LayoutLocalService
.fetchLayout(
getterUtil.getLong(page.groupId),
getterUtil.getBoolean(page.privateLayout),
getterUtil.getLong(page.layoutId)
) [in template "20101#20128#299732" at line 35, column 31]
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----
----
FTL stack trace ("~" means nesting-related):
- Failed at: url = LayoutLocalService.fetchLayout(... [in template "20101#20128#299732" at line 35, column 25]
----
1<#-- Inclui variáveis comuns-->
2<#include "${templatesPath}/47059" />
3<#-- Inclui funções comuns-->
4<#include "${templatesPath}/294521" />
5
6<#assign
7 ddmStructureId = 294445
8 journalArticleClassNameId = portalUtil.getClassNameId("com.liferay.journal.model.JournalArticle")
9 portletNamespace = themeDisplay.getPortletDisplay().getNamespace()
10 />
11
12
13<#if
14 portletPreferences["selectionStyle"]?seq_contains("dynamic") &&
15 portletPreferences["anyAssetType"]?seq_contains("${journalArticleClassNameId}") &&
16 portletPreferences["anyClassTypeJournalArticleAssetRendererFactory"]?seq_contains("${ddmStructureId}")
17 >
18 <#assign
19 LayoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")
20 AssetVocabularyLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")
21 AssetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")
22 AssetCategoryPropertyLocalService = serviceLocator.findService("com.liferay.asset.category.property.service.AssetCategoryPropertyLocalService")
23 >
24
25 <#if entries?has_content>
26 <div id="produtos_${portletNamespace}" class="container-fluid">
27 <div class="row justify-content-center">
28 <#list entries as curEntry>
29 <#assign
30 dlFormFieldValuesMap = curEntry.getAssetRenderer().getDDMFormValuesReader().getDDMFormValues().getDDMFormFieldValuesMap()
31 fieldPage = dlFormFieldValuesMap["pagina"]
32 page = fieldPage[0].getValue().getString(locale)?eval
33 fieldDescription = dlFormFieldValuesMap["descricao"]
34 description = fieldDescription[0].getValue().getString(locale)
35 url = LayoutLocalService
36 .fetchLayout(
37 getterUtil.getLong(page.groupId),
38 getterUtil.getBoolean(page.privateLayout),
39 getterUtil.getLong(page.layoutId)
40 )
41 .getFriendlyURL()
42 line = getProductLine(curEntry.getCategories())
43 product = {
44 "name": curEntry.getTitle(locale),
45 "description": description,
46 "line": line,
47 "url": url
48 }
49 >
50 <@displayProduct product />
51 </#list>
52 </div>
53 </div>
54 </#if>
55<#else>
56 <@clay["alert"]
57 message="
58 <h4>Configuração inválida</h4>
59 <p>O publicador deve ser dinâmico e listar Artigos de Conteúdo do tipo Produtos e Serviços.</p>
60 "
61 title="Aviso"
62 />
63</#if>
64
65<#function getProductLinesIds>
66 <#local
67 productFamiliesCount = AssetCategoryLocalService.getVocabularyRootCategoriesCount(vocProdutosServicos)
68 productFamilies = AssetCategoryLocalService.getVocabularyRootCategories(vocProdutosServicos, 0, productFamiliesCount, null)
69 productLineIds = []
70 >
71 <#list productFamilies as f>
72 <#local familyProductLines = AssetCategoryLocalService.getChildCategories(f.getCategoryId())>
73 <#list familyProductLines as fpl>
74 <#local productLineIds = productLineIds + [fpl.getCategoryId()] >
75 </#list>
76 </#list>
77 <#return productLineIds />
78</#function>
79
80<#function getProductLine categories>
81 <#if categories?has_content>
82 <#local productLineIds = getProductLinesIds()>
83 <#list categories as category>
84 <#if category.getVocabularyId() == vocProdutosServicos>
85 <#if productLineIds?seq_contains(category.getCategoryId())>
86 <#local productLineColor = "">
87 <#local productFamilyIcon = "">
88 <#if AssetCategoryPropertyLocalService.fetchCategoryProperty(category.getParentCategoryId(), "cor")??>
89 <#local productLineColor = AssetCategoryPropertyLocalService.fetchCategoryProperty(category.getParentCategoryId(), "cor").getValue()>
90 <#if AssetCategoryPropertyLocalService.fetchCategoryProperty(category.getCategoryId(), "cor")??>
91 <#local productLineColor = AssetCategoryPropertyLocalService.fetchCategoryProperty(category.getCategoryId(), "cor").getValue()>
92 </#if>
93 </#if>
94 <#if AssetCategoryPropertyLocalService.fetchCategoryProperty(category.getParentCategoryId(), "icone")??>
95 <#local productFamilyIcon = AssetCategoryPropertyLocalService.fetchCategoryProperty(category.getParentCategoryId(), "icone").getValue()>
96 <#local productFamilyIcon = getSpritemapIcon(productFamilyIcon)>
97 </#if>
98 <#local productLine = {
99 "name" : category.getName(),
100 "color": productLineColor,
101 "familyIcon": productFamilyIcon
102 }>
103 </#if>
104 </#if>
105 </#list>
106 </#if>
107 <#return productLine />
108</#function>
109
110<#macro displayProduct product>
111 <div class="col-sm-12 col-md-6 col-lg-4 d-flex align-items-stretch">
112 <div class="card shadow p-4 d-flex w-100">
113 <div class="h4 text-primary">${product.name}</div>
114 <div class="d-flex">
115 <span style="color: var(--${product.line.color})">
116 <@clay.icon
117 symbol="${product.line.familyIcon.symbol}"
118 spritemap="${product.line.familyIcon.spritemap}" />
119 </span>
120 <span class="ml-1 text-secondary font-weight-bold">${product.line.name}</span>
121 </div>
122 <p class="mt-4 mb-5">${product.description}</p>
123 <div class="mt-auto">
124 <a
125 class="btn btn-primary"
126 href="${product.url}"
127 aria-label="Saiba mais sobre ${product.name}">Conheça</a>
128 </div>
129 </div>
130 </div>
131</#macro>
132
133<style>
134
135#produtos_${portletNamespace} .card {
136 transition: transform 0.25s ease-out;
137 cursor: pointer;
138}
139
140#produtos_${portletNamespace} .card:hover {
141 -webkit-transform: scale(1.05);
142 -ms-transform: scale(1.05);
143 transform: scale(1.05);
144}
145
146</style>
147
148<script>
149 function link(link) {
150 window.location.href = link
151 }
152</script>