Para sua Empresa - Sicoob Credifiemg
Espaço reservado do Banner sistêmico Crediminas. Visitantes do site não visualizam este alerta.
Os mais pedidos
Um erro ocorreu enquanto processava o modelo.
The following has evaluated to null or missing: ==> assetEntry.assetRenderer [in template "20102#20128#1144091" at line 222, column 33] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be 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: #local assetRenderer = assetEntry.ass... [in template "20102#20128#1144091" in function "getArticleDLEntryUrl" at line 222, column 9] - Reached through: #assign pictureURL = getArticleDLEntr... [in template "20102#20128#1144091" at line 80, column 17] ----
1<#assign dlFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")>
2<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")>
3<#assign vocabularyService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")>
4
5<#assign targetViewUrl = "/web/sicoob/noticias" />
6<#assign targetPortletID = "k7Inbn6BEDVU" />
7
8<#--
9<#function getNoticiaDestaque entries>
10 <#list entries as entry>
11 <#assign categories = entry.getCategories()>
12 <#list categories as category>
13 <#if category.getName() == "Destaques">
14 <#return entry />
15 </#if>
16 </#list>
17 </#list>
18 <#return null />
19</#function>
20
21<#function getListSemDestaque entries destaque>
22 <#assign filteredList = [] />
23 <#list entries as entry>
24 <#if entry?index != entries?seq_index_of(destaque)>
25 <#assign filteredList = filteredList + [entry]>
26 </#if>
27 </#list>
28 <#return filteredList />
29</#function>
30
31<#function getListaDeNoticias entries>
32 <#assign filteredEntries = [] />
33 <#if getNoticiaDestaque(entries)??>
34 <#assign destaque = getNoticiaDestaque(entries) />
35 <#assign filteredEntries = filteredEntries + [destaque]>
36 <#assign filteredList = getListSemDestaque(entries, destaque) />
37 <#assign filteredEntries = filteredEntries + filteredList?chunk(6)[0] />
38 <#else>
39 <#assign filteredEntries = entries?chunk(7)[0] />
40 </#if>
41 <#return filteredEntries />
42</#function>
43-->
44
45
46<style>
47 .news-content i.icon-chevron-left {
48 margin-right: 14px;
49 cursor: pointer;
50 padding: 6px;
51 color: #00a091;
52 }
53 .news-content .item img {
54 margin-top: 35px;
55 margin-bottom: 50px;
56 }
57 .list-news.news-featured .news .content h3 {
58 max-height: 45%;
59 }
60 .list-news.news-featured {
61 margin-bottom: 0px;
62 }
63</style>
64
65<#if entries?has_content>
66 <#assign dateFormat = "dd/MM/yyyy" />
67 <div class="list-news news-featured">
68 <div class="d-flex row split">
69 <#list entries as entry>
70 <#assign assetRenderer = entry.getAssetRenderer() />
71 <#assign journalArticle = assetRenderer.getArticle() />
72 <#assign docXml = saxReaderUtil.read(journalArticle.getContent()) />
73 <#assign categories = entry.getCategories()>
74 <#assign categoryId = -1>
75 <#list categories as category>
76 <#assign categoryId = category.getCategoryId() />
77 </#list>
78 <#assign viewURL = "${targetViewUrl}/-/asset_publisher/${targetPortletID}/content/id/${entry.getEntryId()}${(categoryId != -1)?then('?p_r_p_categoryId=' + categoryId, '')}" />
79 <#assign xmlValue = docXml.valueOf("//dynamic-element[@name='image']/dynamic-content[@language-id='pt_BR']/text()") />
80 <#assign pictureURL = getArticleDLEntryUrl(xmlValue) />
81
82 <#assign userLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.UserLocalService")>
83 <#assign title = entry.getTitle(locale) />
84
85 <#if entry?counter <= 1 >
86 <div class="col-md-6 col-sm-12 item-one">
87 <div class="one-news news" style="background-image: url('${pictureURL}');">
88 <a href="javascript:void(0);" onclick="viewArticle(${entry.getEntryId()});">
89 <div class="content">
90 <#if (categories?size > 0)>
91 <p class="list-category text-truncate">
92 <#list categories as category>
93 <#assign vocabulary = vocabularyService.getVocabulary(category.vocabularyId) />
94 <#if vocabulary.getName() == "Comunicação">
95 <span>
96 ${category.getName()} <#sep>
97 </span>
98 </#if>
99 </#list>
100 </p>
101 </#if>
102 <h3>
103 <#if (title?length < 86)>
104 ${title}
105 <#else>
106 ${title?substring(0,85)}...
107 </#if>
108 </h3>
109 </div>
110 </a>
111 </div>
112 </div>
113 </#if>
114 </#list>
115
116 <div class="col-6 second-item">
117 <div class="d-flex align-content-stretch flex-wrap second-inside ">
118 <#list entries as entry>
119 <#if (entry?counter gt 1) && (entry?counter <= 3) >
120 <#assign assetRenderer = entry.getAssetRenderer() />
121 <#assign journalArticle = assetRenderer.getArticle() />
122 <#assign docXml = saxReaderUtil.read(journalArticle.getContent()) />
123 <#assign categories = entry.getCategories()>
124 <#assign categoryId = -1>
125 <#list categories as category>
126 <#assign categoryId = category.getCategoryId() />
127 </#list>
128 <#assign viewURL = "${targetViewUrl}/-/asset_publisher/${targetPortletID}/content/id/${entry.getEntryId()}${(categoryId != -1)?then('?p_r_p_categoryId=' + categoryId, '')}" />
129 <#assign xmlValue = docXml.valueOf("//dynamic-element[@name='image']/dynamic-content[@language-id='pt_BR']/text()") />
130 <#assign pictureURL = getArticleDLEntryUrl(xmlValue) />
131 <#assign title = entry.getTitle(locale) />
132
133 <#assign userLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.UserLocalService")>
134 <div class="col-12 news" style="background-image: url('${pictureURL}');">
135 <a href="javascript:void(0);" onclick="viewArticle(${entry.getEntryId()});">
136 <div class="content">
137 <#if (categories?size > 0)>
138 <p class="list-category text-truncate">
139 <#list categories as category>
140 <#assign vocabulary = vocabularyService.getVocabulary(category.vocabularyId) />
141 <span>
142 ${category.getName()} <#sep>
143 </span>
144 </#list>
145 </p>
146 </#if>
147 <h3>
148 <#if (title?length < 62)>
149 ${title}
150 <#else>
151 ${title?substring(0,61)}...
152 </#if>
153 </h3>
154 </div>
155 </a>
156 </div>
157 </#if>
158 </#list>
159 </div>
160 </div>
161 </div>
162
163 <div class="d-flex flex-wrap row item-four">
164 <#list entries as entry>
165 <#if (entry?counter gt 3) && (entry?counter <= 7) >
166 <#assign assetRenderer = entry.getAssetRenderer() />
167 <#assign journalArticle = assetRenderer.getArticle() />
168 <#assign docXml = saxReaderUtil.read(journalArticle.getContent()) />
169 <#assign categories = entry.getCategories()>
170 <#assign categoryId = -1>
171 <#list categories as category>
172 <#assign categoryId = category.getCategoryId() />
173 </#list>
174 <#assign viewURL = "${targetViewUrl}/-/asset_publisher/${targetPortletID}/content/id/${entry.getEntryId()}${(categoryId != -1)?then('?p_r_p_categoryId=' + categoryId, '')}" />
175 <#assign xmlValue = docXml.valueOf("//dynamic-element[@name='image']/dynamic-content[@language-id='pt_BR']/text()") />
176 <#assign pictureURL = getArticleDLEntryUrl(xmlValue) />
177 <#assign title = entry.getTitle(locale) />
178
179 <#assign userLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.UserLocalService")>
180
181 <div class="col-md-3 col-sm-5 col-xs-8 small-thumb">
182 <div class="news" style="background-image: url('${pictureURL}');">
183 <a href="javascript:void(0);" onclick="viewArticle(${entry.getEntryId()});">
184 <div class="content">
185 <#if (categories?size > 0)>
186 <p class="list-category text-truncate">
187 <#list categories as category>
188 <#assign vocabulary = vocabularyService.getVocabulary(category.vocabularyId) />
189 <span>
190 ${category.getName()} <#sep>
191 </span>
192 </#list>
193 </p>
194 </#if>
195 <h3>
196 <#if (title?length < 86)>
197 ${title}
198 <#else>
199 ${title?substring(0,85)}...
200 </#if>
201 </h3>
202 </div>
203 </a>
204 </div>
205 </div>
206 </#if>
207 </#list>
208 </div>
209
210 </div>
211</#if>
212
213<#function getArticleDLEntryUrl xmlValue>
214 <#local docUrl = "" />
215
216 <#if xmlValue?has_content>
217 <#local jsonObject = xmlValue?eval />
218 <#local entryUuid = jsonObject.uuid />
219 <#local entryGroupId = getterUtil.getLong(jsonObject.groupId) />
220 <#local dlFileEntry = dlFileEntryLocalService.getDLFileEntryByUuidAndGroupId(entryUuid, entryGroupId) />
221 <#local assetEntry = assetEntryLocalService.getEntry("com.liferay.document.library.kernel.model.DLFileEntry", dlFileEntry.fileEntryId) />
222 <#local assetRenderer = assetEntry.assetRenderer />
223 <#local docUrl = assetRenderer.getURLDownload(themeDisplay) />
224 </#if>
225
226 <#return docUrl />
227</#function>
228
229
230
231<div class="news-content">
232 <#if entries?has_content>
233 <#list entries as curEntry>
234 <div class="item hide" id="item-${curEntry.getEntryId()}" data-content-id="${curEntry.getEntryId()}">
235 <div class="row">
236 <h5 class="col-md"><i class="icon-chevron-left" onclick="viewNews(this);"></i> ${curEntry.getTitle(locale)}</h5>
237 </div>
238 <div class="row">
239 <img class="col-md" src="${getArticleDLEntryUrl(saxReaderUtil.read(curEntry.getAssetRenderer().getArticle().getContent()).valueOf("//dynamic-element[@name='image']/dynamic-content[@language-id='pt_BR']/text()"))}" alt="">
240 </div>
241 <div class="row news-text">
242 <div class="col-md"></div>
243 </div>
244
245
246 <!-- GALERIA -->
247 <!-- GALERIA -->
248
249
250 </div>
251 </#list>
252 </#if>
253</div>
254
255<script>
256 var contents = [],
257 domParser = new DOMParser();
258 <#if entries?has_content>
259 <#list entries as curEntry>
260 contents[${curEntry.getEntryId()}] = `${curEntry.getAssetRenderer().getArticle().getContent()}`;
261 </#list>
262 </#if>
263
264 contents.forEach(function(e, index){
265 contents[index] = domParser.parseFromString(contents[index], 'text/xml').querySelector('dynamic-element[name="content"] dynamic-content').innerHTML;
266 contents[index] = contents[index].replace('<![CDATA[', '');
267 contents[index] = contents[index].replace(']]>', '');
268 document.querySelector('[data-content-id="'+index+'"] .news-text div').innerHTML = contents[index];
269 })
270 function viewArticle(entryId){
271 AUI().one('[data-content-id="'+entryId+'"]').show();
272 AUI().one('.list-news').hide();
273 window.location.href = '#' + AUI().one('[data-content-id="'+entryId+'"]')._node.id;
274 }
275 function viewNews(element){
276 AUI().one(AUI().one(element)._node.parentElement.parentElement.parentElement).hide();
277 AUI().one('.list-news').show();
278 }
279</script>
Encontre o Sicoob mais próximo de você.
Conheça os aplicativos do Sicoob
Clique no ícone para fazer o download.