Press Releases
Visit AVANGRID’s Press Room.
Visit the Avangrid Foundation's Press Room.
Visit IBERDROLA, S.A.’s Press Room.
An error occurred while processing the template.
The following has evaluated to null or missing: ==> serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService") [in template "20099#20125#362409" at line 3, column 34] ---- 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: #assign assetLinkLocalService = servi... [in template "20099#20125#362409" at line 3, column 1] ----
1<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
2<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") />
3<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService") />
4<#assign DLFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") />
5
6<#setting date_format="MM/dd/yyyy">
7
8<#if entries?has_content>
9 <div class="container">
10 <div class="accordion avg-third-accordion avg-corp-table" id="accordionExample">
11 <div class="card">
12 <#list entries as curEntry>
13 <#assign article = journalArticleLocalService.fetchLatestArticle(curEntry.getClassPK()) />
14 <#assign aArticleXML = saxReaderUtil.read(article.getContentByLocale(locale)) />
15 <#assign title = aArticleXML.valueOf("//dynamic-element[@name='accord48839520']/dynamic-content/text()") />
16 <#assign titleId = title?replace(" ", "") />
17
18 <#assign currentArticleAssetEntryId = curEntry.getEntryId() />
19 <#assign currentArticleRelatedLinks = assetLinkLocalService.getDirectLinks(currentArticleAssetEntryId) />
20
21 <#if currentArticleRelatedLinks?has_content>
22 <div class="card-header" id="heading${titleId}">
23 <button class="btn btn-link btn-block text-left" type="button" data-toggle="collapse" data-target="#collapse${titleId}" aria-expanded="true" aria-controls="collapse${titleId}">
24 ${title}
25 <img class="icon-accordion" src="/o/avangrid-theme/images/general/chevron_right.svg" alt="">
26 </button>
27 </div>
28
29 <div id="collapse${titleId}" class="collapse " aria-labelledby="heading${titleId}" data-parent="#accordionExample">
30 <div class="card-body">
31 <table class="avg-second-table">
32 <#assign newsArray = jsonFactoryUtil.createJSONArray()>
33 <#assign ls = []>
34 <#assign arrayDocuments = []>
35 <#list currentArticleRelatedLinks as relatedEntry>
36 <#assign relatedAssetEntryId = relatedEntry.getEntryId2() />
37 <#assign relatedAssetEntry = assetEntryLocalService.getEntry(relatedAssetEntryId) />
38 <#if relatedAssetEntry.mimeType == "text/html">
39 <#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() />
40 <#assign relatedArticle = journalArticleLocalService.getLatestArticle(relatedAssetEntryPrimKey) />
41 <#assign relatedArticleId = relatedArticle.getArticleId() />
42
43 <#assign aArticleXMLIn = saxReaderUtil.read(relatedArticle.getContentByLocale(locale)) />
44 <#assign tfShortTitle = aArticleXMLIn.valueOf("//dynamic-element[@name='CopyOftfDisplayTitle']/dynamic-content/text()") />
45 <#assign dateIBM = aArticleXMLIn.valueOf("//dynamic-element[@name='CopyOfdateIBM']/dynamic-content/text()") />
46 <#assign tfDescription = aArticleXMLIn.valueOf("//dynamic-element[@name='CopyOftfDescription']/dynamic-content/text()") />
47 <#assign tfUrl = "/w/" + relatedArticle.getUrlTitle()/>
48 <#if !relatedArticle.getUrlTitle()?has_content>
49 <#assign titleEsc = relatedArticle.getTitle()?lower_case/>
50 <#assign titleEsc = titleEsc?replace(" ", "-")/>
51 <#assign titleEsc = titleEsc?replace("'", "")/>
52 <#assign titleEsc = titleEsc?replace("\"", "")/>
53 <#assign tfUrl = "/w/" + titleEsc/>
54 </#if>
55
56 <#assign
57 assetRenderer = curEntry.getAssetRenderer()
58 entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale))
59 viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, assetRenderer, curEntry, true)
60 />
61 <#assign ls = [{"date":dateIBM, "descripcion":tfShortTitle,"url":tfUrl}] + ls>
62
63 <#elseif relatedAssetEntry.mimeType?contains('application')>
64 <#assign dlFileEntry = DLFileEntryLocalService.getDLFileEntryByUuidAndGroupId(relatedAssetEntry.classUuid, relatedAssetEntry.groupId) />
65 <#assign assetEntry = assetEntryLocalService.getEntry("com.liferay.document.library.kernel.model.DLFileEntry", dlFileEntry.fileEntryId) />
66 <#assign assetRenderer = assetEntry.assetRenderer />
67 <#assign link = assetRenderer.getURLDownload(themeDisplay) />
68 <#assign arrayDocuments = [{"descripcion":dlFileEntry.title ,"url":link}] + arrayDocuments>
69 </#if>
70 </#list>
71
72 <#list ls?sort_by("date")?reverse as i>
73 <tr>
74 <td>${i.date}</td>
75 <td><a href="${i.url}">${i.descripcion}</a></td>
76 </tr>
77 </#list>
78 <#list arrayDocuments?sort_by("descripcion")?reverse as i>
79 <tr>
80 <td style=""></td>
81 <td><a href="${i.url}">${i.descripcion}</a></td>
82 </tr>
83 </#list>
84 </table>
85 </div>
86 </div>
87 </#if>
88 </#list>
89 </div>
90 </div>
91 </div>
92</#if>