Se ha producido un error al procesar la plantilla.
Java method "com.sun.proxy.$Proxy679.getCategoryProperty(long, String)" threw an exception when invoked on com.sun.proxy.$Proxy679 object "com.liferay.asset.category.property.service.impl.AssetCategoryPropertyLocalServiceImpl@248ba359"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: #if assetCategoryPropertyService.getC... [in template "217051#217099#573561" at line 20, column 5] ----
1<#assign assetCategoryService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")
2 assetCategoryPropertyService = serviceLocator.findService("com.liferay.asset.category.property.service.AssetCategoryPropertyLocalService")
3 assetCategoriesCustomService = serviceLocator.findService("pa.mtl.assetcategories.service.api.AssetCategoriesServiceApi")
4 SAXReaderUtil = staticUtil["com.liferay.portal.kernel.xml.SAXReaderUtil"]
5 HtmlUtil = staticUtil["com.liferay.portal.kernel.util.HtmlUtil"]
6 layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")
7 PortletURLFactoryUtil = staticUtil["com.liferay.portal.kernel.portlet.PortletURLFactoryUtil"]
8 PortletRequest = staticUtil["javax.portlet.PortletRequest"]
9 journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")
10 ParamUtil = staticUtil["com.liferay.portal.kernel.util.ParamUtil"]
11 categoryId = ParamUtil.getLong(request,"categoryId", 0)
12 portalUtil = staticUtil["com.liferay.portal.kernel.util.PortalUtil"]
13 />
14<!-- Comprobación de la propiedad categoryId -->
15<#if (categoryId <= 0) >
16 <#assign categoryId = ParamUtil.getLong(renderRequest,"categoryId", 0)/>
17</#if>
18
19<#if (categoryId > 0) >
20 <#if assetCategoryPropertyService.getCategoryProperty(categoryId,"idContenido") ? has_content >
21 <#assign contentIdProperty = assetCategoryPropertyService.getCategoryProperty(categoryId,"idContenido")/>
22 <#assign contentId = contentIdProperty.getValue()/>
23 <#if contentId ? has_content>
24 <#assign journalArticleSub = journalArticleService.getLatestArticle(groupId,contentId)/>
25
26 <#assign document = SAXReaderUtil.read(journalArticleSub.getContentByLocale(locale))
27 destacamosNode = document.selectNodes("/root/dynamic-element[@name='destacamos']/dynamic-content")
28 />
29 <#if destacamosNode[0].getText()?has_content>
30 <div class="caja-redonda sin-fondo">
31 <h3>${languageUtil.get(locale,'webasturias.destacamos.titulo')}</h3>
32 <div class="caja-redonda-content">
33 <div class="content-summary without-icon">
34 <ul>
35 <#assign structureEnlace = assetCategoriesCustomService.getJournalStructureByKey(groupId, "STR_ENLACE") />
36 <#assign structureEnlaceSidra = assetCategoriesCustomService.getJournalStructureByKey(groupId, "STR_ENLACE_SIDRA") />
37 <#assign structureArticulo = assetCategoriesCustomService.getJournalStructureByKey(groupId, "STR_ARTICULO") />
38
39 <#list destacamosNode as destacamos>
40 <#if destacamos?has_content>
41 <#if destacamos.getText() ? has_content>
42 <#assign destacamosJSONObject = jsonFactoryUtil.createJSONObject(destacamos.getText()) />
43 <#if destacamosJSONObject.get("classPK")?has_content>
44 <#assign destacamosClassPk = destacamosJSONObject.get("classPK") />
45 <#assign journalArticle = journalArticleService.fetchLatestArticle(destacamosClassPk?number)
46 currentUrl = renderResponse.createRenderURL()
47 document = SAXReaderUtil.read(journalArticle.getContentByLocale(locale))
48 urlEnlace = ""
49 titulo = ""
50 />
51
52 <#if document.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content") ? has_content>
53 <#assign tituloNode = document.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content")
54 titulo = tituloNode.getText()
55 />
56 </#if>
57 <#if document.selectSingleNode("/root/dynamic-element[@name='urlEnlace']/dynamic-content") ? has_content>
58 <#assign urlEnlaceNode = document.selectSingleNode("/root/dynamic-element[@name='urlEnlace']/dynamic-content")
59 urlEnlace = urlEnlaceNode.getText()
60 />
61 </#if>
62
63 <#if structureArticulo.getStructureKey() == journalArticle.getStructureId() >
64 <#assign detailPage = "detalle"
65 layoutDetail = layoutLocalService.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), false, "/"+detailPage)
66 detailUrl = PortletURLFactoryUtil.create(request, "com_liferay_asset_categories_navigation_web_portlet_AssetCategoriesNavigationPortlet", layoutDetail.getPlid(), PortletRequest.RENDER_PHASE)
67 />
68
69 ${detailUrl.setParameter("articleId", journalArticle.getArticleId())}
70 ${detailUrl.setParameter("categoryId",categoryId?string)}
71
72 <li>
73 <a href="${detailUrl}&articleId=${journalArticle.getArticleId()}&title=${HtmlUtil.escapeURL(titulo)}&redirect=${HtmlUtil.escapeURL(currentUrl)}"
74 title="${languageUtil.get(locale,'webasturias.general.more-info-sobre')} ${titulo}">${titulo}</a>
75 </li>
76 <#elseif structureEnlace.getStructureKey() == journalArticle.getStructureId() >
77 <#if document.selectSingleNode("/root/dynamic-element[@name='urlEnlace']/dynamic-content") ? has_content>
78 <#assign urlEnlaceNode = document.selectSingleNode("/root/dynamic-element[@name='urlEnlace']/dynamic-content")
79 urlEnlace = urlEnlaceNode.getText()
80 />
81 </#if>
82 <li>
83 <a class="popup" target="_blank" href="${urlEnlace}"
84 title="${titulo}. ${languageUtil.get(locale,'webasturias.general.external-link')}">${titulo}</a>
85 </li>
86 <#elseif structureEnlaceSidra.getStructureKey() == journalArticle.getStructureId() >
87 <#assign assetCategory = assetCategoryService.getCategory(categoryId)
88 categoryName = assetCategory.getTitle(locale)
89 titulo = titulo?replace("xxxx", categoryName)/>
90
91 <#if document.selectSingleNode("/root/dynamic-element[@name='urlEnlace']/dynamic-content") ? has_content>
92 <#assign urlEnlaceNode = document.selectSingleNode("/root/dynamic-element[@name='urlEnlace']/dynamic-content")
93 urlEnlace = urlEnlaceNode.getText()?replace("migaurlReplace", portalUtil.getCurrentCompleteURL(request))?replace("migatextoReplace", categoryName)?replace("textoReplace", categoryName)
94 />
95 </#if>
96 <li>
97 <a class="popup" target="_blank" href="${urlEnlace}"
98 title="${titulo}. ${languageUtil.get(locale,'webasturias.general.external-link')}">${titulo}</a>
99 </li>
100 </#if>
101 </#if>
102 </#if>
103 </#if>
104 </#list>
105 </ul>
106 </div>
107 </div>
108 </div>
109 </#if>
110 </#if>
111 </#if>
112</#if>