An error occurred while processing the template.
Denied resolving class org.apache.catalina.core.ApplicationHttpRequest by org.apache
1#set ($AssetCategoryLocalService = $serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")) 
2<div class="ay-media-filter taglib-asset-categories-navigation"> 
3  <select id="ay-media-cat-filter" class="ay-select-field"> 
4    <option value="-1">Select Year</option> 
5    #if (!$entries.isEmpty()) 
6      #set ($menuItems= []) 
7      #foreach ($curVocabulary in $entries) 
8 
9        #foreach ($curCat in $curVocabulary.getCategories()) 
10 
11          #set($selectStatus = "") 
12 
13          #if($request.getParameter("categoryId") == $curCat.categoryId) 
14            #set($selectStatus = "selected") 
15          #end 
16 
17 
18          ##create render url for category for link of it, and provide there required parameter 
19          #set($catURL = $renderResponse.createRenderURL()) 
20          #set($categoryId = $curCat.categoryId.toString()) 
21          #set($pqr = $catURL.setParameter("categoryId", $categoryId)) 
22          #set($abc = $catURL.setParameter("resetCur", "true")) 
23          #set ($tmp = $menuItems.add({"title" : "$curCat.name", "url" : "$catURL","isactive" : "$selectStatus"})) 
24 
25 
26        #end 
27 
28        #foreach ($item in $sortTool.sort($menuItems, 'title:desc')) 
29          #if($item.title != 2010) 
30            <option value="$item.url" $item.isactive>$item.title</option> 
31          #end 
32        #end 
33 
34      #end 
35    #end 
36  </select> 
37</div> 
38<script> 
39  $(window).load(function(){ 
40    $("#ay-media-cat-filter").bind("change",function(){ 
41      if($(this).val()!=-1){ 
42        window.location=$(this).val(); 
43
44    }); 
45  }); 
46</script> 
An error occurred while processing the template.
Denied resolving class org.apache.velocity.util.ArrayListWrapper by org.apache
1#set( $defaultLocale = $portalUtil.getSiteDefaultLocale($groupId).toString() ) 
2#set( $LayoutLocalService = $serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService") ) 
3#set( $portalUrl = $themeDisplay.getPortalURL()) 
4 
5#set( $GroupLocalService = $serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService") ) 
6#set( $CompanyLocalService = $serviceLocator.findService("com.liferay.portal.kernel.service.CompanyLocalService") ) 
7#set( $group = $GroupLocalService.getGroup($groupId) ) 
8#set( $basePortalUrl = $company.getPortalURL($groupId) ) 
9#set( $siteFriendlyUrl = $group.getFriendlyURL() ) 
10#set( $pathPublicUrl = $portalUtil.getPathFriendlyURLPublic() ) 
11#set( $localePrefix = "/" + $locale.getLanguage() + "_" + $locale.getCountry() ) 
12 
13#set( $linkToBase = $localePrefix + $pathPublicUrl + $siteFriendlyUrl ) 
14#set( $linkToMore = $localePrefix + $pathPublicUrl + $siteFriendlyUrl ) 
15 
16#set( $layoutPreferenceArray = $getterUtil.getStringValues($portletPreferences.get("portletSetupLinkToLayoutUuid")) ) 
17#if( $layoutPreferenceArray.size() > 0 ) 
18 
19    #set( $linkToLayoutUuid = $layoutPreferenceArray.get(0) ) 
20    #set( $linkToLayout = $LayoutLocalService.getLayoutByUuidAndCompanyId($linkToLayoutUuid,$themeDisplay.getCompanyId()) ) 
21 
22    #set( $linkToBase = $localePrefix + $pathPublicUrl + $siteFriendlyUrl + $linkToLayout.getFriendlyURL($locale) ) 
23    #set( $linkToMore = $localePrefix + $pathPublicUrl + $siteFriendlyUrl + $linkToLayout.getFriendlyURL($locale) ) 
24 
25#end 
26 
27##set javascript array for edit links when applicable 
28<script> 
29    var editlink=new Array(); 
30</script> 
31 
32<div class="ay-block__light"> 
33  <h3 class="ay-block__light__title ay-block__light__title--blue">$languageUtil.get($locale, "ay-media-media-coverage-title")</h3> 
34  <div class="ay-block__light--content"> 
35 
36      #set ($journalArticleService = $serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")) 
37      #set ($journalContent = $serviceLocator.findService("com.liferay.journal.util.JournalContent")) 
38 
39    #if (!$entries.isEmpty()) 
40      ##loopy bit 
41      #foreach ($curEntry in $entries) 
42        #set($renderer = $curEntry.getAssetRenderer() ) 
43        #set($className = $renderer.getClassName() ) 
44 
45          #if( $className == "com.liferay.journal.model.JournalArticle" ) 
46 
47            #set ($article = $journalArticleService.getLatestArticle($curEntry.getClassPK())) 
48            #set ($articleId = $article.getArticleId()) 
49            #set ($ddmTemplateKey = "MEDIA_COVERAGE_LIST_ITEM") 
50            #set ($viewMode = $renderRequest.getPortletMode()) 
51            #set ($languageId = $themeDisplay.getLanguageId()) 
52            #set ($articleGroupId = $article.getGroupId()) 
53 
54            #set ($entryMarkup = $journalContent.getContent($articleGroupId, "$articleId", "$ddmTemplateKey", "$viewMode", "$languageId", $themeDisplay)) 
55            #set( $linkToBase = "./broker-profile/-/article/") 
56 
57 
58            ##get display date and article title 
59            #set( $displayDate = $article.getDisplayDate()) 
60            #set( $datePath = $dateTool.format("yyyy/MM/dd/", $displayDate, $locale) ) 
61            #set( $urlTitle = $article.getUrlTitle() ) 
62            ##set link to article 
63            #set( $link = $linkToBase + $datePath + $urlTitle) 
64            ##remplace token from template with link 
65            $entryMarkup.replace('[link]',"$link") 
66 
67        #end 
68      #end 
69    #end 
70 
71    ## sets pagination logic 
72 
73        #set($delta = 0) 
74        #set($deltaStr = $portletPreferences.get("pageDelta").get(0)) 
75        #if ( $validator.isNotNull($deltaStr) ) 
76            #set ($delta = $delta.parseInt($deltaStr)) 
77        #end 
78 
79 
80        #set( $page = 1 ) 
81        #set( $pageStr = $renderRequest.getParameter("cur") ) 
82        #if ( $validator.isNotNull($pageStr) ) 
83            #set ($page = $page.parseInt($pageStr)) 
84        #end 
85 
86 
87        #set( $numArt = $total ) 
88        #set( $extraArt = $numArt % $delta ) 
89 
90 
91        #if ($numArt > $delta) 
92            #if ( $extraArt == 0 ) 
93                #set( $numPages = ($numArt / $delta) ) 
94            #else 
95                #set( $numPages = ($numArt / $delta) + 1 ) 
96            #end 
97        #else 
98            #set ($numPages = 1) 
99        #end 
100 
101        #set($pointer = 0) 
102        #if ($page <3) 
103            #set ($pointer = 3) 
104        #elseif ($page > $numPages - 7) 
105            #set ($pointer = $numPages - 7) 
106        #else 
107            #set ($pointer = $page) 
108        #end 
109 
110        #set($start = $pointer - 7) 
111        #if ($start <= 0) 
112            #set ($start = 1) 
113        #end 
114        #set($end = $pointer + 7) 
115        #if ($end > $numPages) 
116            #set ($end = $numPages) 
117        #end 
118 
119        #set($range = [$start..$end]) 
120 
121        #set( $ppid = $themeDisplay.getPortletDisplay().getId()) 
122 
123    ##sets logic of current number articles displayed displayed 
124        #set ( $curEnds =  $delta  ) 
125        #set ( $curCounts =  0  ) 
126        #set ( $curCounts2 =  $curCounts.parseInt($page) ) 
127        #set ( $curEnds2 =  ($curEnds * $curCounts2) ) 
128        #set ( $curStarts = $curEnds2 - $delta + 1) 
129        #set($allpros = 0) 
130 
131 
132    ##pagination creation 
133    ## sets page number variable 
134        #set( $ppid_cur="_"+$ppid+"_cur") 
135        #set( $categoryId = $request.getParameter("categoryId") ) 
136        #set( $resetCur = $request.getParameter("resetCur") ) 
137        #if ( $resetCur && $resetCur == true) 
138          #set( $page = 1 ) 
139        #end 
140        #if ($numPages > 1 && $delta > 5) 
141 
142            <nav class="ay-pagination" style="margin-top:20px;"> 
143                <ul class="ay-pagination--pagination-list"> 
144                    #if ($page > 1) 
145                        #set ($prevPagef = $page - 1) 
146                        <li><a href="?p_p_id=$ppid&p_p_lifecycle=0&p_r_p_564233524_resetCur=false&$ppid_cur=$prevPagef&p_r_p_564233524_categoryId=$categoryId" class="aoc-button"><svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMin slice"><use xlink:href="/o/ay-theme/resources/images/images.svg#arrow-right"></use></svg></a></li> 
147                    #else 
148                        <li><svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMin slice"> 
149                            <use xlink:href="/o/ay-theme/resources/images/images.svg#arrow-right"></use> 
150                        </svg></li> 
151                    #end 
152                    #foreach($i in $range) 
153                        #if ($i != $page) 
154 
155                        <li><a href="?p_p_id=$ppid&p_p_lifecycle=0&p_r_p_564233524_resetCur=false&$ppid_cur=$i&p_r_p_564233524_categoryId=$categoryId" >$i</a></li> 
156                        #else 
157                            <li>$page</li> 
158                        #end 
159                    #end 
160                    #if ($page < $numPages) 
161                        #set ($nextPagef = $page + 1) 
162                        <li><a href="?p_p_id=$ppid&p_p_lifecycle=0&p_r_p_564233524_resetCur=false&$ppid_cur=$nextPagef&p_r_p_564233524_categoryId=$categoryId" ><svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMin slice"><use xlink:href="/o/ay-theme/resources/images/images.svg#arrow-right"></use></svg></a></li> 
163                    #else 
164                        <li><svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMin slice"> 
165                            <use xlink:href="/o/ay-theme/resources/images/images.svg#arrow-right"></use> 
166                        </svg></li> 
167                    #end 
168                </ul> 
169            </nav> 
170        #end 
171 
172        <a href="$linkToMore" class="ay-block__light--link ay-more-link">$languageUtil.get($locale, "ay-gen-more")</a> 
173        <style> #ay .ay-column.ay-column__double.portlet-layout .ay-pagination{ display:none; } #ay .ay-block__light--link.ay-more-link{ display: none; } #ay .ay-column.ay-column__double.portlet-layout .ay-block__light--link.ay-more-link{ display:block; } </style> 
174 
175    </div> 
176</div> 
177 
178 
179#foreach ($curEntry in $entries) 
180## create edit URL 
181    #set ($portletName = $themeDisplay.getPortletDisplay().getPortletName()) 
182    #set ($plid = $getterUtil.getLong($themeDisplay.getPlid())) 
183    #set ($portletURL = $portletURLFactory.create($renderRequest, $portletName, $plid, "RENDER_PHASE")) 
184    #set ($windowState = $windowStateFactory.getWindowState("POP_UP")) 
185    #set ($assetRenderer = $$curEntry.getAssetRenderer()) 
186    #set ($editURL = $assetRenderer.getURLEdit($renderRequest,$renderResponse, $windowState, $portletURL)) 
187    #if($assetRenderer.hasEditPermission($permissionChecker)) 
188    <script> 
189        editlink.push('$editURL'); 
190    </script> 
191    #end 
192#end 
193 
194##creates edit links for list when logged in 
195<script> 
196 
197    $(window).load(function(){ 
198        if(editlink.length > 0){ 
199            //console.log(editlink.length+" "+$(".ay-search-proff-table tr").not(".ay-search-proff-table tr table tr").length) 
200            $(".ay-media-post__main--content").each(function(index, value){ 
201 
202                $(this).html($(this).html()+'<a class="ay-adt-editlink" href="javascript:editModal.open(\''+editlink[index]+'\')" >$languageUtil.get($locale, "ay-gen-edit")</a>'); 
203 
204            }); 
205 
206
207    }) 
208 
209    var closeModal={ 
210        close:function(){ 
211            $('.editModal-container ').remove(); 
212
213
214 
215    var editModal={ 
216        open:function(ifo){ 
217            //alert(ifo); 
218            $("body").append('<div class="editModal-container"><a class="ay-edit-model-close" href="javascript:closeModal.close()"> X </a><div><iframe src="'+ifo+'"></iframe></div></div>'); 
219
220
221</script> 
222 
223<style> 
224    .ay-media-post__main--content{ 
225        display:flex; 
226        align-items:flex-start; 
227        justify-content:flex-start; 
228
229 
230    .ay-media-post__main--content a{ 
231        display:block; 
232
233 
234    a.ay-adt-editlink{ 
235        margin-left: auto; 
236
237    .editModal-container{ 
238        width:100%; 
239        height:100%; 
240        position: fixed; 
241        top:0; 
242        left:0; 
243        z-index: 500; 
244        background: rgba(255,255,255,.85); 
245        display: flex; 
246        flex-direction: column; 
247
248    .editModal-container a{ 
249        align-self: flex-end; 
250        display: block; 
251        margin:10px 10px 0 0; 
252        font-size: 18px; 
253
254    .editModal-container div{ 
255        width:95%; 
256        height: 95%; 
257        margin:auto; 
258        border: 1px solid #ccc; 
259        padding:10px; 
260        background:#fff; 
261
262    .editModal-container iframe { 
263        width:100%; 
264        height: 100%; 
265        border: none; 
266
267</style>