Nav Bar do usuário deslogado.

Eventos

AGENDA / inscrições

Um erro ocorreu enquanto processava o modelo.
The following has evaluated to null or missing:
==> xPathSelector.selectSingleNode( root )  [in template "34764#34807#41107" at line 21, column 41]

----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign erro = xPathSelector.selectSi...  [in template "34764#34807#41107" in function "getSingleNode" at line 21, column 25]
----
1<#-- file path: default-theme/assets/agenda-inscricoes/palestras.ftl --> 
2 
3<#setting locale=locale.toString()> 
4 
5<#assign prefix = "bioec-agenda-inscricoes" /> 
6<#assign image404 = "https://via.placeholder.com/300x300?text=404" /> 
7<#assign dlAppService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppService")> 
8<#assign categoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") > 
9<#assign tagsLocalService     = serviceLocator.findService("com.liferay.asset.kernel.service.AssetTagLocalService") > 
10 
11 
12<#function getRootElement curEntry> 
13    <#assign assetRenderer = curEntry.getAssetRenderer() /> 
14    <#assign article = assetRenderer.getArticle() /> 
15    <#assign document = saxReaderUtil.read(article.getContent()) /> 
16    <#return { "root": document.getRootElement(), "article": article  } /> 
17</#function> 
18 
19<#function getSingleNode name root> 
20    <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@field-reference='${name}']/dynamic-content[@language-id='${locale}']") /> 
21			<#assign erro = xPathSelector.selectSingleNode( root )>  
22				<#if xPathSelector.selectSingleNode( root )??> 
23			<#return xPathSelector.selectSingleNode( root ).getStringValue()?trim />	 
24 
25        <#else> 
26            <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@field-reference='${name}']") /> 
27            <#return xPathSelector.selectSingleNode( root ).getStringValue()?trim /> 
28					  
29    </#if> 
30</#function> 
31 
32<#macro getUrlImage imageString article> 
33    <#attempt> 
34        <#assign fileJson = jsonFactoryUtil.createJSONObject(imageString) /> 
35        <#assign fileEntryId = getterUtil.getInteger(fileJson.get('fileEntryId')) /> 
36        <#assign fileEntry = dlAppService.getFileEntry(fileEntryId) /> 
37        <#assign adaptive = "/o/adaptive-media/image/${fileEntryId}/Thumbnail-300x300/${fileJson.get('title')}"> 
38        <#assign urlImage = themeDisplay.getPortalURL() + "/documents/" + fileEntry.groupId + "/" + fileEntry.uuid + "?t=" + .now?string["HHmmssSSS"]?string /> 
39    <#recover> 
40        <#assign adaptive = image404 /> 
41        <#assign urlImage = image404 /> 
42        <#assign fileEntryId = "" /> 
43    </#recover> 
44 
45    <style> 
46        .${prefix}__image{ 
47            width:100%; 
48            background: url(${urlImage!image404}) no-repeat; 
49            background-size:cover; 
50            background-position: center center; 
51            //max-height: 354px; 
52            //min-height: 319px; 
53			aspect-ratio: 600/390; 
54
55 
56        .lfr-pagination{ 
57            display:none; 
58
59    </style> 
60 
61    <picture data-fileentryid="${fileEntryId}"> 
62        <source  srcset="${adaptive!image404}" /> 
63			<a href="/web/guest/w/${article.getUrlTitle()}"> 
64        		<img class="${prefix}__image" data-fileentryid="${fileEntryId}" src="${urlImage!image404}" /> 
65			</a> 
66    </picture> 
67</#macro> 
68 
69<style> 
70    .${prefix}__title{ 
71        font-style: normal; 
72        font-weight: var(--font-weight-bold); 
73        font-size: 18px; 
74        line-height: 30px; 
75        text-transform: uppercase; 
76        font-feature-settings: 'cpsp' on; 
77        color: #000000; 
78        cursor:pointer; 
79
80    .${prefix}__title:hover{ 
81        text-decoration:underline; 
82
83    .${prefix}-container{ 
84        display: grid; 
85        grid-column-gap: 50px; 
86        grid-template-columns: auto; 
87
88 
89    @media(min-width:1025px){ 
90        .${prefix}-container{ 
91			grid-template-columns: repeat(3, minmax(0, 1fr)); 
92
93
94 
95    .${prefix}-item__date{ 
96        position:absolute; 
97        bottom:0px; 
98        right:0px; 
99        background-color:#000; 
100        display:flex; 
101        flex-direction:column; 
102        align-items:center; 
103        justify-content:center; 
104        padding: 15px; 
105
106 
107    .${prefix}-item__date span:first-child{ 
108        border-bottom: 1px solid #fff; 
109        width: 100%; 
110
111 
112    .${prefix}-item__date span{ 
113        font-style: normal; 
114        font-weight: var(--font-weight-normal); 
115        font-size: 16px; 
116        text-align: center; 
117        color: #FFFFFF; 
118
119 
120	.${prefix}-image-container { 
121		position: relative; 
122		cursor: pointer !important; 
123
124 
125	.${prefix}-image-container:hover { 
126			filter: brightness(60%); 
127
128</style> 
129 
130<div class="${prefix}"> 
131    <#if entries?has_content> 
132        <div class="${prefix}-container"> 
133            <#list entries as entry> 
134                <#assign element = getRootElement(entry) /> 
135                <#assign article = element.article /> 
136 
137                <#assign title = getSingleNode("Text67325905", element.root) /> 
138                <#assign image = getSingleNode("Image46086326", element.root) /> 
139                <#assign date  = getSingleNode("Date03245611", element.root) /> 
140                <#assign day   = date?date("yyyy-MM-dd")?string("dd") /> 
141                <#assign month = date?date("yyyy-MM-dd")?string("MMM") /> 
142 
143                <#assign categoryIds = categoryLocalService.getCategoryIds("com.liferay.journal.model.JournalArticle", article.getResourcePrimKey()?number ) > 
144                <#assign tags = tagsLocalService.getTags("com.liferay.journal.model.JournalArticle", article.getResourcePrimKey()?number ) > 
145 
146                <div class="${prefix}-item mb-4 mt-5 d-flex flex-column"> 
147                    <div class="${prefix}-image-container"> 
148                        <div class="${prefix}-item__date"> 
149                            <span>${day}</span> 
150                            <span>${month}</span> 
151                        </div> 
152                        <@getUrlImage image article/> 
153                    </div> 
154 
155                    <div style="max-width:490px;"> 
156                        <@renderLabelsPath categoryIds tags date /> 
157                        <h1 onclick="javascript:window.location='/web/guest/w/${article.getUrlTitle()}'" class="${prefix}__title mb-3 mt-3">${title}</h1> 
158                    </div> 
159                </div> 
160            </#list> 
161        </div> 
162 
163        <div class="d-flex justify-content-center mb-5 mt-5"> 
164            <@makePagination /> 
165        </div> 
166    </#if> 
167</div> 
168 
169 
170<#macro makePagination> 
171    <#assign searchContainer = renderRequest.getAttribute("ASSET_PUBLISHER_DISPLAY_CONTEXT").getSearchContainer()/> 
172    <#assign total = searchContainer.getTotal() /> 
173    <#assign start = searchContainer.getStart() /> 
174    <#assign delta = searchContainer.getDelta() /> 
175    <#assign totalPages = (total/delta)?ceiling /> 
176    <#assign currentPage = ((start+1)/delta)?ceiling /> 
177 
178 
179    <style> 
180				.custom-pagination--page{ 
181					border: 2px solid #99a9b5; 
182					margin: 0 8px; 
183					width: 30px; 
184					height: 30px; 
185					line-height: 26px; 
186					text-align: center; 
187					display: inline-block; 
188					color: #99a9b5; 
189					background-color: #ffffff; 
190					text-decoration: none; 
191
192				.custom-pagination--page:hover{ 
193					border-color: #00bcd4; 
194					background-color: #00bcd4; 
195					text-decoration:none; 
196		      color: #ffffff; 
197
198				.custom-pagination--active{ 
199					border-color: #3c3950 !important; 
200					background-color: #3c3950 !important; 
201					color: #ffffff !important; 
202
203    </style> 
204 
205		<#if totalPages gt 1 > 
206		    <div class="pagination-container"> 
207					<#list 1..totalPages as page> 
208							<#assign iteratorURL = searchContainer.getIteratorURL() /> 
209							${iteratorURL.setParameter("cur", "${page}")} 
210							<#assign URL = iteratorURL.toString() /> 
211 
212							<a href="${URL}" class="custom-pagination--page ${ (page == currentPage)?string('custom-pagination--active', '') }">${page}</a> 
213					</#list> 
214			</div> 
215		</#if> 
216</#macro> 
217 
218 
219 
220<#macro renderLabelsPath categoryIds tags createDate> 
221    <style> 
222        .custom-breadcrumb-highlights__date{ 
223            font-style: normal; 
224            font-weight: var(--font-weight-light); 
225            font-size: 11px; 
226            line-height: 30px; 
227            color: #4F4E4E; 
228
229        .custom-breadcrumb-highlights__category{ 
230            font-style: normal; 
231            font-weight: var(--font-weight-bold); 
232            font-size: 11px; 
233            line-height: 30px; 
234            color: #000; 
235            text-transform: uppercase; 
236
237        .custom-breadcrumb-highlights__date:after{ 
238            content:"/"; 
239            font-weight: var(--font-weight-light); 
240            font-size: 11px; 
241            color: #4F4E4E; 
242            margin-left:5px; 
243            margin-right:5px; 
244
245        .custom-breadcrumb-highlights__tag{ 
246            padding: 4px; 
247            border: 1px solid #000000; 
248            border-radius: 20px; 
249            font-style: normal; 
250            font-weight: var(--font-weight-light); 
251            font-size: 11px; 
252            color: #000000; 
253            text-transform:uppercase; 
254            vertical-align:middle; 
255
256        .custom-breadcrumb-highlights__tag:hover{ 
257            text-decoration:none; 
258            color: #000000; 
259
260    </style> 
261 
262    <#assign category = ""> 
263    <#if categoryIds?has_content> 
264        <#list categoryIds as categoryId> 
265            <#assign category = categoryLocalService.getCategory( categoryId?number ) > 
266            <#assign category = category.name > 
267        </#list> 
268    </#if> 
269 
270 
271    <div class="custom-breadcrumb-highlights mb-3 mt-3"> 
272        <span class="custom-breadcrumb-highlights__date">${createDate?date("yyyy-MM-dd")?string("dd MMM, yyyy")}</span> 
273        <span class="custom-breadcrumb-highlights__category">${category}</span> 
274    </div> 
275</#macro>