Suche nach aktiven Tourismusunternehmen
Fehler bei der Verarbeitung der Vorlage.
Denied access to method or field getAttribute of class org.apache.catalina.core.ApplicationHttpRequest

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #if request.getAttribute("sortedCateg...  [in template "37703#37743#12903551" at line 102, column 1]
	- Reached through: @liferay_aui["form"] action="${search...  [in template "37703#37743#12903551" at line 24, column 9]
----
1<#-- Preferences --> 
2<#assign showLabels = getterUtil.getBoolean(showLabels)/> 
3 
4<#-- Params --> 
5<#assign searchText = paramUtil.getString(themeDisplay.getRequest(), "p_r_p_searchText")/> 
6<#assign categoryIds = paramUtil.getLongValues(themeDisplay.getRequest(), "p_r_p_categoryIds")/> 
7<#assign anyCategoryIds = paramUtil.getLongValues(themeDisplay.getRequest(), "p_r_p_anyCategoryIds")/> 
8<#assign startDate = paramUtil.getString(themeDisplay.getRequest(), "p_r_p_startDate")/> 
9<#assign endDate = paramUtil.getString(themeDisplay.getRequest(), "p_r_p_endDate")/> 
10<#assign portletId = portletTool.getPortletId(request)/> 
11 
12 
13<#-- Services --> 
14<#assign assetVocabularyLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService") /> 
15<#assign AssetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") /> 
16 
17<#-- Custom Categories --> 
18<#assign accesibleCategoriesIds = assetCategoryTool.getCategoriesByVocabularyName(themeDisplay.getScopeGroupId(), "marcascalidad", ["Accesible", "Q de Calidad"])> 
19<#assign assetVocabulary = assetVocabularyLocalService.fetchGroupVocabulary(themeDisplay.getScopeGroupId(),"Turismo Activo - Subactividad")!/> 
20 
21<div class="container"> 
22 
23    <@portlet["actionURL"] varImpl="searchURL" name="searchAssets" /> 
24	<@liferay_aui["form"] action="${searchURL}" method="POST" name="searchForm" > 
25	 
26		<fieldset class="input-container"> 
27			<div class="row"> 
28				<div class="col-lg-9 col-12 mb-4"> 
29					<div class="fields-wrapper"> 
30						<@liferay_aui["field-wrapper"]> 
31							<@liferay_aui["input"] label="text" value="${searchText}" name="searchText" cssClass="form-control" placeholder="${placeholder}" /> 
32						</@> 
33						<#if assetVocabulary?has_content> 
34							<#if validator.isNotNull(assetVocabulary)> 
35								<#if validator.isNotNull(assetVocabulary.getDescription(locale))> 
36									<#assign label = "${assetVocabulary.getDescription(locale)}"/> 
37								<#else> 
38									<#assign label = "${assetVocabulary.getTitle(locale)}"/> 
39								</#if> 
40								<#assign assetCategories = AssetCategoryLocalService.getVocabularyRootCategories(assetVocabulary.getVocabularyId(),-1,-1,null)/> 
41								<@liferay_aui["field-wrapper"]>				 
42									<@liferay_aui["select"] ignoreRequestValue=true name="categoryIds" label="${label}" showEmptyOption=showLabels> 
43								 
44										<#if !showLabels> 
45											<@liferay_aui["option"] label="${label}" value="" /> 
46										</#if> 
47									 
48										<#list assetCategories as assetCategory> 
49											<#assign selected = arrayUtil.contains(categoryIds, assetCategory.getCategoryId()) /> 
50											<@liferay_aui["option"] label="${assetCategory.getTitle(locale)}" value="${assetCategory.getCategoryId()}" selected=selected /> 
51										</#list> 
52									</@> 
53								</@> 
54							</#if> 
55						</#if> 
56					</div> 
57				</div> 
58			</div> 
59			<div class="row"> 
60				<#if filter=="vocabularies" && assetVocabularies?has_content> 
61					<#assign assetVocabulariesUuids = stringUtil.split(assetVocabularies)/> 
62					<#list assetVocabulariesUuids as assetVocabulariesUuid> 
63						<#assign assetVocabulary = assetVocabularyLocalService.fetchAssetVocabularyByUuidAndGroupId(assetVocabulariesUuid, groupId)!/> 
64						<#if validator.isNotNull(assetVocabulary)> 
65							<#if assetVocabulary.getName() == "concejos"> 
66								<#assign assetCategories = AssetCategoryLocalService.getVocabularyCategories(assetVocabulary.getVocabularyId(),-1,-1,null)/> 
67								<@liferay_aui["field-wrapper"]>				 
68									<@liferay_aui["select"] ignoreRequestValue=true name="categoryIds" label="${assetVocabulary.getTitle(locale)}" showEmptyOption=showLabels> 
69								 
70										<#if !showLabels> 
71											<@liferay_aui["option"] label="${assetVocabulary.getTitle(locale)}" value="" /> 
72										</#if> 
73									 
74										<#list assetCategories?sort_by("title") as assetCategory> 
75											<#if assetCategory.getParentCategoryId()!=0> 
76												<#assign selected = arrayUtil.contains(categoryIds, assetCategory.getCategoryId()) /> 
77												<@liferay_aui["option"] label="${assetCategory.getTitle(locale)}" value="${assetCategory.getCategoryId()}" selected=selected /> 
78											</#if> 
79										</#list> 
80									</@> 
81								</@> 
82							<#else> 
83								<#assign assetCategories = AssetCategoryLocalService.getVocabularyRootCategories(assetVocabulary.getVocabularyId(),-1,-1,null)/> 
84								<@liferay_aui["field-wrapper"]>				 
85									<@liferay_aui["select"] ignoreRequestValue=true name="categoryIds" label="${assetVocabulary.getTitle(locale)}" showEmptyOption=showLabels> 
86								 
87										<#if !showLabels> 
88											<@liferay_aui["option"] label="${assetVocabulary.getTitle(locale)}" value="" /> 
89										</#if> 
90									 
91										<#list assetCategories as assetCategory> 
92											<#assign selected = arrayUtil.contains(categoryIds, assetCategory.getCategoryId()) /> 
93											<@liferay_aui["option"] label="${assetCategory.getTitle(locale)}" value="${assetCategory.getCategoryId()}" selected=selected /> 
94										</#list> 
95									</@> 
96								</@> 
97							</#if> 
98						</#if> 
99					</#list> 
100				</#if> 
101<#-- 1. Compruebo si ya he ordenado esta petición --> 
102<#if request.getAttribute("sortedCategories")?exists> 
103    <#assign assetCategories = request.getAttribute("sortedCategories") /> 
104<#else> 
105    <!-- 2. Map-sort-unmap como antes --> 
106    <#assign original = assetCategoryTool.buildCategoriesToList(categories)! /> 
107    <#assign pairs    = [] /> 
108    <#list original as cat> 
109        <#assign title = cat.getTitle(locale) /> 
110        <#assign pairs = pairs + [{"cat":cat, "title":title}] /> 
111    </#list> 
112    <#assign sortedPairs    = pairs?sort_by("title") /> 
113    <#assign assetCategories = [] /> 
114    <#list sortedPairs as p> 
115        <#assign assetCategories = assetCategories + [p.cat] /> 
116    </#list> 
117    <!-- 3. Guardo el resultado para este request --> 
118    <#-- El assign devuelve el valor del segundo argumento, así que lo tiramos a una var dummy --> 
119    <#assign _dummy = request.setAttribute("sortedCategories", assetCategories) /> 
120</#if> 
121				<#if filter=="categories" && assetCategories?has_content> 
122				  <div class="col-12 col-lg-10 mb-4 mb-lg-0"> 
123					<div class="panel-wrapper"> 
124					  <div class="h5 text-uppercase"> 
125						${languageUtil.get(locale, "active-tourism-activities")} 
126					  </div> 
127					  <#if assetCategories?has_content> 
128						<div class="checks row"> 
129							<#assign size       = assetCategories?size /> 
130							<#assign n          = getterUtil.getInteger(size/3) + 1 /> 
131							<#assign partitions = assetCategories?chunk(n) />						 
132							<#list partitions as partition> 
133								<#assign orderMd = "order-md-${partition?index}" /> 
134								<#if partition?index==1><#assign orderMd = "order-md-2" /></#if> 
135								<#if partition?index==1><#assign orderMd = "order-md-1" /></#if> 
136								<div class="col-12 col-md-6 ${orderMd} col-lg-4"> 
137								  <#list partition as assetCategory> 
138									<@liferay_aui["field-wrapper"] inlineField=false> 
139									  <#assign checked = arrayUtil.contains(anyCategoryIds, assetCategory.getCategoryId()) /> 
140									  <input class="field" name="_${portletId}_anyCategoryIds" type="checkbox" <#if checked>checked="checked"</#if>	value="${assetCategory.getCategoryId()}"> 
141									  <#assign imageUuid = assetCategoryTool.getCategoryProperty(assetCategory.getCategoryId(), "image")!"" /> 
142									  <#if imageUuid != "" && imageUuid != "NULL"> 
143										<#assign imagePath = dlTool.getPathByUuid(imageUuid, groupId) /> 
144										<img src="${imagePath}" alt="${assetCategory.getTitle(locale)}"> 
145									  <#else> 
146										<span>${assetCategory.getTitle(locale)}</span> 
147									  </#if> 
148									</@> 
149								  </#list> 
150								</div> 
151							</#list> 
152						</div> 
153					  </#if> 
154					</div> 
155				  </div> 
156				</#if> 
157 
158				<div class="col-12 col-lg-2 align-self-end"> 
159					<div class="button-holder "> 
160						<button id="save" class="btn btn-primary btn-small btn-block text-center text-uppercase" type="submit"> 
161							<span class="fas fa-search"> 
162								<span class="hide-accessible">search</span> 
163							</span> 
164							<span class="lfr-btn-label">${languageUtil.get(locale, "search")}</span> 
165						</button> 
166					</div> 
167				</div> 
168			</div> 
169		</fieldset> 
170 
171	</@> 
172</div>