An error occurred while processing the template.
Method public static com.liferay.portlet.asset.model.AssetCategory com.liferay.portlet.asset.service.AssetCategoryLocalServiceUtil.getAssetCategory(long) throws com.liferay.portal.kernel.exception.PortalException,com.liferay.portal.kernel.exception.SystemException threw an exception
1<#-- LOMAKE JA CUSTOM-KENTTIEN NIMET --> 
2<#assign LOHA_LOMAKE = "KELAFI - LOMAKE" /> 
3<#assign LOHA_OTSIKKO = "LoHaOtsikko" /> 
4<#assign LOHA_KUVAUS = "LoHaKelaKuvaus" /> 
5<#assign LOHA_KOODI = "LoHaLomakeKoodi" /> 
6<#assign LOHA_LINKKI = "LohaUlkoinenLinkki" /> 
7<#assign LOHA_LINKKI_KUVAUS = "LohaUlkoinenLinkkiKuvaus" /> 
8<#assign LOHA_KIELI = "LoHaAineistonKieli" /> 
9<#assign LOHA_RYHMA = "LoHaTuoteRyhma" /> 
10<#assign LOHA_JULKAISUPAIVA = "LoHaJulkaisuPaiva" /> 
11<#assign LOHA_VANHENEMISPAIVA = "LoHaVanhenemisPaiva" /> 
12 
13<#assign DLAppLocalServiceUtil = staticUtil["com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil"] /> 
14<#assign AssetCategoryLocalServiceUtil = staticUtil["com.liferay.portlet.asset.service.AssetCategoryLocalServiceUtil"] /> 
15<#assign LocaleUtil = staticUtil["com.liferay.portal.kernel.util.LocaleUtil"] /> 
16 
17<#if themeDisplay.getLanguageId()?has_content > 
18    <#assign siteLang = themeDisplay.getLanguageId() /> 
19<#else> 
20    <#assign siteLang = "fi_FI" /> 
21</#if> 
22<#if request.getParameter("categoryId")?exists > 
23    <#assign categoryId = request.getParameter("categoryId") /> 
24<#else> 
25    <#assign categoryId = "" /> 
26</#if> 
27 
28<script> 
29$(document).ready(function()  
30    {  
31        $("#lohaTable").tablesorter({headers:{3:{sorter: false}}});  
32        <#if categoryId?has_content > 
33            $("#lohaTableTunnus").click(); 
34        </#if> 
35    }  
36); 
37</script> 
38 
39<div class="journal-content-article aui table-kelafi kelafi-article lohatable"> 
40 
41<#if categoryId?has_content > 
42    <h2>${AssetCategoryLocalServiceUtil.getAssetCategory(categoryId?number).getTitle(siteLang)}</h2> 
43</#if> 
44 
45<#if categoryId?has_content > 
46<#else>  
47    <#assign JournalContentUtil = staticUtil["com.liferay.portlet.journalcontent.util.JournalContentUtil"] /> 
48    <#assign articleDisplay = JournalContentUtil.getDisplay(themeDisplay.getScopeGroupId(), customArticleId, "", siteLang, themeDisplay) /> 
49    <#assign content = articleDisplay.getContent() /> 
50    ${content} 
51</#if> 
52 
53<#if entries?has_content> 
54 
55    <table id="lohaTable" class="table-striped tablesorter" > 
56        <thead> 
57            <tr> 
58                <th>${languageUtil.get(locale, "kelafi_loha_form")}</th> 
59                <th id="lohaTableTunnus">${languageUtil.get(locale, "kelafi_loha_id")}</th> 
60                <th>${languageUtil.get(locale, "kelafi_loha_description")}</th> 
61                <th>${languageUtil.get(locale, "kelafi_loha_content")}</th> 
62            </tr> 
63        </thead> 
64        <tbody> 
65            <#assign loopcount = 0 /> 
66            <#list entries?sort_by("viewCount")?reverse as entry> 
67 
68                <#assign dlFileEntryId = entry.getClassPK() /> 
69                <#assign fileEntry = DLAppLocalServiceUtil.getFileEntry(dlFileEntryId)  /> 
70                <#assign map = fileEntry.getDLFileEntry().getFieldsMap(fileEntry.getFileVersion().fileVersionId).get(LOHA_LOMAKE) /> 
71 
72                <#if map.get(LOHA_KIELI)?has_content && map.get(LOHA_KIELI).getRenderedValue(LocaleUtil.fromLanguageId("fi_FI")) == siteLang > 
73 
74                    <#if categoryId?has_content > 
75                    <#else> 
76                        <#assign loopcount = loopcount + 1 /> 
77                        <#if loopcount gt popularForms?number > 
78                            <#break> 
79                        </#if> 
80                    </#if> 
81 
82                    <tr> 
83                        <td> 
84                            <#if map.get(LOHA_OTSIKKO)?has_content && map.get(LOHA_OTSIKKO).getRenderedValue(LocaleUtil.fromLanguageId("fi_FI"))?has_content > 
85                                ${map.get(LOHA_OTSIKKO).getRenderedValue(LocaleUtil.fromLanguageId("fi_FI"))} 
86                            <#else> 
87                                N/A 
88                            </#if> 
89                        </td> 
90                        <td> 
91                            <#if map.get(LOHA_KOODI)?has_content && map.get(LOHA_KOODI).getRenderedValue(LocaleUtil.fromLanguageId("fi_FI"))?has_content > 
92                                ${map.get(LOHA_KOODI).getRenderedValue(LocaleUtil.fromLanguageId("fi_FI"))} 
93                            <#else> 
94                                N/A 
95                            </#if> 
96                        </td>  
97                        <td> 
98                            <#if map.get(LOHA_KUVAUS)?has_content && map.get(LOHA_KUVAUS).getRenderedValue(LocaleUtil.fromLanguageId("fi_FI"))?has_content > 
99                                ${map.get(LOHA_KUVAUS).getRenderedValue(LocaleUtil.fromLanguageId("fi_FI"))} 
100                                <#if categoryId?has_content > 
101                                <#else> 
102                                    <#assign categories = AssetCategoryLocalServiceUtil.getCategories(entry.getClassName(), dlFileEntryId) /> 
103                                    <br /> 
104                                    <#list categories as category> 
105                                        <#if category.isRootCategory() == false || AssetCategoryLocalServiceUtil.getChildCategories(category.getCategoryId())?size == 0> 
106                                            <span class="lfr-token" style="margin-top: 5px;"> 
107                                                <span class="lfr-token-text"> 
108                                                    <a onclick="javascript:document.getElementById('nav_${category.getTitle(siteLang)?replace(" ", "")}').click()"> 
109                                                        ${category.getTitle(siteLang)} 
110                                                    </a> 
111                                                </span> 
112                                            </span> 
113                                        </#if> 
114                                    </#list>      
115                                </#if> 
116                            <#else> 
117                                N/A 
118                            </#if> 
119                        </td>  
120                        <td> 
121                            <i class="icon-file"></i> <a href="${themeDisplay.getPortalURL()}/documents/${fileEntry.getGroupId()}/${fileEntry.getFolderId()}/${fileEntry.getTitle()}" >${languageUtil.get(locale, "kelafi_loha_download")}</a> 
122                            <#if map.get(LOHA_LINKKI)?has_content && map.get(LOHA_LINKKI).getRenderedValue(LocaleUtil.fromLanguageId("fi_FI"))?has_content  > 
123                                <br /><br /> 
124                                <i class="icon-external-link"></i> <a href="${map.get(LOHA_LINKKI).getRenderedValue(LocaleUtil.fromLanguageId('fi_FI'))}" target="_blank"> 
125                                	<#if map.get(LOHA_LINKKI_KUVAUS)?has_content && map.get(LOHA_LINKKI_KUVAUS).getRenderedValue(LocaleUtil.fromLanguageId("fi_FI"))?has_content > 
126                                		${map.get(LOHA_LINKKI_KUVAUS).getRenderedValue(LocaleUtil.fromLanguageId("fi_FI"))} 
127                                	<#else> 
128                                		N/A 
129                                	</#if> 
130                                </a> 
131                            </#if> 
132                        </td>      
133                    </tr>  
134                </#if> 
135            </#list> 
136        </tbody> 
137    </table> 
138</#if> 
139</div> 
140 
141<#-- 
142KÄYTETYT LUOKAT, TYYPIT JA NIIDEN DOKUMENTAATIO 
143 
144${entry} = com.liferay.portlet.documentlibrary.model.DLFileEntry 
145https://docs.liferay.com/portal/6.2/javadocs/com/liferay/portlet/documentlibrary/model/DLFileEntry.html 
146 
147${fileEntry} = com.liferay.portal.repository.liferayrepository.model.LiferayFileEntry 
148https://docs.liferay.com/portal/6.2/javadocs-all/com/liferay/portal/repository/liferayrepository/model/LiferayFileEntry.html 
149 
150${map} =  Map<String,Fields> = com.liferay.portlet.dynamicdatamapping.storage.Fields 
151https://docs.liferay.com/portal/6.2/javadocs-all/com/liferay/portlet/dynamicdatamapping/storage/Fields.html 
152 
153${categories} = List<AssetCategory> = com.liferay.portlet.asset.model.AssetCategory 
154https://docs.liferay.com/portal/6.2/javadocs/com/liferay/portlet/asset/model/AssetCategory.html 
155-->