Contratos

Entrar

Voltar Contrato nº 054/2014/SESP

Um erro ocorreu enquanto processava o modelo.
The following has evaluated to null or missing:
==> unidade  [in template "20154#20194#3892281" at line 12, column 6]

----
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: #if unidade.getData() != ""  [in template "20154#20194#3892281" at line 12, column 1]
----
1<div class="estr-org"> 
2<style> 
3 
4titulo { 
5     
6    color: "black"; 
7
8 
9 
10</style> 
11 
12<#if unidade.getData() != "" > 
13 
14	<#list unidade.getSiblings() as setor > 
15		 
16		 <#assign comandante = comandante.getData() /> 
17		 <#assign rua = cidade.endereco.getData() /> 
18		 <#assign cid = cidade.getData() /> 
19		 <#assign tel =cidade.telefone.getData() /> 
20		 <#assign email =cidade.email.getData() /> 
21		 <#assign longitude = longitude.getData() /> 
22		 <#assign latitude = latitude.getData() /> 
23		 <#assign cr = cr.getData() /> 
24		 <#assign set = setor.getData() /> 
25		 <#assign icone = icone.getData() /> 
26		 <#assign titulo = .vars['reserved-article-title'].data />  
27	 
28 <#if cr == '0' > 
29    <#assign cr = "Comando Geral" /> 
30  <#elseif cr == '1' > 
31    <#assign cr = "1º Comando Regional" /> 
32  <#elseif cr == '2' > 
33    <#assign cr = "2º Comando Regional" /> 
34  <#elseif cr == '3' > 
35    <#assign cr = "3º Comando Regional" /> 
36  <#elseif cr == '4' > 
37    <#assign cr = "4º Comando Regional" /> 
38  <#elseif cr == '5' > 
39    <#assign cr = "5º Comando Regional" /> 
40  <#elseif cr == '6' > 
41    <#assign cr = "6º Comando Regional" /> 
42  <#elseif cr == '7' > 
43    <#assign cr = "7º Comando Regional" /> 
44  <#elseif cr == '8' > 
45    <#assign cr = "8º Comando Regional" /> 
46  <#elseif cr == '9' > 
47    <#assign cr = "9º Comando Regional" /> 
48  <#elseif cr == '10' > 
49    <#assign cr = "10º Comando Regional" /> 
50  <#elseif cr == '11' > 
51    <#assign cr = "11º Comando Regional" /> 
52  <#elseif cr == '12' > 
53    <#assign cr = "12º Comando Regional" /> 
54  <#elseif cr == '13' > 
55    <#assign cr = "13º Comando Regional" /> 
56  <#elseif cr == '14' > 
57    <#assign cr = "14º Comando Regional" /> 
58  <#elseif cr == '15' > 
59    <#assign cr = "15º Comando Regional" /> 
60  <#elseif cr == '100' > 
61    <#assign cr = "Comando Especializado" /> 
62  <#else> 
63    <#assign cr = "Não encontrado" /> 
64    </#if> 
65		  
66		  <#--FUNÇÃO TIRA ASPAS PARA O JAVASCRIPT NÃO DAR PROBLEMA --> 
67 
68  <#assign titulo = titulo?replace('"','\"')> 
69  <#assign titulo = titulo?replace("'","\'")> 
70			 
71  <#assign comandante = comandante?replace('"','\"') /> 
72  <#assign comandante = comandante?replace("'","\'") /> 
73   
74  <#assign set = set?replace('"','\"') /> 
75  <#assign set = set?replace("'","\'") /> 
76   
77  <#assign cid = cid?replace('"','\"') /> 
78  <#assign cid = cid?replace("'","\'") /> 
79   
80  <#assign rua = rua?replace('"','\"') /> 
81  <#assign rua = rua?replace("'","\'") /> 
82   
83  <#assign tel = tel?replace('"','\"') /> 
84  <#assign tel = tel?replace("'","\'") /> 
85   
86  <#assign email = email?replace('"','\"') /> 
87  <#assign email = email?replace("'","\'") /> 
88   
89  <#assign latitude = latitude?replace('"','\"') /> 
90  <#assign latitude = latitude?replace("'","\'") /> 
91   
92  <#assign longitude = longitude?replace('"','\"') /> 
93  <#assign longitude = longitude?replace("'","\'") /> 
94 
95  <#-------------------------  ddd --> 
96		 <br /><br /> 
97		<b>COMANDANTE:&nbsp;&nbsp;</b> ${comandante}<br /> 
98		<#if cr?has_content> <b>COMANDO REGIONAL:&nbsp;&nbsp;</b> ${cr!}<br /></#if> 
99		<b>UNIDADE:&nbsp;&nbsp;</b> ${set} <br /> 
100		<b>CIDADE:&nbsp;&nbsp;</b>${cid}<br /> 
101		<b>ENDEREÇO:&nbsp;&nbsp;</b>${rua}<br /> 
102		<b>TELEFONE:&nbsp;&nbsp;</b>${tel}<br /> 
103		<b>EMAIL:&nbsp;&nbsp;</b>${email}<br /> 
104		<b>LATITUDE:&nbsp;&nbsp;</b>${latitude}<br /> 
105		<b>LONGITUDE:&nbsp;&nbsp;</b>${longitude}<br /><br /> 
106		<br /> 
107 
108		</div> 
109	</#list> 
110</#if> 
111              <#if icone == '1' > 
112              <#assign ponto = "/documents/2459523/4118578/marcador2.png/2bc5f0fc-6586-4a23-a6c0-36b484330b5f?t=1462314928308" /> 
113              <#--azual comando geral --> 
114              <#elseif icone == '2'> 
115              <#assign ponto = "/documents/2459523/4118578/marcadorVerde.png/7ec9d39d-9cb2-4e0a-97d5-f2fb6819ee8e?t=1462481651540" /> 
116              <#--verde cr --> 
117              <#elseif icone == '3'> 
118              <#assign ponto = "/documents/2459523/4118578/marcadorVermelho.png/e78e60f3-98a0-43bb-9ffd-c1bebfe00a4e?t=1462481651768" /> 
119              <#--vermelho batalhoes --> 
120              <#elseif icone == '4'> 
121              <#assign ponto = "/documents/2459523/4118578/marcadorLaranja.png/1643de34-a56a-45c4-b4c3-fff75308e1dd?t=1462481652167" /> 
122              <#--laranja companhia --> 
123              <#elseif icone == '5'> 
124              <#assign ponto = "/documents/2459523/4118578/marcadorAmarelo.png/33842577-3ac9-48d1-9278-1f83cc2b0072?t=1462481651940" /> 
125              <#--Amarelo Pelotão Nucleo --> 
126              <#elseif icone == '6'> 
127              <#assign ponto = "/documents/2459523/4118578/marcadorPreto.png/f2dbb026-2799-49fb-8378-8963cdb52fd6?t=1462481651141" /> 
128              <#--Preto Especializada --> 
129              </#if> 
130 
131    <#if latitude !="" && longitude !="" > 
132 <#--      ${latitude} ----- ${longitude} --> 
133 
134                                      
135                <script type="text/javascript" src="/documents/2459523/4118578/jquery-1.4.4.min.js/986bba64-7fcf-4728-a3dc-2653543821c7?version=1.0&download=true"></script> 
136<#-- <script src="http://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"></script> --> 
137                <script type="text/javascript" src="/documents/2459523/4118578/gmap3.js/2f2c75b1-6923-4ef8-80c7-00eff180e96f?version=1.0&download=true"></script> 
138                 
139<#-- antigo <script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyChktdj9JYQuRRFAdaOUs-5N0wd-b0IgP8&callback=initMap"  type="text/javascript"></script>  
140<script  src="http://maps.googleapis.com/maps/api/js?v=3&amp;key=AIzaSyDmr8SLJdORWvDL1CaAeX7whVoJcdGXTdc&quot; type="text/javascript"></script>         -->        
141                <script src="https://maps.googleapis.com/maps/api/js?v=3&key=AIzaSyDmr8SLJdORWvDL1CaAeX7whVoJcdGXTdc" type="text/javascript"></script>                 
142                <style> 
143                body { 
144                	text-align: left; 
145                	font-family: Arial, sans-serif; 
146
147                #balao { 
148                	width: 370px; 
149                	height: 170px; 
150                	padding: 5px; 
151
152                #balao p { 
153                	margin: 0; 
154                	text-align: left; 
155                	float: left; 
156
157                #balao img { 
158                	display: block; 
159                	float: left; 
160                	padding-right: 10px; 
161
162                .gmap3 { 
163                	margin: 20px auto; 
164                	border: 1px dashed #C0C0C0; 
165                	width: 900px; 
166                	height: 600px; 
167
168                </style> 
169                <script type="text/javascript"> 
170                // inicializa jquery 
171                 $(function(){ 
172                		 
173                		// conteudo das infowindows  
174                		var unidadeMiitar = '<div id="balao">'+ 
175                		                        '<img alt="Foto da Unidade" src="${Foto_da_Unidade.getData()}"  height="70px" />'+ 
176                		                         
177                		                        '<p><strong> ${titulo} </p> <br>'+ 
178                		                        '<p><strong>Comandante: ${comandante} </p>'+ 
179                		                        '<p><strong>Local: ${set} </p>'+ 
180                  								'<p><strong>End: ${rua} </p>'+ 
181                  								'<p><strong>Cidade: ${cid} </p>'+ 
182                    							'<p>Fone: ${tel} | E-mail : ${email}</p>'+ 
183                								'</div>'; 
184                		      
185                								 
186                // inicializa plugin gmap3			  
187                $("#mapa").gmap3({ 
188                    map: 
189
190                      // local padrão onde o mapa irá aparecer quando carregado 
191                	  latLng:[${latitude},${longitude}], 
192                      options: 
193
194                		// zoom inicial (aproximação)   
195                        zoom:13, 
196                		// opções de controle do tipo do mapa (ruas, satélite, etc). 
197                		// mapTypeControl como FALSE não mostra opções 
198                        mapTypeControl: true, 
199                        mapTypeControlOptions:  
200
201                          // define controles no formato dropdown 
202                		  style: google.maps.MapTypeControlStyle.DROPDOWN_MENU 
203                        }, 
204                        // permite navegar com o botão scroll do mouse 
205                		scrollwheel: true, 
206                		// mostra bonequinho para habilitar modo streetview 
207                        streetViewControl: true 
208
209                	}, 
210                	// marcadores 
211                	marker:{ 
212                	// valores (localização dos marcadores)	 
213                    values:[ 
214                	// pode ser uma latitude/longitude 
215                      {latLng:[${latitude},${longitude}], data:unidadeMiitar, options:{icon:"${ponto}", shadow:"imagens/marcador_sombra.png"}} 
216                 
217                    ], 
218                	// evita reposicionar marcadores 
219                    options:{ 
220                      draggable: false 
221                    }, 
222                	// listener de eventos 
223                    events:{ 
224                	  // evento de clique		 
225                      click: function(marker, event, context) 
226
227                        // cria a infowindow 
228                		var map = $(this).gmap3("get"), 
229                          infowindow = $(this).gmap3({get:{name:"infowindow"}}); 
230                        
231                	   //  
232                	    if (infowindow) 
233
234                          infowindow.open(map, marker); 
235                          infowindow.setContent(context.data); 
236                        } else { 
237                          $(this).gmap3({ 
238                            infowindow: 
239
240                              anchor:marker, 
241                              options:{content: context.data} 
242
243                          }); 
244
245
246
247
248                  });  
249                });      
250                </script> 
251                 
252                <h1 align="center">Polícia Militar do Estado de Mato Grosso </h1> 
253                <div id="mapa" class="gmap3"></div> 
254                 
255    <#else> 
256  <h3>Localização no mapa não Cadastrada</h3>  
257  </#if>