This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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"> | |
| <html xmlns="http://www.w3.org/1999/xhtml" | |
| xmlns:h="http://xmlns.jcp.org/jsf/html" | |
| xmlns:f="http://xmlns.jcp.org/jsf/core" | |
| xmlns:p="http://primefaces.org/ui" | |
| xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> | |
| <h:head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <f:loadBundle basename="messages" var="msgs" /> | |
| <p:outputLabel value="Nome" for="nome" /> | |
| <p:inputText id="nome" value="#{seuBean.entidade.nome}" | |
| required="true" requiredMessage="#{msg.nomeBranco}"> | |
| <f:ajax event="blur" render="messageNome" /> | |
| <p:message for="nome" id="messageNome" /> | |
| </p:inputText> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <h:form> | |
| <!-- aqui fica a declaração da tabela --> | |
| <p:dataTable id="tabela" value="#{meuBean.pessoas}" | |
| var="pessoa" | |
| paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {Exporters}" | |
| paginator="true" rows="10" style="margin-bottom:20px" | |
| rowStyleClass="#{pessoa.status == 'INATIVO' ? 'inativo-row' : null}" | |
| liveResize="true" emptyMessage="Nenhum Registro Encontrado"> | |
| <!-- aqui fica o select com os status da tebela --> | |
| <f:facet name="header"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @ManagedBean(name="redBean") | |
| @SessionScoped | |
| public class Bean { | |
| private Integer opcao; | |
| private Boolean isRederiza = false; | |
| public Boolean getIsRederiza() { | |
| return isRederiza; | |
| } | |
| public Integer getOpcao() { | |
| return opcao; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MACACO_AND_GURILA("Macaco","Gurila"), | |
| JACA_AND_ESCADA("Escada","Jaca"); | |
| private String tipoUm, tipoDois; | |
| private TiposEnum(String tipoUm, String tipoDois) { | |
| this.tipoUm = tipoUm; | |
| this.tipoDois = tipoDois; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void setPaisRecebendoEmString(String paisEmTexto) { | |
| PaisesEnum[] paises = PaisesEnum.values(); | |
| for (PaisesEnum paisesEnum : paises) { | |
| if (paisEmTexto.equalsIgnoreCase(paisesEnum.toString())) { | |
| this.pais = paisesEnum; | |
| } | |
| } | |
| } | |
| public void setEstadoRecebendoEmString(String estadoEmTexto) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.IOException; | |
| import java.util.Arrays; | |
| import java.util.HashMap; | |
| import java.util.HashSet; | |
| import java.util.Iterator; | |
| import java.util.Map; | |
| import java.util.Map.Entry; | |
| import java.util.Set; | |
| import javax.json.Json; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- phpMyAdmin SQL Dump | |
| -- version 4.6.6deb4 | |
| -- https://www.phpmyadmin.net/ | |
| -- | |
| -- Host: localhost:3306 | |
| -- Tempo de geração: 20/10/2018 às 10:04 | |
| -- Versão do servidor: 10.1.26-MariaDB-0+deb9u1 | |
| -- Versão do PHP: 7.0.30-0+deb9u1 | |
| SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // var x = document.getElementById("demo"); | |
| function getLocation() { | |
| if (navigator.geolocation) { | |
| navigator.geolocation.getCurrentPosition(showPosition); | |
| } else { | |
| x.innerHTML = "Geolocation is not supported by this browser."; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- phpMyAdmin SQL Dump | |
| -- version 4.6.6deb4 | |
| -- https://www.phpmyadmin.net/ | |
| -- | |
| -- Host: localhost:3306 | |
| -- Tempo de geração: 20/10/2018 às 15:11 | |
| -- Versão do servidor: 10.1.26-MariaDB-0+deb9u1 | |
| -- Versão do PHP: 7.0.30-0+deb9u1 | |
| SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; |