Pular para o conteúdo
## Modelo vazio
Um erro ocorreu enquanto processava o modelo.
Expression xPathSelector.selectSingleNode(rootElement) is undefined on line 35, column 27 in 20154#20194#4093376.
1<style> 
2.pagetitle-content input[type="text"] { 
3    color: #fff; 
4    background: rgba(255,255,255,0.3); 
5    border: 0; 
6    padding: 3px 5px; 
7    margin-top: 5px; 
8
9.lfr-token-list{display:none;} 
10.search-layout{display:none;} 
11.control-group{margin-bottom:0 !important;} 
12.pagetitle-content form{margin-bottom:0;display:-webkit-inline-box;margin-left: 20px;} 
13.pagetitle-content{padding:5px 0 0 !important;} 
14</style> 
15 
16 
17<div class="news-list"> 
18    <#assign GroupLocalService = serviceLocator.findService("com.liferay.portal.service.GroupLocalService") /> 
19    <#list  entries as entry  > 
20     
21 <#--   <#assign $latitude = '' /> 
22    <#assign $longitude = '' /> --> 
23        <#assign renderer = entry.getAssetRenderer()  /> 
24        <#assign className = renderer.getClassName()  /> 
25        <#if className == "com.liferay.portlet.journal.model.JournalArticle" > 
26            <#assign journalArticle = renderer.getArticle()  /> 
27            <#assign document = saxReaderUtil.read(journalArticle.getContent())  /> 
28            <#assign rootElement = document.getRootElement()  /> 
29             
30            <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='comandante']/dynamic-content")  /> 
31            <#assign comandante = xPathSelector.selectSingleNode(rootElement).getStringValue() />    
32            <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='unidade']/dynamic-content")  /> 
33            <#assign unidade = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
34            <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='cr']/dynamic-content")  /> 
35            <#assign cr = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
36            <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='cidade']/dynamic-content")  /> 
37            <#assign cidade = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
38             
39            <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='cidade']/dynamic-element[@name='endereco']/dynamic-content")  /> 
40            <#assign endereco = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
41            
42            <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='cidade']/dynamic-element[@name='telefone']/dynamic-content")  /> 
43            <#assign telefone = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
44                <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='cidade']/dynamic-element[@name='email']/dynamic-content")  /> 
45            <#assign email = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
46             
47             <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='latitude']/dynamic-content")  /> 
48            <#assign latitude = xPathSelector.selectSingleNode(rootElement).getStringValue() />          
49             <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='longitude']/dynamic-content")  /> 
50            <#assign longitude = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
51 
52            <#--set( $link = $assetPublisherHelper.getAssetViewURL($renderRequest, $renderResponse, $entry) ) --> 
53            <#assign link = renderer.getURLViewInContext(renderRequest, renderResponse, '')  /> 
54             
55            <#if "assetLinkBehavior" != "showFullContent" > 
56                <#assign link = renderer.getURLViewInContext(renderRequest, renderResponse, link)  /> 
57            </#if> 
58             
59             <#if cr == '0' > 
60    <#assign cr = "Comando Geral" /> 
61  <#elseif cr == '1' > 
62    <#assign cr = "1º Comando Regional" /> 
63  <#elseif cr == '2' > 
64    <#assign cr = "2º Comando Regional" /> 
65  <#elseif cr == '3' > 
66    <#assign cr = "3º Comando Regional" /> 
67  <#elseif cr == '4' > 
68    <#assign cr = "4º Comando Regional" /> 
69  <#elseif cr == '5' > 
70    <#assign cr = "5º Comando Regional" /> 
71  <#elseif cr == '6' > 
72    <#assign cr = "6º Comando Regional" /> 
73  <#elseif cr == '7' > 
74    <#assign cr = "7º Comando Regional" /> 
75  <#elseif cr == '8' > 
76    <#assign cr = "8º Comando Regional" /> 
77  <#elseif cr == '9' > 
78    <#assign cr = "9º Comando Regional" /> 
79  <#elseif cr == '10' > 
80    <#assign cr = "10º Comando Regional" /> 
81  <#elseif cr == '11' > 
82    <#assign cr = "11º Comando Regional" /> 
83  <#elseif cr == '12' > 
84    <#assign cr = "12º Comando Regional" /> 
85  <#elseif cr == '13' > 
86    <#assign cr = "13º Comando Regional" /> 
87  <#elseif cr == '14' > 
88    <#assign cr = "14º Comando Regional" /> 
89  <#elseif cr == '15' > 
90    <#assign cr = "15º Comando Regional" /> 
91  <#elseif cr == '100' > 
92    <#assign cr = "Comando Especializado" /> 
93  <#else> 
94    <#assign cr = "Não encontrado" /> 
95    </#if> 
96		 <a href="${link}" class="title" style="font-size: 22px;">${entry.getTitle(locale)}</a>	<br />	<br />	  
97		<b>COMANDANTE:&nbsp;&nbsp;</b>${comandante!}<br /> 
98		<b>CR:&nbsp;&nbsp;</b>${cr!}<br /> 
99	    <b>LOCAL:&nbsp;&nbsp;</b>${unidade!}<br /> 
100		<b>CIDADE:&nbsp;&nbsp;</b>${cidade!}<br /> 
101		<b>ENDEREÇO:&nbsp;&nbsp;</b>${endereco!}<br /> 
102		<b>TELEFONE:&nbsp;&nbsp;</b>${telefone!}<br /> 
103		<b>EMAIL:&nbsp;&nbsp;</b>${email!}<br /> 
104		<b>COORDENADAS:&nbsp;&nbsp;</b>Latitude: ${latitude!} /  Longitude: ${longitude!}<br /> 
105	   
106	  <#if latitude !='' && longitude !='' > 
107	  	<b>LOCALIZAÇÃO:&nbsp;&nbsp;</b> 
108		 
109		<a href="${link}" class="title" style="font-size: 16px;">Ver localização no Mapa <img src="/documents/2459523/3695717/world-map-icon.jpg" title="ver local"></a> 
110	  </#if> 
111		<br />	 
112	 
113			 
114			<hr> 
115			 
116        </#if> 
117    </#list> 
118</div>