Tillbaka

KM fattade beslut om ett program för säkrare plankorsningar

Fel uppstod under bearbetning av mallen.
Error on line 107, column 21 in 20154#20194#267609
dlFileEntryUtil.getDLFileEntryByUuidAndGroupId(uuid, getterUtil.getLong(groupId)) is undefined.
It cannot be assigned to fileEntry
1<#-- 
2Web content templates are used to lay out the fields defined in a web 
3content structure. 
4 
5Please use the left panel to quickly add commonly used variables. 
6Autocomplete is also available and can be invoked by typing "${". 
7--> 
8 
9<#-- 
10    Services 
11--> 
12<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService") /> 
13<#assign lvmJournalGroupLocalService = serviceLocator.findService("lvm-site62-services-portlet", "com.ch5finland.lvm.site62.services.service.LvmJournalGroupLocalService") /> 
14 
15 
16<#-- Localize strings --> 
17<#if locale = "sv_SE"> 
18    <#assign labelTyyppi = "Nyhet"> 
19    <#assign labelLiitteet = "Filer att ladda ner:"> 
20    <#assign labelMuuallaPalvelussa = "Länkar om samma ämne:"> 
21    <#assign labelMuuallaVerkossa = "Länkar till andra sidor:"> 
22<#elseif locale == "en_US"> 
23    <#assign labelTyyppi = "News article"> 
24    <#assign labelLiitteet = "Attachments:"> 
25    <#assign labelMuuallaPalvelussa = "Related links to this site:"> 
26    <#assign labelMuuallaVerkossa = "Links to other web sites:"> 
27<#else> 
28    <#assign labelTyyppi = "Uutinen"> 
29    <#assign labelLiitteet = "Liitteet:"> 
30    <#assign labelMuuallaPalvelussa = "Muualla palvelussa:"> 
31    <#assign labelMuuallaVerkossa = "Muualla verkossa:"> 
32</#if> 
33 
34<#assign curArticle = journalArticleLocalService.getArticle(getterUtil.getLong(groupId), .vars['reserved-article-id'].data)> 
35 
36<#assign fiUrl = lvmJournalGroupLocalService.getArticleLanguageUrl(curArticle.getId(), "fi") /> 
37<#assign svUrl = lvmJournalGroupLocalService.getArticleLanguageUrl(curArticle.getId(), "sv") /> 
38<#assign enUrl = lvmJournalGroupLocalService.getArticleLanguageUrl(curArticle.getId(), "en") /> 
39 
40<#assign displaydate = .vars['reserved-article-display-date'].data /> 
41  
42<#-- Save the original page locale for later --> 
43<#assign originalLocale = locale /> 
44  
45<#-- Set the page locale to the portals default locale --> 
46<#setting locale = localeUtil.getDefault() /> 
47  
48<#-- Parse the date to a date object --> 
49<#assign displaydate = displaydate?datetime("EEE, d MMM yyyy HH:mm:ss Z") /> 
50  
51 
52<#-- Set the page locale back to the original page locale --> 
53<#assign locale = originalLocale /> 
54<div> 
55    <#-- Get web-content title --> 
56    <h1>${.vars['reserved-article-title'].data}</h1> 
57    <span>${labelTyyppi}</span> 
58     
59    <#-- Format content title title --> 
60    <span class="date">${displaydate?string["dd.MM.yyyy HH.mm"]}</span> 
61    <#if fiUrl?has_content>                         
62      <span class="lang"><a href="/-/${fiUrl}">fi</a></span> 
63    </#if> 
64    <#if svUrl?has_content>   
65      <span class="lang"><a href="/sv/-/${svUrl}">sv</a></span> 
66    </#if> 
67    <#if enUrl?has_content>   
68      <span class="lang"><a href="/en/-/${enUrl}">en</a></span> 
69    </#if> 
70 
71    <p></p> 
72     
73    <#-- Output news image, if any --> 
74    <#assign image = Kuva.Kuvatiedosto.getData() /> 
75    <#if image?has_content > 
76        <#assign desc = Kuva.Kuvan_selite.getData() /> 
77        <div class="valokuva_wrapper"> 
78            <div class="valokuva"> 
79                <a href="#" title="${desc}" data-featherlight-after-content="onFeatherlightOpen()" data-featherlight="<img src=&quot;${image}&imageThumbnail=2&quot; alt=&quot;${desc}&quot; title=&quot;${desc}&quot;> <p>${desc}</p>"> 
80                    <img src="${image}&imageThumbnail=3" alt="${desc}" title="${desc}"> 
81                </a> 
82            </div> 
83        </div> 
84    </#if> 
85 
86    ${Sisältö.getData()} 
87         
88    <div class="filesAndLinks"> 
89     
90        <#-- Output attachments, if any --> 
91        <#if Liitteet.Liite.getSiblings()?has_content > 
92            <#assign dlFileEntryUtil = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService") /> 
93            <#assign i = 0 /> 
94            <#assign has_heading = false /> 
95 
96            <#list Liitteet.Liite.getSiblings() as cur_Liite > 
97                <#assign file = cur_Liite.getData() /> 
98                <#if (i == 0 ) && file?has_content > 
99                        <span>${labelLiitteet}</span> 
100                    <ul> 
101        	        <#assign has_heading = true /> 
102        	    </#if> 
103                 
104                <#if file?has_content && has_heading > 
105                    <#-- Get filename --> 
106                    <#assign uuid = file?string?split("/")?last?split("?")?first /> 
107                    <#assign fileEntry = dlFileEntryUtil.getDLFileEntryByUuidAndGroupId(uuid, getterUtil.getLong(groupId)) /> 
108                    <#assign fileTitle = fileEntry.title/> 
109                    <li><a href="${file}" title="${fileTitle}">${fileTitle}</a></li> 
110                </#if> 
111            	 
112            	<#assign i = i + 1 /> 
113            </#list> 
114            <#-- Close ul-tag if it has been opened --> 
115            <#if has_heading == true> 
116                </ul> 
117            </#if> 
118        </#if> 
119         
120     
121        <#-- Output internal links, if any --> 
122        <#if Muualla_palvelussa.URL_palvelussa.getSiblings()?has_content > 
123            <#assign i = 0 /> 
124            <#assign has_heading = false /> 
125 
126            <#list Muualla_palvelussa.URL_palvelussa.getSiblings() as cur_Linkki> 
127                <#if (i == 0 ) && cur_Linkki.getData()?string?length != 0 > 
128                        <span>${labelMuuallaPalvelussa}</span> 
129                	    <ul> 
130            	    <#assign has_heading = true /> 
131            	</#if> 
132                <#if cur_Linkki.getData()?string?length != 0 && has_heading > 
133                    <li><a href="${cur_Linkki.getData()}" title="${cur_Linkki.Otsikko_palvelussa.getData()}">${cur_Linkki.Otsikko_palvelussa.getData()}</a></li> 
134                </#if> 
135                <#assign i = i + 1 /> 
136            </#list> 
137            <#-- Close ul-tag if it has been opened --> 
138            <#if has_heading == true> 
139                </ul> 
140            </#if> 
141        </#if> 
142     
143        <#-- Output external links, if any --> 
144        <#if Muualla_verkossa.URL_verkossa.getSiblings()?has_content > 
145            <#assign i = 0 /> 
146            <#assign has_heading = false /> 
147 
148            <#list Muualla_verkossa.URL_verkossa.getSiblings() as cur_Linkki> 
149                <#if (i == 0 ) && cur_Linkki.getData()?string?length != 0 > 
150                        <span>${labelMuuallaVerkossa}</span> 
151                	    <ul> 
152            	    <#assign has_heading = true /> 
153            	</#if> 
154                <#if cur_Linkki.getData()?string?length != 0 && has_heading > 
155                    <li><a href="${cur_Linkki.getData()}" title="${cur_Linkki.Otsikko_verkossa.getData()}">${cur_Linkki.Otsikko_verkossa.getData()}</a></li> 
156                </#if> 
157                <#assign i = i + 1 /> 
158            </#list> 
159            <#-- Close ul-tag if it has been opened --> 
160            <#if has_heading == true> 
161                </ul> 
162            </#if> 
163        </#if> 
164 
165    </div> 
166</div>