map.xhtml
1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:rich="http://richfaces.org/rich"
xmlns:t="http://myfaces.apache.org/tomahawk"
xmlns:sec="http://www.springframework.org/security/tags"
xmlns:a4j="http://richfaces.org/a4j">
<div id="cadastro">
<h1>Mapa de pontos</h1>
<h:outputText value="Veiculo:"/>
<h:selectOneMenu id="veiculo" value="#{pontoBean.veiculo}" converter="entityConverter">
<f:selectItem itemLabel="Todos ..." itemValue=""/>
<t:selectItems value="#{veiculoBean.veiculos}" var="v" itemLabel="#{v.placa} #{v.modelo.descricao}" itemValue="#{v}"/>
</h:selectOneMenu>
<a4j:commandButton id="veiculoRota" value="Rota" action="#{pontoBean.mostrarRotaVeiculo}" reRender="vehicleRoute" styleClass="button">
<a4j:support event="oncomplete" oncomplete="showVeiculoRoute()"/>
</a4j:commandButton>
<h:inputHidden id="points" value="#{pontoBean.geoms}"/>
<h:inputHidden id="vehicleRoute" value="#{pontoBean.route}"/>
<h:inputHidden id="vehiclesMap" value="#{pontoBean.veiculosPontos}"/>
<h:inputHidden id="lat" value="#{pontoBean.lat}"/>
<h:inputHidden id="lng" value="#{pontoBean.lng}"/>
<div id="mapp" style="width:100%; height:600px"></div>
</div>
</ui:composition>