├── .gitignore
├── adicionando-clientes
├── .gitignore
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── algaworks
│ │ ├── controller
│ │ └── ClientesManager.java
│ │ └── model
│ │ ├── Cliente.java
│ │ └── Endereco.java
│ ├── resources
│ └── com
│ │ └── algaworks
│ │ └── Messages_pt_BR.properties
│ └── webapp
│ ├── CadastroCliente.xhtml
│ ├── PesquisaClientes.xhtml
│ ├── WEB-INF
│ ├── faces-config.xml
│ ├── templates
│ │ └── Layout.xhtml
│ └── web.xml
│ └── resources
│ └── algaworks
│ ├── images
│ └── logo.png
│ ├── javascripts
│ └── app.js
│ └── styles
│ ├── components.css
│ ├── custom.css
│ └── layout.css
├── adicionando-enderecos
├── .gitignore
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── algaworks
│ │ ├── controller
│ │ └── ClientesManager.java
│ │ └── model
│ │ ├── Cliente.java
│ │ └── Endereco.java
│ ├── resources
│ └── com
│ │ └── algaworks
│ │ └── Messages_pt_BR.properties
│ └── webapp
│ ├── CadastroCliente.xhtml
│ ├── PesquisaClientes.xhtml
│ ├── WEB-INF
│ ├── faces-config.xml
│ ├── templates
│ │ └── Layout.xhtml
│ └── web.xml
│ └── resources
│ └── algaworks
│ ├── images
│ └── logo.png
│ ├── javascripts
│ └── app.js
│ └── styles
│ ├── components.css
│ ├── custom.css
│ └── layout.css
├── configurando-tema-bootstrap
├── .gitignore
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── algaworks
│ │ ├── controller
│ │ └── ClientesManager.java
│ │ └── model
│ │ ├── Cliente.java
│ │ └── Endereco.java
│ ├── resources
│ └── com
│ │ └── algaworks
│ │ └── Messages_pt_BR.properties
│ └── webapp
│ ├── PesquisaClientes.xhtml
│ ├── WEB-INF
│ ├── faces-config.xml
│ ├── templates
│ │ └── Layout.xhtml
│ └── web.xml
│ └── resources
│ └── algaworks
│ ├── images
│ └── logo.png
│ ├── javascripts
│ └── app.js
│ └── styles
│ ├── components.css
│ ├── custom.css
│ └── layout.css
├── criando-a-area-de-conteudo
├── .gitignore
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── algaworks
│ │ ├── controller
│ │ └── ClientesManager.java
│ │ └── model
│ │ ├── Cliente.java
│ │ └── Endereco.java
│ ├── resources
│ └── com
│ │ └── algaworks
│ │ └── Messages_pt_BR.properties
│ └── webapp
│ ├── Layout.xhtml
│ ├── WEB-INF
│ ├── faces-config.xml
│ └── web.xml
│ └── resources
│ └── algaworks
│ ├── images
│ └── logo.png
│ └── styles
│ └── layout.css
├── criando-a-barra-lateral
├── .gitignore
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── algaworks
│ │ ├── controller
│ │ └── ClientesManager.java
│ │ └── model
│ │ ├── Cliente.java
│ │ └── Endereco.java
│ ├── resources
│ └── com
│ │ └── algaworks
│ │ └── Messages_pt_BR.properties
│ └── webapp
│ ├── Layout.xhtml
│ ├── WEB-INF
│ ├── faces-config.xml
│ └── web.xml
│ └── resources
│ └── algaworks
│ ├── images
│ └── logo.png
│ └── styles
│ └── layout.css
├── criando-o-arquivo-de-template
├── .gitignore
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── algaworks
│ │ ├── controller
│ │ └── ClientesManager.java
│ │ └── model
│ │ ├── Cliente.java
│ │ └── Endereco.java
│ ├── resources
│ └── com
│ │ └── algaworks
│ │ └── Messages_pt_BR.properties
│ └── webapp
│ ├── PesquisaClientes.xhtml
│ ├── WEB-INF
│ ├── faces-config.xml
│ ├── templates
│ │ └── Layout.xhtml
│ └── web.xml
│ └── resources
│ └── algaworks
│ ├── images
│ └── logo.png
│ ├── javascripts
│ └── app.js
│ └── styles
│ ├── components.css
│ ├── custom.css
│ └── layout.css
├── criando-o-menu-do-sistema
├── .gitignore
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── algaworks
│ │ ├── controller
│ │ └── ClientesManager.java
│ │ └── model
│ │ ├── Cliente.java
│ │ └── Endereco.java
│ ├── resources
│ └── com
│ │ └── algaworks
│ │ └── Messages_pt_BR.properties
│ └── webapp
│ ├── Layout.xhtml
│ ├── Menu.xhtml
│ ├── WEB-INF
│ ├── faces-config.xml
│ └── web.xml
│ └── resources
│ └── algaworks
│ ├── images
│ └── logo.png
│ ├── javascripts
│ └── app.js
│ └── styles
│ ├── components.css
│ ├── custom.css
│ └── layout.css
├── criando-o-topo
├── .gitignore
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── algaworks
│ │ ├── controller
│ │ └── ClientesManager.java
│ │ └── model
│ │ ├── Cliente.java
│ │ └── Endereco.java
│ ├── resources
│ └── com
│ │ └── algaworks
│ │ └── Messages_pt_BR.properties
│ └── webapp
│ ├── Layout.xhtml
│ ├── WEB-INF
│ ├── faces-config.xml
│ └── web.xml
│ └── resources
│ └── algaworks
│ ├── images
│ └── logo.png
│ └── styles
│ └── layout.css
├── datatable-responsiva-priority
├── .gitignore
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── algaworks
│ │ ├── controller
│ │ └── ClientesManager.java
│ │ └── model
│ │ ├── Cliente.java
│ │ └── Endereco.java
│ ├── resources
│ └── com
│ │ └── algaworks
│ │ └── Messages_pt_BR.properties
│ └── webapp
│ ├── PesquisaClientes.xhtml
│ ├── WEB-INF
│ ├── faces-config.xml
│ ├── templates
│ │ └── Layout.xhtml
│ └── web.xml
│ └── resources
│ └── algaworks
│ ├── images
│ └── logo.png
│ ├── javascripts
│ └── app.js
│ └── styles
│ ├── components.css
│ ├── custom.css
│ └── layout.css
├── datatable-responsiva-reflow
├── .gitignore
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── algaworks
│ │ ├── controller
│ │ └── ClientesManager.java
│ │ └── model
│ │ ├── Cliente.java
│ │ └── Endereco.java
│ ├── resources
│ └── com
│ │ └── algaworks
│ │ └── Messages_pt_BR.properties
│ └── webapp
│ ├── PesquisaClientes.xhtml
│ ├── WEB-INF
│ ├── faces-config.xml
│ ├── templates
│ │ └── Layout.xhtml
│ └── web.xml
│ └── resources
│ └── algaworks
│ ├── images
│ └── logo.png
│ ├── javascripts
│ └── app.js
│ └── styles
│ ├── components.css
│ ├── custom.css
│ └── layout.css
├── dialog-responsivo
├── .gitignore
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── algaworks
│ │ ├── controller
│ │ └── ClientesManager.java
│ │ └── model
│ │ ├── Cliente.java
│ │ └── Endereco.java
│ ├── resources
│ └── com
│ │ └── algaworks
│ │ └── Messages_pt_BR.properties
│ └── webapp
│ ├── CadastroCliente.xhtml
│ ├── PesquisaClientes.xhtml
│ ├── WEB-INF
│ ├── faces-config.xml
│ ├── templates
│ │ └── Layout.xhtml
│ └── web.xml
│ └── resources
│ └── algaworks
│ ├── images
│ └── logo.png
│ ├── javascripts
│ └── app.js
│ └── styles
│ ├── components.css
│ ├── custom.css
│ └── layout.css
├── editando-clientes
├── .gitignore
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── algaworks
│ │ ├── controller
│ │ └── ClientesManager.java
│ │ └── model
│ │ ├── Cliente.java
│ │ └── Endereco.java
│ ├── resources
│ └── com
│ │ └── algaworks
│ │ └── Messages_pt_BR.properties
│ └── webapp
│ ├── CadastroCliente.xhtml
│ ├── PesquisaClientes.xhtml
│ ├── WEB-INF
│ ├── faces-config.xml
│ ├── templates
│ │ └── Layout.xhtml
│ └── web.xml
│ └── resources
│ └── algaworks
│ ├── images
│ └── logo.png
│ ├── javascripts
│ └── app.js
│ └── styles
│ ├── components.css
│ ├── custom.css
│ └── layout.css
├── grid-css
├── .gitignore
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── algaworks
│ │ ├── controller
│ │ └── ClientesManager.java
│ │ └── model
│ │ ├── Cliente.java
│ │ └── Endereco.java
│ ├── resources
│ └── com
│ │ └── algaworks
│ │ └── Messages_pt_BR.properties
│ └── webapp
│ ├── Teste.xhtml
│ ├── WEB-INF
│ ├── faces-config.xml
│ └── web.xml
│ └── resources
│ └── algaworks
│ └── images
│ └── logo.png
├── intercambiando-a-barra-lateral
├── .gitignore
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── algaworks
│ │ ├── controller
│ │ └── ClientesManager.java
│ │ └── model
│ │ ├── Cliente.java
│ │ └── Endereco.java
│ ├── resources
│ └── com
│ │ └── algaworks
│ │ └── Messages_pt_BR.properties
│ └── webapp
│ ├── Layout.xhtml
│ ├── WEB-INF
│ ├── faces-config.xml
│ └── web.xml
│ └── resources
│ └── algaworks
│ ├── images
│ └── logo.png
│ ├── javascripts
│ └── app.js
│ └── styles
│ ├── components.css
│ └── layout.css
├── layout-fixo
├── .gitignore
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── algaworks
│ │ ├── controller
│ │ └── ClientesManager.java
│ │ └── model
│ │ ├── Cliente.java
│ │ └── Endereco.java
│ ├── resources
│ └── com
│ │ └── algaworks
│ │ └── Messages_pt_BR.properties
│ └── webapp
│ ├── Teste.xhtml
│ ├── WEB-INF
│ ├── faces-config.xml
│ └── web.xml
│ └── resources
│ └── algaworks
│ └── images
│ └── logo.png
├── layout-fluido
├── .gitignore
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── algaworks
│ │ ├── controller
│ │ └── ClientesManager.java
│ │ └── model
│ │ ├── Cliente.java
│ │ └── Endereco.java
│ ├── resources
│ └── com
│ │ └── algaworks
│ │ └── Messages_pt_BR.properties
│ └── webapp
│ ├── Teste.xhtml
│ ├── WEB-INF
│ ├── faces-config.xml
│ └── web.xml
│ └── resources
│ └── algaworks
│ └── images
│ └── logo.png
├── layout-responsivo
├── .gitignore
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── algaworks
│ │ ├── controller
│ │ └── ClientesManager.java
│ │ └── model
│ │ ├── Cliente.java
│ │ └── Endereco.java
│ ├── resources
│ └── com
│ │ └── algaworks
│ │ └── Messages_pt_BR.properties
│ └── webapp
│ ├── Teste.xhtml
│ ├── WEB-INF
│ ├── faces-config.xml
│ └── web.xml
│ └── resources
│ └── algaworks
│ └── images
│ └── logo.png
├── meta-tag-viewport
├── .gitignore
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── algaworks
│ │ ├── controller
│ │ └── ClientesManager.java
│ │ └── model
│ │ ├── Cliente.java
│ │ └── Endereco.java
│ ├── resources
│ └── com
│ │ └── algaworks
│ │ └── Messages_pt_BR.properties
│ └── webapp
│ ├── Teste.xhtml
│ ├── WEB-INF
│ ├── faces-config.xml
│ └── web.xml
│ └── resources
│ └── algaworks
│ └── images
│ ├── duke.jpg
│ └── logo.png
├── panelgrid-responsivo
├── .gitignore
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── algaworks
│ │ ├── controller
│ │ └── ClientesManager.java
│ │ └── model
│ │ ├── Cliente.java
│ │ └── Endereco.java
│ ├── resources
│ └── com
│ │ └── algaworks
│ │ └── Messages_pt_BR.properties
│ └── webapp
│ ├── CadastroCliente.xhtml
│ ├── PesquisaClientes.xhtml
│ ├── WEB-INF
│ ├── faces-config.xml
│ ├── templates
│ │ └── Layout.xhtml
│ └── web.xml
│ └── resources
│ └── algaworks
│ ├── images
│ └── logo.png
│ ├── javascripts
│ └── app.js
│ └── styles
│ ├── components.css
│ ├── custom.css
│ └── layout.css
└── tabview-responsivo
├── .gitignore
├── pom.xml
└── src
└── main
├── java
└── com
│ └── algaworks
│ ├── controller
│ └── ClientesManager.java
│ └── model
│ ├── Cliente.java
│ └── Endereco.java
├── resources
└── com
│ └── algaworks
│ └── Messages_pt_BR.properties
└── webapp
├── CadastroCliente.xhtml
├── PesquisaClientes.xhtml
├── WEB-INF
├── faces-config.xml
├── templates
│ └── Layout.xhtml
└── web.xml
└── resources
└── algaworks
├── images
└── logo.png
├── javascripts
└── app.js
└── styles
├── components.css
├── custom.css
└── layout.css
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .metadata
3 | .recommenders/**
4 | Servers/**
5 | RemoteSystemsTempFiles/**
6 | usando-o-layout/**
7 | primefaces-responsivo/**
8 | **/target/**
9 |
--------------------------------------------------------------------------------
/adicionando-clientes/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 | .DS_Store
3 | .metadata
4 | .settings
5 | .classpath
6 | .project
7 | target/
--------------------------------------------------------------------------------
/adicionando-clientes/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | com.algaworks
6 | primefaces-responsivo
7 | 1.0.0-SNAPSHOT
8 | war
9 |
10 |
11 | UTF-8
12 |
13 |
14 |
15 |
16 | org.primefaces
17 | primefaces
18 | 5.3
19 | compile
20 |
21 |
22 |
23 | org.primefaces.themes
24 | bootstrap
25 | 1.0.10
26 | compile
27 |
28 |
29 |
30 | org.glassfish
31 | javax.faces
32 | 2.2.9
33 | compile
34 |
35 |
36 |
37 | javax.servlet
38 | javax.servlet-api
39 | 3.1.0
40 | provided
41 |
42 |
43 |
44 |
45 |
46 |
47 | maven-compiler-plugin
48 | 3.3
49 |
50 | 1.8
51 | 1.8
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | prime-repo
60 | PrimeFaces Maven Repository
61 | http://repository.primefaces.org
62 | default
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/adicionando-clientes/src/main/java/com/algaworks/controller/ClientesManager.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.controller;
2 |
3 | import java.io.Serializable;
4 | import java.util.ArrayList;
5 | import java.util.Arrays;
6 | import java.util.Date;
7 | import java.util.List;
8 |
9 | import javax.faces.application.FacesMessage;
10 | import javax.faces.bean.ManagedBean;
11 | import javax.faces.bean.SessionScoped;
12 | import javax.faces.context.FacesContext;
13 |
14 | import com.algaworks.model.Cliente;
15 | import com.algaworks.model.Endereco;
16 |
17 | @ManagedBean
18 | @SessionScoped
19 | public class ClientesManager implements Serializable {
20 |
21 | private static final long serialVersionUID = 1L;
22 |
23 | private List clientes = new ArrayList<>();
24 | private Cliente clienteEdicao = new Cliente();
25 | private Endereco enderecoEdicao;
26 |
27 | public ClientesManager() {
28 | List enderecosJoao = new ArrayList<>();
29 | enderecosJoao.addAll(Arrays.asList(
30 | new Endereco("Rua José Fonseca", "1000", "Centro", "Uberlândia"),
31 | new Endereco("Av. Cesário Alvim", "12", "Brasil", "Belo Horizonte"),
32 | new Endereco("Av. Afonso Pena", "1280", "Centro", "Uberaba")));
33 |
34 | clientes.add(new Cliente("123.123.123-11", "João da Silva Albuquerque",
35 | "(34) 3238-1111", "(34) 9 9999-7716", "joao@algaworks.com",
36 | "Minas Gerais", new Date(), true, "Cliente especial\nÉ gente boa!", enderecosJoao));
37 |
38 | clientes.add(new Cliente("333.333.123-11", "Maria Abadia das Couves Teixeira",
39 | "(11) 4000-1234", "(11) 9 8888-1122", "maria@algaworks.com",
40 | "São Paulo", null, false, null, new ArrayList<>()));
41 |
42 | clientes.add(new Cliente("444.444.123-11", "Paula Maria de Souza Mendes",
43 | "(31) 2233-4455", "(31) 9 9433-2282", "paula@algaworks.com",
44 | "Minas Gerais", null, false, null, new ArrayList<>()));
45 | }
46 |
47 | public void novoEndereco() {
48 | enderecoEdicao = new Endereco();
49 | }
50 |
51 | public String novoCliente() {
52 | clienteEdicao = new Cliente();
53 | return "CadastroCliente?faces-redirect=true";
54 | }
55 |
56 | public void salvar() {
57 | if (!clientes.contains(clienteEdicao)) {
58 | clientes.add(clienteEdicao);
59 | }
60 | clienteEdicao = new Cliente();
61 |
62 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Cliente salvo com sucesso!"));
63 | }
64 |
65 | public List getClientes() {
66 | return clientes;
67 | }
68 |
69 | public Cliente getClienteEdicao() {
70 | return clienteEdicao;
71 | }
72 |
73 | public void setClienteEdicao(Cliente clienteEdicao) {
74 | this.clienteEdicao = clienteEdicao;
75 | }
76 |
77 | public Endereco getEnderecoEdicao() {
78 | return enderecoEdicao;
79 | }
80 |
81 | public void setEnderecoEdicao(Endereco enderecoEdicao) {
82 | this.enderecoEdicao = enderecoEdicao;
83 | }
84 |
85 | }
--------------------------------------------------------------------------------
/adicionando-clientes/src/main/java/com/algaworks/model/Endereco.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.model;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Endereco implements Serializable {
6 |
7 | private static final long serialVersionUID = 1L;
8 |
9 | private String logradouro;
10 | private String numero;
11 | private String bairro;
12 | private String cidade;
13 |
14 | public Endereco() {
15 | }
16 |
17 | public Endereco(String logradouro, String numero, String bairro, String cidade) {
18 | super();
19 | this.logradouro = logradouro;
20 | this.numero = numero;
21 | this.bairro = bairro;
22 | this.cidade = cidade;
23 | }
24 |
25 | public String getLogradouro() {
26 | return logradouro;
27 | }
28 |
29 | public void setLogradouro(String logradouro) {
30 | this.logradouro = logradouro;
31 | }
32 |
33 | public String getNumero() {
34 | return numero;
35 | }
36 |
37 | public void setNumero(String numero) {
38 | this.numero = numero;
39 | }
40 |
41 | public String getBairro() {
42 | return bairro;
43 | }
44 |
45 | public void setBairro(String bairro) {
46 | this.bairro = bairro;
47 | }
48 |
49 | public String getCidade() {
50 | return cidade;
51 | }
52 |
53 | public void setCidade(String cidade) {
54 | this.cidade = cidade;
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/adicionando-clientes/src/main/resources/com/algaworks/Messages_pt_BR.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/adicionando-clientes/src/main/resources/com/algaworks/Messages_pt_BR.properties
--------------------------------------------------------------------------------
/adicionando-clientes/src/main/webapp/PesquisaClientes.xhtml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 | Pesquisa de clientes
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/adicionando-clientes/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | com.algaworks.Messages
9 |
10 |
11 | pt_BR
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/adicionando-clientes/src/main/webapp/WEB-INF/templates/Layout.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | AlgaWorks
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
51 |
52 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/adicionando-clientes/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | primefaces.THEME
5 | bootstrap
6 |
7 |
8 | primefaces.FONT_AWESOME
9 | true
10 |
11 |
12 | javax.faces.PROJECT_STAGE
13 | Development
14 |
15 |
16 | javax.faces.FACELETS_REFRESH_PERIOD
17 | 0
18 |
19 |
20 | Faces Servlet
21 | javax.faces.webapp.FacesServlet
22 | 1
23 |
24 |
25 | Faces Servlet
26 | *.xhtml
27 |
28 |
29 | woff
30 | application/font-woff
31 |
32 |
33 | woff2
34 | application/font-woff2
35 |
36 |
--------------------------------------------------------------------------------
/adicionando-clientes/src/main/webapp/resources/algaworks/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/adicionando-clientes/src/main/webapp/resources/algaworks/images/logo.png
--------------------------------------------------------------------------------
/adicionando-clientes/src/main/webapp/resources/algaworks/javascripts/app.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function() {
2 |
3 | $('.js-toggle').bind('click', function() {
4 | $('.js-sidebar').toggleClass('is-toggled');
5 | $('.js-content').toggleClass('is-toggled');
6 | });
7 |
8 | });
--------------------------------------------------------------------------------
/adicionando-clientes/src/main/webapp/resources/algaworks/styles/components.css:
--------------------------------------------------------------------------------
1 | /* TOGGLE */
2 | .aw-toggle {
3 | float: right;
4 | line-height: 50px;
5 | margin-right: 15px;
6 |
7 | color: #fff;
8 | }
9 |
10 | /* MENU */
11 | .aw-menu {
12 | font-size: 1.1em;
13 | }
14 |
15 | .aw-menu > ul {
16 | margin: 0;
17 | padding: 0;
18 | list-style: none;
19 | }
20 |
21 | .aw-menu > ul a {
22 | display: block;
23 | padding: 10px 15px;
24 |
25 | text-decoration: none;
26 | font-weight: 500;
27 | color: #373737;
28 | }
29 |
30 | .aw-menu > ul i {
31 | margin-right: 6px;
32 | }
33 |
34 | .aw-menu > ul a:hover, .aw-menu > ul a:focus {
35 | background-color: #dfdfdf;
36 | }
37 |
38 | .aw-menu > ul .is-selected {
39 | border-left: 3px solid #1e94d2;
40 | background-color: #f3f3f3;
41 | }
42 |
43 | .aw-menu > ul .is-selected a {
44 | margin-left: -3px;
45 | color: #1e94d2;
46 | }
47 |
48 | /* PAGE-TITLE */
49 | .aw-page-title {
50 | margin: 0;
51 | padding: 20px 0;
52 |
53 | font-size: 1.5em;
54 | color: #373737;
55 | }
56 |
57 |
58 |
--------------------------------------------------------------------------------
/adicionando-clientes/src/main/webapp/resources/algaworks/styles/custom.css:
--------------------------------------------------------------------------------
1 | /* BASE */
2 | body {
3 | margin: 0;
4 | font-size: 13px;
5 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
6 | }
7 |
8 | /* TABVIEW */
9 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected a {
10 | color: #555;
11 | }
12 |
13 | @media (max-width: 640px) {
14 | .ui-tabs.ui-tabs-top > .ui-tabs-nav li {
15 | width: 100%;
16 | }
17 | }
18 |
19 | /* PANELGRID */
20 | .ui-panelgrid.panelgrid-noborder .ui-grid-responsive {
21 | border: none;
22 | }
23 |
24 | @media (max-width: 640px) {
25 | .ui-panelgrid.panelgrid-noborder .ui-grid-responsive .ui-grid-row {
26 | border: none;
27 | }
28 | }
--------------------------------------------------------------------------------
/adicionando-clientes/src/main/webapp/resources/algaworks/styles/layout.css:
--------------------------------------------------------------------------------
1 | /* TOPBAR */
2 | .aw-topbar {
3 | position: fixed;
4 | top: 0;
5 | right: 0;
6 | left: 0;
7 | min-height: 50px;
8 | z-index: 9999;
9 |
10 | background-color: #1e94d2;
11 | }
12 |
13 | .aw-topbar > img {
14 | margin-top: 10px;
15 | margin-left: 5px;
16 | }
17 |
18 | /* SIDEBAR */
19 | .aw-sidebar {
20 | position: fixed;
21 | top: 50px;
22 | bottom: 0;
23 | left: 0;
24 | width: 210px;
25 | margin-left: -211px;
26 | z-index: 9998;
27 | transition: margin-left 0.5s;
28 | overflow-y: auto;
29 |
30 | background-color: #f6f6f6;
31 | border-right: 1px solid #eaeaea;
32 | }
33 |
34 | .aw-sidebar.is-toggled {
35 | margin-left: 0px;
36 | }
37 |
38 | @media (min-width: 960px) {
39 | .aw-sidebar {
40 | margin-left: 0px;
41 | }
42 |
43 | .aw-sidebar.is-toggled {
44 | margin-left: -211px;
45 | }
46 | }
47 |
48 | /* CONTENT */
49 | .aw-content {
50 | padding: 0 15px;
51 | margin-top: 50px;
52 | transition: margin-left 0.5s;
53 | }
54 |
55 | @media (min-width: 960px) {
56 | .aw-content {
57 | margin-left: 210px;
58 | }
59 |
60 | .aw-content.is-toggled {
61 | margin-left: 0;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/adicionando-enderecos/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 | .DS_Store
3 | .metadata
4 | .settings
5 | .classpath
6 | .project
7 | target/
--------------------------------------------------------------------------------
/adicionando-enderecos/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | com.algaworks
6 | primefaces-responsivo
7 | 1.0.0-SNAPSHOT
8 | war
9 |
10 |
11 | UTF-8
12 |
13 |
14 |
15 |
16 | org.primefaces
17 | primefaces
18 | 5.3
19 | compile
20 |
21 |
22 |
23 | org.primefaces.themes
24 | bootstrap
25 | 1.0.10
26 | compile
27 |
28 |
29 |
30 | org.glassfish
31 | javax.faces
32 | 2.2.9
33 | compile
34 |
35 |
36 |
37 | javax.servlet
38 | javax.servlet-api
39 | 3.1.0
40 | provided
41 |
42 |
43 |
44 |
45 |
46 |
47 | maven-compiler-plugin
48 | 3.3
49 |
50 | 1.8
51 | 1.8
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | prime-repo
60 | PrimeFaces Maven Repository
61 | http://repository.primefaces.org
62 | default
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/adicionando-enderecos/src/main/java/com/algaworks/model/Endereco.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.model;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Endereco implements Serializable {
6 |
7 | private static final long serialVersionUID = 1L;
8 |
9 | private String logradouro;
10 | private String numero;
11 | private String bairro;
12 | private String cidade;
13 |
14 | public Endereco() {
15 | }
16 |
17 | public Endereco(String logradouro, String numero, String bairro, String cidade) {
18 | super();
19 | this.logradouro = logradouro;
20 | this.numero = numero;
21 | this.bairro = bairro;
22 | this.cidade = cidade;
23 | }
24 |
25 | public String getLogradouro() {
26 | return logradouro;
27 | }
28 |
29 | public void setLogradouro(String logradouro) {
30 | this.logradouro = logradouro;
31 | }
32 |
33 | public String getNumero() {
34 | return numero;
35 | }
36 |
37 | public void setNumero(String numero) {
38 | this.numero = numero;
39 | }
40 |
41 | public String getBairro() {
42 | return bairro;
43 | }
44 |
45 | public void setBairro(String bairro) {
46 | this.bairro = bairro;
47 | }
48 |
49 | public String getCidade() {
50 | return cidade;
51 | }
52 |
53 | public void setCidade(String cidade) {
54 | this.cidade = cidade;
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/adicionando-enderecos/src/main/resources/com/algaworks/Messages_pt_BR.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/adicionando-enderecos/src/main/resources/com/algaworks/Messages_pt_BR.properties
--------------------------------------------------------------------------------
/adicionando-enderecos/src/main/webapp/PesquisaClientes.xhtml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 | Pesquisa de clientes
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/adicionando-enderecos/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | com.algaworks.Messages
9 |
10 |
11 | pt_BR
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/adicionando-enderecos/src/main/webapp/WEB-INF/templates/Layout.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | AlgaWorks
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
51 |
52 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/adicionando-enderecos/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | primefaces.THEME
5 | bootstrap
6 |
7 |
8 | primefaces.FONT_AWESOME
9 | true
10 |
11 |
12 | javax.faces.PROJECT_STAGE
13 | Development
14 |
15 |
16 | javax.faces.FACELETS_REFRESH_PERIOD
17 | 0
18 |
19 |
20 | Faces Servlet
21 | javax.faces.webapp.FacesServlet
22 | 1
23 |
24 |
25 | Faces Servlet
26 | *.xhtml
27 |
28 |
29 | woff
30 | application/font-woff
31 |
32 |
33 | woff2
34 | application/font-woff2
35 |
36 |
--------------------------------------------------------------------------------
/adicionando-enderecos/src/main/webapp/resources/algaworks/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/adicionando-enderecos/src/main/webapp/resources/algaworks/images/logo.png
--------------------------------------------------------------------------------
/adicionando-enderecos/src/main/webapp/resources/algaworks/javascripts/app.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function() {
2 |
3 | $('.js-toggle').bind('click', function() {
4 | $('.js-sidebar').toggleClass('is-toggled');
5 | $('.js-content').toggleClass('is-toggled');
6 | });
7 |
8 | });
--------------------------------------------------------------------------------
/adicionando-enderecos/src/main/webapp/resources/algaworks/styles/components.css:
--------------------------------------------------------------------------------
1 | /* TOGGLE */
2 | .aw-toggle {
3 | float: right;
4 | line-height: 50px;
5 | margin-right: 15px;
6 |
7 | color: #fff;
8 | }
9 |
10 | /* MENU */
11 | .aw-menu {
12 | font-size: 1.1em;
13 | }
14 |
15 | .aw-menu > ul {
16 | margin: 0;
17 | padding: 0;
18 | list-style: none;
19 | }
20 |
21 | .aw-menu > ul a {
22 | display: block;
23 | padding: 10px 15px;
24 |
25 | text-decoration: none;
26 | font-weight: 500;
27 | color: #373737;
28 | }
29 |
30 | .aw-menu > ul i {
31 | margin-right: 6px;
32 | }
33 |
34 | .aw-menu > ul a:hover, .aw-menu > ul a:focus {
35 | background-color: #dfdfdf;
36 | }
37 |
38 | .aw-menu > ul .is-selected {
39 | border-left: 3px solid #1e94d2;
40 | background-color: #f3f3f3;
41 | }
42 |
43 | .aw-menu > ul .is-selected a {
44 | margin-left: -3px;
45 | color: #1e94d2;
46 | }
47 |
48 | /* PAGE-TITLE */
49 | .aw-page-title {
50 | margin: 0;
51 | padding: 20px 0;
52 |
53 | font-size: 1.5em;
54 | color: #373737;
55 | }
56 |
57 |
58 |
--------------------------------------------------------------------------------
/adicionando-enderecos/src/main/webapp/resources/algaworks/styles/custom.css:
--------------------------------------------------------------------------------
1 | /* BASE */
2 | body {
3 | margin: 0;
4 | font-size: 13px;
5 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
6 | }
7 |
8 | /* TABVIEW */
9 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected a {
10 | color: #555;
11 | }
12 |
13 | @media (max-width: 640px) {
14 | .ui-tabs.ui-tabs-top > .ui-tabs-nav li {
15 | width: 100%;
16 | }
17 | }
18 |
19 | /* PANELGRID */
20 | .ui-panelgrid.panelgrid-noborder .ui-grid-responsive {
21 | border: none;
22 | }
23 |
24 | @media (max-width: 640px) {
25 | .ui-panelgrid.panelgrid-noborder .ui-grid-responsive .ui-grid-row {
26 | border: none;
27 | }
28 | }
--------------------------------------------------------------------------------
/adicionando-enderecos/src/main/webapp/resources/algaworks/styles/layout.css:
--------------------------------------------------------------------------------
1 | /* TOPBAR */
2 | .aw-topbar {
3 | position: fixed;
4 | top: 0;
5 | right: 0;
6 | left: 0;
7 | min-height: 50px;
8 | z-index: 9999;
9 |
10 | background-color: #1e94d2;
11 | }
12 |
13 | .aw-topbar > img {
14 | margin-top: 10px;
15 | margin-left: 5px;
16 | }
17 |
18 | /* SIDEBAR */
19 | .aw-sidebar {
20 | position: fixed;
21 | top: 50px;
22 | bottom: 0;
23 | left: 0;
24 | width: 210px;
25 | margin-left: -211px;
26 | z-index: 9998;
27 | transition: margin-left 0.5s;
28 | overflow-y: auto;
29 |
30 | background-color: #f6f6f6;
31 | border-right: 1px solid #eaeaea;
32 | }
33 |
34 | .aw-sidebar.is-toggled {
35 | margin-left: 0px;
36 | }
37 |
38 | @media (min-width: 960px) {
39 | .aw-sidebar {
40 | margin-left: 0px;
41 | }
42 |
43 | .aw-sidebar.is-toggled {
44 | margin-left: -211px;
45 | }
46 | }
47 |
48 | /* CONTENT */
49 | .aw-content {
50 | padding: 0 15px;
51 | margin-top: 50px;
52 | transition: margin-left 0.5s;
53 | }
54 |
55 | @media (min-width: 960px) {
56 | .aw-content {
57 | margin-left: 210px;
58 | }
59 |
60 | .aw-content.is-toggled {
61 | margin-left: 0;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/configurando-tema-bootstrap/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 | .DS_Store
3 | .metadata
4 | .settings
5 | .classpath
6 | .project
7 | target/
--------------------------------------------------------------------------------
/configurando-tema-bootstrap/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | com.algaworks
6 | primefaces-responsivo
7 | 1.0.0-SNAPSHOT
8 | war
9 |
10 |
11 | UTF-8
12 |
13 |
14 |
15 |
16 | org.primefaces
17 | primefaces
18 | 5.3
19 | compile
20 |
21 |
22 |
23 | org.primefaces.themes
24 | bootstrap
25 | 1.0.10
26 | compile
27 |
28 |
29 |
30 | org.glassfish
31 | javax.faces
32 | 2.2.9
33 | compile
34 |
35 |
36 |
37 | javax.servlet
38 | javax.servlet-api
39 | 3.1.0
40 | provided
41 |
42 |
43 |
44 |
45 |
46 |
47 | maven-compiler-plugin
48 | 3.3
49 |
50 | 1.8
51 | 1.8
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | prime-repo
60 | PrimeFaces Maven Repository
61 | http://repository.primefaces.org
62 | default
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/configurando-tema-bootstrap/src/main/java/com/algaworks/model/Endereco.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.model;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Endereco implements Serializable {
6 |
7 | private static final long serialVersionUID = 1L;
8 |
9 | private String logradouro;
10 | private String numero;
11 | private String bairro;
12 | private String cidade;
13 |
14 | public Endereco() {
15 | }
16 |
17 | public Endereco(String logradouro, String numero, String bairro, String cidade) {
18 | super();
19 | this.logradouro = logradouro;
20 | this.numero = numero;
21 | this.bairro = bairro;
22 | this.cidade = cidade;
23 | }
24 |
25 | public String getLogradouro() {
26 | return logradouro;
27 | }
28 |
29 | public void setLogradouro(String logradouro) {
30 | this.logradouro = logradouro;
31 | }
32 |
33 | public String getNumero() {
34 | return numero;
35 | }
36 |
37 | public void setNumero(String numero) {
38 | this.numero = numero;
39 | }
40 |
41 | public String getBairro() {
42 | return bairro;
43 | }
44 |
45 | public void setBairro(String bairro) {
46 | this.bairro = bairro;
47 | }
48 |
49 | public String getCidade() {
50 | return cidade;
51 | }
52 |
53 | public void setCidade(String cidade) {
54 | this.cidade = cidade;
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/configurando-tema-bootstrap/src/main/resources/com/algaworks/Messages_pt_BR.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/configurando-tema-bootstrap/src/main/resources/com/algaworks/Messages_pt_BR.properties
--------------------------------------------------------------------------------
/configurando-tema-bootstrap/src/main/webapp/PesquisaClientes.xhtml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 | Pesquisa de clientes
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/configurando-tema-bootstrap/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | com.algaworks.Messages
9 |
10 |
11 | pt_BR
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/configurando-tema-bootstrap/src/main/webapp/WEB-INF/templates/Layout.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | AlgaWorks
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
51 |
52 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/configurando-tema-bootstrap/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | primefaces.THEME
9 | bootstrap
10 |
11 |
12 |
13 | primefaces.FONT_AWESOME
14 | true
15 |
16 |
17 | javax.faces.PROJECT_STAGE
18 | Development
19 |
20 |
21 | javax.faces.FACELETS_REFRESH_PERIOD
22 | 0
23 |
24 |
25 | Faces Servlet
26 | javax.faces.webapp.FacesServlet
27 | 1
28 |
29 |
30 | Faces Servlet
31 | *.xhtml
32 |
33 |
34 |
35 | woff
36 | application/font-woff
37 |
38 |
39 | woff2
40 | application/font-woff2
41 |
42 |
--------------------------------------------------------------------------------
/configurando-tema-bootstrap/src/main/webapp/resources/algaworks/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/configurando-tema-bootstrap/src/main/webapp/resources/algaworks/images/logo.png
--------------------------------------------------------------------------------
/configurando-tema-bootstrap/src/main/webapp/resources/algaworks/javascripts/app.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function() {
2 |
3 | $('.js-toggle').bind('click', function() {
4 | $('.js-sidebar').toggleClass('is-toggled');
5 | $('.js-content').toggleClass('is-toggled');
6 | });
7 |
8 | });
--------------------------------------------------------------------------------
/configurando-tema-bootstrap/src/main/webapp/resources/algaworks/styles/components.css:
--------------------------------------------------------------------------------
1 | /* TOGGLE */
2 | .aw-toggle {
3 | float: right;
4 | line-height: 50px;
5 | margin-right: 15px;
6 |
7 | color: #fff;
8 | }
9 |
10 | /* MENU */
11 | .aw-menu {
12 | font-size: 1.1em;
13 | }
14 |
15 | .aw-menu > ul {
16 | margin: 0;
17 | padding: 0;
18 | list-style: none;
19 | }
20 |
21 | .aw-menu > ul a {
22 | display: block;
23 | padding: 10px 15px;
24 |
25 | text-decoration: none;
26 | font-weight: 500;
27 | color: #373737;
28 | }
29 |
30 | .aw-menu > ul i {
31 | margin-right: 6px;
32 | }
33 |
34 | .aw-menu > ul a:hover, .aw-menu > ul a:focus {
35 | background-color: #dfdfdf;
36 | }
37 |
38 | .aw-menu > ul .is-selected {
39 | border-left: 3px solid #1e94d2;
40 | background-color: #f3f3f3;
41 | }
42 |
43 | .aw-menu > ul .is-selected a {
44 | margin-left: -3px;
45 | color: #1e94d2;
46 | }
47 |
48 | /* PAGE-TITLE */
49 | .aw-page-title {
50 | margin: 0;
51 | padding: 20px 0;
52 |
53 | font-size: 1.5em;
54 | color: #373737;
55 | }
56 |
57 |
58 |
--------------------------------------------------------------------------------
/configurando-tema-bootstrap/src/main/webapp/resources/algaworks/styles/custom.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-size: 13px;
4 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
5 | }
--------------------------------------------------------------------------------
/configurando-tema-bootstrap/src/main/webapp/resources/algaworks/styles/layout.css:
--------------------------------------------------------------------------------
1 | /* TOPBAR */
2 | .aw-topbar {
3 | position: fixed;
4 | top: 0;
5 | right: 0;
6 | left: 0;
7 | min-height: 50px;
8 | z-index: 9999;
9 |
10 | background-color: #1e94d2;
11 | }
12 |
13 | .aw-topbar > img {
14 | margin-top: 10px;
15 | margin-left: 5px;
16 | }
17 |
18 | /* SIDEBAR */
19 | .aw-sidebar {
20 | position: fixed;
21 | top: 50px;
22 | bottom: 0;
23 | left: 0;
24 | width: 210px;
25 | margin-left: -211px;
26 | z-index: 9998;
27 | transition: margin-left 0.5s;
28 | overflow-y: auto;
29 |
30 | background-color: #f6f6f6;
31 | border-right: 1px solid #eaeaea;
32 | }
33 |
34 | .aw-sidebar.is-toggled {
35 | margin-left: 0px;
36 | }
37 |
38 | @media (min-width: 960px) {
39 | .aw-sidebar {
40 | margin-left: 0px;
41 | }
42 |
43 | .aw-sidebar.is-toggled {
44 | margin-left: -211px;
45 | }
46 | }
47 |
48 | /* CONTENT */
49 | .aw-content {
50 | padding: 0 15px;
51 | margin-top: 50px;
52 | transition: margin-left 0.5s;
53 | }
54 |
55 | @media (min-width: 960px) {
56 | .aw-content {
57 | margin-left: 210px;
58 | }
59 |
60 | .aw-content.is-toggled {
61 | margin-left: 0;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/criando-a-area-de-conteudo/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 | .DS_Store
3 | .metadata
4 | .settings
5 | .classpath
6 | .project
7 | target/
--------------------------------------------------------------------------------
/criando-a-area-de-conteudo/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | com.algaworks
6 | primefaces-responsivo
7 | 1.0.0-SNAPSHOT
8 | war
9 |
10 |
11 | UTF-8
12 |
13 |
14 |
15 |
16 | org.primefaces
17 | primefaces
18 | 5.3
19 | compile
20 |
21 |
22 |
23 | org.glassfish
24 | javax.faces
25 | 2.2.9
26 | compile
27 |
28 |
29 |
30 | javax.servlet
31 | javax.servlet-api
32 | 3.1.0
33 | provided
34 |
35 |
36 |
37 |
38 |
39 |
40 | maven-compiler-plugin
41 | 3.3
42 |
43 | 1.8
44 | 1.8
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/criando-a-area-de-conteudo/src/main/java/com/algaworks/model/Endereco.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.model;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Endereco implements Serializable {
6 |
7 | private static final long serialVersionUID = 1L;
8 |
9 | private String logradouro;
10 | private String numero;
11 | private String bairro;
12 | private String cidade;
13 |
14 | public Endereco() {
15 | }
16 |
17 | public Endereco(String logradouro, String numero, String bairro, String cidade) {
18 | super();
19 | this.logradouro = logradouro;
20 | this.numero = numero;
21 | this.bairro = bairro;
22 | this.cidade = cidade;
23 | }
24 |
25 | public String getLogradouro() {
26 | return logradouro;
27 | }
28 |
29 | public void setLogradouro(String logradouro) {
30 | this.logradouro = logradouro;
31 | }
32 |
33 | public String getNumero() {
34 | return numero;
35 | }
36 |
37 | public void setNumero(String numero) {
38 | this.numero = numero;
39 | }
40 |
41 | public String getBairro() {
42 | return bairro;
43 | }
44 |
45 | public void setBairro(String bairro) {
46 | this.bairro = bairro;
47 | }
48 |
49 | public String getCidade() {
50 | return cidade;
51 | }
52 |
53 | public void setCidade(String cidade) {
54 | this.cidade = cidade;
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/criando-a-area-de-conteudo/src/main/resources/com/algaworks/Messages_pt_BR.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/criando-a-area-de-conteudo/src/main/resources/com/algaworks/Messages_pt_BR.properties
--------------------------------------------------------------------------------
/criando-a-area-de-conteudo/src/main/webapp/Layout.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | AlgaWorks
13 |
14 |
15 |
16 |
17 |
18 |
19 |
22 |
23 |
25 |
26 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/criando-a-area-de-conteudo/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | com.algaworks.Messages
9 |
10 |
11 | pt_BR
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/criando-a-area-de-conteudo/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | javax.faces.PROJECT_STAGE
5 | Development
6 |
7 |
8 | javax.faces.FACELETS_REFRESH_PERIOD
9 | 0
10 |
11 |
12 | Faces Servlet
13 | javax.faces.webapp.FacesServlet
14 | 1
15 |
16 |
17 | Faces Servlet
18 | *.xhtml
19 |
20 |
--------------------------------------------------------------------------------
/criando-a-area-de-conteudo/src/main/webapp/resources/algaworks/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/criando-a-area-de-conteudo/src/main/webapp/resources/algaworks/images/logo.png
--------------------------------------------------------------------------------
/criando-a-area-de-conteudo/src/main/webapp/resources/algaworks/styles/layout.css:
--------------------------------------------------------------------------------
1 | /* TOPBAR */
2 | .aw-topbar {
3 | position: fixed;
4 | top: 0;
5 | right: 0;
6 | left: 0;
7 | min-height: 50px;
8 | z-index: 9999;
9 |
10 | background-color: #1e94d2;
11 | }
12 |
13 | .aw-topbar > img {
14 | margin-top: 10px;
15 | margin-left: 5px;
16 | }
17 |
18 | /* SIDEBAR */
19 | .aw-sidebar {
20 | position: fixed;
21 | top: 50px;
22 | bottom: 0;
23 | left: 0;
24 | width: 210px;
25 | margin-left: -211px;
26 | z-index: 9998;
27 | transition: margin-left 0.5s;
28 | overflow-y: auto;
29 |
30 | background-color: #f6f6f6;
31 | border-right: 1px solid #eaeaea;
32 | }
33 |
34 | @media (min-width: 960px) {
35 | .aw-sidebar {
36 | margin-left: 0px;
37 | }
38 | }
39 |
40 | /* CONTENT */
41 | .aw-content {
42 | margin-top: 50px;
43 | transition: margin-left 0.5s;
44 | }
45 |
46 | @media (min-width: 960px) {
47 | .aw-content {
48 | margin-left: 210px;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/criando-a-barra-lateral/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 | .DS_Store
3 | .metadata
4 | .settings
5 | .classpath
6 | .project
7 | target/
--------------------------------------------------------------------------------
/criando-a-barra-lateral/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | com.algaworks
6 | primefaces-responsivo
7 | 1.0.0-SNAPSHOT
8 | war
9 |
10 |
11 | UTF-8
12 |
13 |
14 |
15 |
16 | org.primefaces
17 | primefaces
18 | 5.3
19 | compile
20 |
21 |
22 |
23 | org.glassfish
24 | javax.faces
25 | 2.2.9
26 | compile
27 |
28 |
29 |
30 | javax.servlet
31 | javax.servlet-api
32 | 3.1.0
33 | provided
34 |
35 |
36 |
37 |
38 |
39 |
40 | maven-compiler-plugin
41 | 3.3
42 |
43 | 1.8
44 | 1.8
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/criando-a-barra-lateral/src/main/java/com/algaworks/model/Endereco.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.model;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Endereco implements Serializable {
6 |
7 | private static final long serialVersionUID = 1L;
8 |
9 | private String logradouro;
10 | private String numero;
11 | private String bairro;
12 | private String cidade;
13 |
14 | public Endereco() {
15 | }
16 |
17 | public Endereco(String logradouro, String numero, String bairro, String cidade) {
18 | super();
19 | this.logradouro = logradouro;
20 | this.numero = numero;
21 | this.bairro = bairro;
22 | this.cidade = cidade;
23 | }
24 |
25 | public String getLogradouro() {
26 | return logradouro;
27 | }
28 |
29 | public void setLogradouro(String logradouro) {
30 | this.logradouro = logradouro;
31 | }
32 |
33 | public String getNumero() {
34 | return numero;
35 | }
36 |
37 | public void setNumero(String numero) {
38 | this.numero = numero;
39 | }
40 |
41 | public String getBairro() {
42 | return bairro;
43 | }
44 |
45 | public void setBairro(String bairro) {
46 | this.bairro = bairro;
47 | }
48 |
49 | public String getCidade() {
50 | return cidade;
51 | }
52 |
53 | public void setCidade(String cidade) {
54 | this.cidade = cidade;
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/criando-a-barra-lateral/src/main/resources/com/algaworks/Messages_pt_BR.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/criando-a-barra-lateral/src/main/resources/com/algaworks/Messages_pt_BR.properties
--------------------------------------------------------------------------------
/criando-a-barra-lateral/src/main/webapp/Layout.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | AlgaWorks
13 |
14 |
15 |
16 |
17 |
18 |
19 |
22 |
23 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/criando-a-barra-lateral/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | com.algaworks.Messages
9 |
10 |
11 | pt_BR
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/criando-a-barra-lateral/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | javax.faces.PROJECT_STAGE
5 | Development
6 |
7 |
8 | javax.faces.FACELETS_REFRESH_PERIOD
9 | 0
10 |
11 |
12 | Faces Servlet
13 | javax.faces.webapp.FacesServlet
14 | 1
15 |
16 |
17 | Faces Servlet
18 | *.xhtml
19 |
20 |
--------------------------------------------------------------------------------
/criando-a-barra-lateral/src/main/webapp/resources/algaworks/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/criando-a-barra-lateral/src/main/webapp/resources/algaworks/images/logo.png
--------------------------------------------------------------------------------
/criando-a-barra-lateral/src/main/webapp/resources/algaworks/styles/layout.css:
--------------------------------------------------------------------------------
1 | /* TOPBAR */
2 | .aw-topbar {
3 | position: fixed;
4 | top: 0;
5 | right: 0;
6 | left: 0;
7 | min-height: 50px;
8 | z-index: 9999;
9 |
10 | background-color: #1e94d2;
11 | }
12 |
13 | .aw-topbar > img {
14 | margin-top: 10px;
15 | margin-left: 5px;
16 | }
17 |
18 | /* SIDEBAR */
19 | .aw-sidebar {
20 | position: fixed;
21 | top: 50px;
22 | bottom: 0;
23 | left: 0;
24 | width: 210px;
25 | margin-left: -211px;
26 | z-index: 9998;
27 | transition: margin-left 0.5s;
28 | overflow-y: auto;
29 |
30 | background-color: #f6f6f6;
31 | border-right: 1px solid #eaeaea;
32 | }
33 |
34 | @media (min-width: 960px) {
35 | .aw-sidebar {
36 | margin-left: 0px;
37 | }
38 | }
--------------------------------------------------------------------------------
/criando-o-arquivo-de-template/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 | .DS_Store
3 | .metadata
4 | .settings
5 | .classpath
6 | .project
7 | target/
--------------------------------------------------------------------------------
/criando-o-arquivo-de-template/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | com.algaworks
6 | primefaces-responsivo
7 | 1.0.0-SNAPSHOT
8 | war
9 |
10 |
11 | UTF-8
12 |
13 |
14 |
15 |
16 | org.primefaces
17 | primefaces
18 | 5.3
19 | compile
20 |
21 |
22 |
23 | org.glassfish
24 | javax.faces
25 | 2.2.9
26 | compile
27 |
28 |
29 |
30 | javax.servlet
31 | javax.servlet-api
32 | 3.1.0
33 | provided
34 |
35 |
36 |
37 |
38 |
39 |
40 | maven-compiler-plugin
41 | 3.3
42 |
43 | 1.8
44 | 1.8
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/criando-o-arquivo-de-template/src/main/java/com/algaworks/model/Endereco.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.model;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Endereco implements Serializable {
6 |
7 | private static final long serialVersionUID = 1L;
8 |
9 | private String logradouro;
10 | private String numero;
11 | private String bairro;
12 | private String cidade;
13 |
14 | public Endereco() {
15 | }
16 |
17 | public Endereco(String logradouro, String numero, String bairro, String cidade) {
18 | super();
19 | this.logradouro = logradouro;
20 | this.numero = numero;
21 | this.bairro = bairro;
22 | this.cidade = cidade;
23 | }
24 |
25 | public String getLogradouro() {
26 | return logradouro;
27 | }
28 |
29 | public void setLogradouro(String logradouro) {
30 | this.logradouro = logradouro;
31 | }
32 |
33 | public String getNumero() {
34 | return numero;
35 | }
36 |
37 | public void setNumero(String numero) {
38 | this.numero = numero;
39 | }
40 |
41 | public String getBairro() {
42 | return bairro;
43 | }
44 |
45 | public void setBairro(String bairro) {
46 | this.bairro = bairro;
47 | }
48 |
49 | public String getCidade() {
50 | return cidade;
51 | }
52 |
53 | public void setCidade(String cidade) {
54 | this.cidade = cidade;
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/criando-o-arquivo-de-template/src/main/resources/com/algaworks/Messages_pt_BR.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/criando-o-arquivo-de-template/src/main/resources/com/algaworks/Messages_pt_BR.properties
--------------------------------------------------------------------------------
/criando-o-arquivo-de-template/src/main/webapp/PesquisaClientes.xhtml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 | Pesquisa de clientes
9 |
10 |
11 |
--------------------------------------------------------------------------------
/criando-o-arquivo-de-template/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | com.algaworks.Messages
9 |
10 |
11 | pt_BR
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/criando-o-arquivo-de-template/src/main/webapp/WEB-INF/templates/Layout.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | AlgaWorks
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
51 |
52 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/criando-o-arquivo-de-template/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | primefaces.FONT_AWESOME
5 | true
6 |
7 |
8 | javax.faces.PROJECT_STAGE
9 | Development
10 |
11 |
12 | javax.faces.FACELETS_REFRESH_PERIOD
13 | 0
14 |
15 |
16 | Faces Servlet
17 | javax.faces.webapp.FacesServlet
18 | 1
19 |
20 |
21 | Faces Servlet
22 | *.xhtml
23 |
24 |
25 | woff
26 | application/font-woff
27 |
28 |
29 | woff2
30 | application/font-woff2
31 |
32 |
--------------------------------------------------------------------------------
/criando-o-arquivo-de-template/src/main/webapp/resources/algaworks/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/criando-o-arquivo-de-template/src/main/webapp/resources/algaworks/images/logo.png
--------------------------------------------------------------------------------
/criando-o-arquivo-de-template/src/main/webapp/resources/algaworks/javascripts/app.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function() {
2 |
3 | $('.js-toggle').bind('click', function() {
4 | $('.js-sidebar').toggleClass('is-toggled');
5 | $('.js-content').toggleClass('is-toggled');
6 | });
7 |
8 | });
--------------------------------------------------------------------------------
/criando-o-arquivo-de-template/src/main/webapp/resources/algaworks/styles/components.css:
--------------------------------------------------------------------------------
1 | /* TOGGLE */
2 | .aw-toggle {
3 | float: right;
4 | line-height: 50px;
5 | margin-right: 15px;
6 |
7 | color: #fff;
8 | }
9 |
10 | /* MENU */
11 | .aw-menu {
12 | font-size: 1.1em;
13 | }
14 |
15 | .aw-menu > ul {
16 | margin: 0;
17 | padding: 0;
18 | list-style: none;
19 | }
20 |
21 | .aw-menu > ul a {
22 | display: block;
23 | padding: 10px 15px;
24 |
25 | text-decoration: none;
26 | font-weight: 500;
27 | color: #373737;
28 | }
29 |
30 | .aw-menu > ul i {
31 | margin-right: 6px;
32 | }
33 |
34 | .aw-menu > ul a:hover, .aw-menu > ul a:focus {
35 | background-color: #dfdfdf;
36 | }
37 |
38 | .aw-menu > ul .is-selected {
39 | border-left: 3px solid #1e94d2;
40 | background-color: #f3f3f3;
41 | }
42 |
43 | .aw-menu > ul .is-selected a {
44 | margin-left: -3px;
45 | color: #1e94d2;
46 | }
47 |
48 | /* PAGE-TITLE */
49 | .aw-page-title {
50 | margin: 0;
51 | padding: 20px 0;
52 |
53 | font-size: 1.5em;
54 | color: #373737;
55 | }
56 |
57 |
58 |
--------------------------------------------------------------------------------
/criando-o-arquivo-de-template/src/main/webapp/resources/algaworks/styles/custom.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-size: 13px;
4 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
5 | }
--------------------------------------------------------------------------------
/criando-o-arquivo-de-template/src/main/webapp/resources/algaworks/styles/layout.css:
--------------------------------------------------------------------------------
1 | /* TOPBAR */
2 | .aw-topbar {
3 | position: fixed;
4 | top: 0;
5 | right: 0;
6 | left: 0;
7 | min-height: 50px;
8 | z-index: 9999;
9 |
10 | background-color: #1e94d2;
11 | }
12 |
13 | .aw-topbar > img {
14 | margin-top: 10px;
15 | margin-left: 5px;
16 | }
17 |
18 | /* SIDEBAR */
19 | .aw-sidebar {
20 | position: fixed;
21 | top: 50px;
22 | bottom: 0;
23 | left: 0;
24 | width: 210px;
25 | margin-left: -211px;
26 | z-index: 9998;
27 | transition: margin-left 0.5s;
28 | overflow-y: auto;
29 |
30 | background-color: #f6f6f6;
31 | border-right: 1px solid #eaeaea;
32 | }
33 |
34 | .aw-sidebar.is-toggled {
35 | margin-left: 0px;
36 | }
37 |
38 | @media (min-width: 960px) {
39 | .aw-sidebar {
40 | margin-left: 0px;
41 | }
42 |
43 | .aw-sidebar.is-toggled {
44 | margin-left: -211px;
45 | }
46 | }
47 |
48 | /* CONTENT */
49 | .aw-content {
50 | padding: 0 15px;
51 | margin-top: 50px;
52 | transition: margin-left 0.5s;
53 | }
54 |
55 | @media (min-width: 960px) {
56 | .aw-content {
57 | margin-left: 210px;
58 | }
59 |
60 | .aw-content.is-toggled {
61 | margin-left: 0;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/criando-o-menu-do-sistema/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 | .DS_Store
3 | .metadata
4 | .settings
5 | .classpath
6 | .project
7 | target/
--------------------------------------------------------------------------------
/criando-o-menu-do-sistema/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | com.algaworks
6 | primefaces-responsivo
7 | 1.0.0-SNAPSHOT
8 | war
9 |
10 |
11 | UTF-8
12 |
13 |
14 |
15 |
16 | org.primefaces
17 | primefaces
18 | 5.3
19 | compile
20 |
21 |
22 |
23 | org.glassfish
24 | javax.faces
25 | 2.2.9
26 | compile
27 |
28 |
29 |
30 | javax.servlet
31 | javax.servlet-api
32 | 3.1.0
33 | provided
34 |
35 |
36 |
37 |
38 |
39 |
40 | maven-compiler-plugin
41 | 3.3
42 |
43 | 1.8
44 | 1.8
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/criando-o-menu-do-sistema/src/main/java/com/algaworks/model/Endereco.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.model;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Endereco implements Serializable {
6 |
7 | private static final long serialVersionUID = 1L;
8 |
9 | private String logradouro;
10 | private String numero;
11 | private String bairro;
12 | private String cidade;
13 |
14 | public Endereco() {
15 | }
16 |
17 | public Endereco(String logradouro, String numero, String bairro, String cidade) {
18 | super();
19 | this.logradouro = logradouro;
20 | this.numero = numero;
21 | this.bairro = bairro;
22 | this.cidade = cidade;
23 | }
24 |
25 | public String getLogradouro() {
26 | return logradouro;
27 | }
28 |
29 | public void setLogradouro(String logradouro) {
30 | this.logradouro = logradouro;
31 | }
32 |
33 | public String getNumero() {
34 | return numero;
35 | }
36 |
37 | public void setNumero(String numero) {
38 | this.numero = numero;
39 | }
40 |
41 | public String getBairro() {
42 | return bairro;
43 | }
44 |
45 | public void setBairro(String bairro) {
46 | this.bairro = bairro;
47 | }
48 |
49 | public String getCidade() {
50 | return cidade;
51 | }
52 |
53 | public void setCidade(String cidade) {
54 | this.cidade = cidade;
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/criando-o-menu-do-sistema/src/main/resources/com/algaworks/Messages_pt_BR.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/criando-o-menu-do-sistema/src/main/resources/com/algaworks/Messages_pt_BR.properties
--------------------------------------------------------------------------------
/criando-o-menu-do-sistema/src/main/webapp/Layout.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | AlgaWorks
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
29 |
30 |
50 |
51 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/criando-o-menu-do-sistema/src/main/webapp/Menu.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | AlgaWorks
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/criando-o-menu-do-sistema/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | com.algaworks.Messages
9 |
10 |
11 | pt_BR
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/criando-o-menu-do-sistema/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | primefaces.FONT_AWESOME
9 | true
10 |
11 |
12 |
13 | javax.faces.PROJECT_STAGE
14 | Development
15 |
16 |
17 | javax.faces.FACELETS_REFRESH_PERIOD
18 | 0
19 |
20 |
21 |
22 | Faces Servlet
23 | javax.faces.webapp.FacesServlet
24 | 1
25 |
26 |
27 | Faces Servlet
28 | *.xhtml
29 |
30 |
31 |
32 | woff
33 | application/font-woff
34 |
35 |
36 |
37 | woff2
38 | application/font-woff2
39 |
40 |
41 |
--------------------------------------------------------------------------------
/criando-o-menu-do-sistema/src/main/webapp/resources/algaworks/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/criando-o-menu-do-sistema/src/main/webapp/resources/algaworks/images/logo.png
--------------------------------------------------------------------------------
/criando-o-menu-do-sistema/src/main/webapp/resources/algaworks/javascripts/app.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function() {
2 |
3 | $('.js-toggle').bind('click', function() {
4 | $('.js-sidebar').toggleClass('is-toggled');
5 | $('.js-content').toggleClass('is-toggled');
6 | });
7 |
8 | });
--------------------------------------------------------------------------------
/criando-o-menu-do-sistema/src/main/webapp/resources/algaworks/styles/components.css:
--------------------------------------------------------------------------------
1 | /* TOGGLE */
2 | .aw-toggle {
3 | float: right;
4 | line-height: 50px;
5 | margin-right: 15px;
6 |
7 | color: #fff;
8 | }
9 |
10 | /* MENU */
11 | .aw-menu {
12 | font-size: 1.1em;
13 | }
14 |
15 | .aw-menu > ul {
16 | margin: 0;
17 | padding: 0;
18 | list-style: none;
19 | }
20 |
21 | .aw-menu > ul a {
22 | display: block;
23 | padding: 10px 15px;
24 |
25 | text-decoration: none;
26 | font-weight: 500;
27 | color: #373737;
28 | }
29 |
30 | .aw-menu > ul i {
31 | margin-right: 6px;
32 | }
33 |
34 | .aw-menu > ul a:hover, .aw-menu > ul a:focus {
35 | background-color: #dfdfdf;
36 | }
37 |
38 | .aw-menu > ul .is-selected {
39 | border-left: 3px solid #1e94d2;
40 | background-color: #f3f3f3;
41 | }
42 |
43 | .aw-menu > ul .is-selected a {
44 | margin-left: -3px;
45 | color: #1e94d2;
46 | }
47 |
--------------------------------------------------------------------------------
/criando-o-menu-do-sistema/src/main/webapp/resources/algaworks/styles/custom.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-size: 13px;
4 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
5 | }
--------------------------------------------------------------------------------
/criando-o-menu-do-sistema/src/main/webapp/resources/algaworks/styles/layout.css:
--------------------------------------------------------------------------------
1 | /* TOPBAR */
2 | .aw-topbar {
3 | position: fixed;
4 | top: 0;
5 | right: 0;
6 | left: 0;
7 | min-height: 50px;
8 | z-index: 9999;
9 |
10 | background-color: #1e94d2;
11 | }
12 |
13 | .aw-topbar > img {
14 | margin-top: 10px;
15 | margin-left: 5px;
16 | }
17 |
18 | /* SIDEBAR */
19 | .aw-sidebar {
20 | position: fixed;
21 | top: 50px;
22 | bottom: 0;
23 | left: 0;
24 | width: 210px;
25 | margin-left: -211px;
26 | z-index: 9998;
27 | transition: margin-left 0.5s;
28 | overflow-y: auto;
29 |
30 | background-color: #f6f6f6;
31 | border-right: 1px solid #eaeaea;
32 | }
33 |
34 | .aw-sidebar.is-toggled {
35 | margin-left: 0px;
36 | }
37 |
38 | @media (min-width: 960px) {
39 | .aw-sidebar {
40 | margin-left: 0px;
41 | }
42 |
43 | .aw-sidebar.is-toggled {
44 | margin-left: -211px;
45 | }
46 | }
47 |
48 | /* CONTENT */
49 | .aw-content {
50 | margin-top: 50px;
51 | transition: margin-left 0.5s;
52 | }
53 |
54 | @media (min-width: 960px) {
55 | .aw-content {
56 | margin-left: 210px;
57 | }
58 |
59 | .aw-content.is-toggled {
60 | margin-left: 0;
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/criando-o-topo/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 | .DS_Store
3 | .metadata
4 | .settings
5 | .classpath
6 | .project
7 | target/
--------------------------------------------------------------------------------
/criando-o-topo/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | com.algaworks
6 | primefaces-responsivo
7 | 1.0.0-SNAPSHOT
8 | war
9 |
10 |
11 | UTF-8
12 |
13 |
14 |
15 |
16 | org.primefaces
17 | primefaces
18 | 5.3
19 | compile
20 |
21 |
22 |
23 | org.glassfish
24 | javax.faces
25 | 2.2.9
26 | compile
27 |
28 |
29 |
30 | javax.servlet
31 | javax.servlet-api
32 | 3.1.0
33 | provided
34 |
35 |
36 |
37 |
38 |
39 |
40 | maven-compiler-plugin
41 | 3.3
42 |
43 | 1.8
44 | 1.8
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/criando-o-topo/src/main/java/com/algaworks/controller/ClientesManager.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.controller;
2 |
3 | import java.io.Serializable;
4 | import java.util.ArrayList;
5 | import java.util.Arrays;
6 | import java.util.Date;
7 | import java.util.List;
8 |
9 | import javax.faces.application.FacesMessage;
10 | import javax.faces.bean.ManagedBean;
11 | import javax.faces.bean.SessionScoped;
12 | import javax.faces.context.FacesContext;
13 |
14 | import com.algaworks.model.Cliente;
15 | import com.algaworks.model.Endereco;
16 |
17 | @ManagedBean
18 | @SessionScoped
19 | public class ClientesManager implements Serializable {
20 |
21 | private static final long serialVersionUID = 1L;
22 |
23 | private List clientes = new ArrayList<>();
24 | private Cliente clienteEdicao = new Cliente();
25 | private Endereco enderecoEdicao;
26 |
27 | public ClientesManager() {
28 | List enderecosJoao = new ArrayList<>();
29 | enderecosJoao.addAll(Arrays.asList(
30 | new Endereco("Rua José Fonseca", "1000", "Centro", "Uberlândia"),
31 | new Endereco("Av. Cesário Alvim", "12", "Brasil", "Belo Horizonte"),
32 | new Endereco("Av. Afonso Pena", "1280", "Centro", "Uberaba")));
33 |
34 | clientes.add(new Cliente("123.123.123-11", "João da Silva Albuquerque",
35 | "(34) 3238-1111", "(34) 9 9999-7716", "joao@algaworks.com",
36 | "Minas Gerais", new Date(), true, "Cliente especial\nÉ gente boa!", enderecosJoao));
37 |
38 | clientes.add(new Cliente("333.333.123-11", "Maria Abadia das Couves Teixeira",
39 | "(11) 4000-1234", "(11) 9 8888-1122", "maria@algaworks.com",
40 | "São Paulo", null, false, null, new ArrayList<>()));
41 |
42 | clientes.add(new Cliente("444.444.123-11", "Paula Maria de Souza Mendes",
43 | "(31) 2233-4455", "(31) 9 9433-2282", "paula@algaworks.com",
44 | "Minas Gerais", null, false, null, new ArrayList<>()));
45 | }
46 |
47 | public void novoEndereco() {
48 | enderecoEdicao = new Endereco();
49 | }
50 |
51 | public String novoCliente() {
52 | clienteEdicao = new Cliente();
53 | return "CadastroCliente?faces-redirect=true";
54 | }
55 |
56 | public void salvar() {
57 | if (!clientes.contains(clienteEdicao)) {
58 | clientes.add(clienteEdicao);
59 | }
60 | clienteEdicao = new Cliente();
61 |
62 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Cliente salvo com sucesso!"));
63 | }
64 |
65 | public List getClientes() {
66 | return clientes;
67 | }
68 |
69 | public Cliente getClienteEdicao() {
70 | return clienteEdicao;
71 | }
72 |
73 | public void setClienteEdicao(Cliente clienteEdicao) {
74 | this.clienteEdicao = clienteEdicao;
75 | }
76 |
77 | public Endereco getEnderecoEdicao() {
78 | return enderecoEdicao;
79 | }
80 |
81 | public void setEnderecoEdicao(Endereco enderecoEdicao) {
82 | this.enderecoEdicao = enderecoEdicao;
83 | }
84 |
85 | }
--------------------------------------------------------------------------------
/criando-o-topo/src/main/java/com/algaworks/model/Endereco.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.model;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Endereco implements Serializable {
6 |
7 | private static final long serialVersionUID = 1L;
8 |
9 | private String logradouro;
10 | private String numero;
11 | private String bairro;
12 | private String cidade;
13 |
14 | public Endereco() {
15 | }
16 |
17 | public Endereco(String logradouro, String numero, String bairro, String cidade) {
18 | super();
19 | this.logradouro = logradouro;
20 | this.numero = numero;
21 | this.bairro = bairro;
22 | this.cidade = cidade;
23 | }
24 |
25 | public String getLogradouro() {
26 | return logradouro;
27 | }
28 |
29 | public void setLogradouro(String logradouro) {
30 | this.logradouro = logradouro;
31 | }
32 |
33 | public String getNumero() {
34 | return numero;
35 | }
36 |
37 | public void setNumero(String numero) {
38 | this.numero = numero;
39 | }
40 |
41 | public String getBairro() {
42 | return bairro;
43 | }
44 |
45 | public void setBairro(String bairro) {
46 | this.bairro = bairro;
47 | }
48 |
49 | public String getCidade() {
50 | return cidade;
51 | }
52 |
53 | public void setCidade(String cidade) {
54 | this.cidade = cidade;
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/criando-o-topo/src/main/resources/com/algaworks/Messages_pt_BR.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/criando-o-topo/src/main/resources/com/algaworks/Messages_pt_BR.properties
--------------------------------------------------------------------------------
/criando-o-topo/src/main/webapp/Layout.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | AlgaWorks
13 |
14 |
15 |
16 |
17 |
18 |
19 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/criando-o-topo/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | com.algaworks.Messages
9 |
10 |
11 | pt_BR
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/criando-o-topo/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 | javax.faces.PROJECT_STAGE
8 | Development
9 |
10 |
11 | javax.faces.FACELETS_REFRESH_PERIOD
12 | 0
13 |
14 |
15 | Faces Servlet
16 | javax.faces.webapp.FacesServlet
17 | 1
18 |
19 |
20 | Faces Servlet
21 | *.xhtml
22 |
23 |
--------------------------------------------------------------------------------
/criando-o-topo/src/main/webapp/resources/algaworks/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/criando-o-topo/src/main/webapp/resources/algaworks/images/logo.png
--------------------------------------------------------------------------------
/criando-o-topo/src/main/webapp/resources/algaworks/styles/layout.css:
--------------------------------------------------------------------------------
1 | /* TOPBAR */
2 | .aw-topbar {
3 | position: fixed;
4 | top: 0;
5 | right: 0;
6 | left: 0;
7 | min-height: 50px;
8 | z-index: 9999;
9 |
10 | background-color: #1e94d2;
11 | }
12 |
13 | .aw-topbar > img {
14 | margin-top: 10px;
15 | margin-left: 5px;
16 | }
--------------------------------------------------------------------------------
/datatable-responsiva-priority/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 | .DS_Store
3 | .metadata
4 | .settings
5 | .classpath
6 | .project
7 | target/
--------------------------------------------------------------------------------
/datatable-responsiva-priority/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | com.algaworks
6 | primefaces-responsivo
7 | 1.0.0-SNAPSHOT
8 | war
9 |
10 |
11 | UTF-8
12 |
13 |
14 |
15 |
16 | org.primefaces
17 | primefaces
18 | 5.3
19 | compile
20 |
21 |
22 |
23 | org.glassfish
24 | javax.faces
25 | 2.2.9
26 | compile
27 |
28 |
29 |
30 | javax.servlet
31 | javax.servlet-api
32 | 3.1.0
33 | provided
34 |
35 |
36 |
37 |
38 |
39 |
40 | maven-compiler-plugin
41 | 3.3
42 |
43 | 1.8
44 | 1.8
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/datatable-responsiva-priority/src/main/java/com/algaworks/model/Endereco.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.model;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Endereco implements Serializable {
6 |
7 | private static final long serialVersionUID = 1L;
8 |
9 | private String logradouro;
10 | private String numero;
11 | private String bairro;
12 | private String cidade;
13 |
14 | public Endereco() {
15 | }
16 |
17 | public Endereco(String logradouro, String numero, String bairro, String cidade) {
18 | super();
19 | this.logradouro = logradouro;
20 | this.numero = numero;
21 | this.bairro = bairro;
22 | this.cidade = cidade;
23 | }
24 |
25 | public String getLogradouro() {
26 | return logradouro;
27 | }
28 |
29 | public void setLogradouro(String logradouro) {
30 | this.logradouro = logradouro;
31 | }
32 |
33 | public String getNumero() {
34 | return numero;
35 | }
36 |
37 | public void setNumero(String numero) {
38 | this.numero = numero;
39 | }
40 |
41 | public String getBairro() {
42 | return bairro;
43 | }
44 |
45 | public void setBairro(String bairro) {
46 | this.bairro = bairro;
47 | }
48 |
49 | public String getCidade() {
50 | return cidade;
51 | }
52 |
53 | public void setCidade(String cidade) {
54 | this.cidade = cidade;
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/datatable-responsiva-priority/src/main/resources/com/algaworks/Messages_pt_BR.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/datatable-responsiva-priority/src/main/resources/com/algaworks/Messages_pt_BR.properties
--------------------------------------------------------------------------------
/datatable-responsiva-priority/src/main/webapp/PesquisaClientes.xhtml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 | Pesquisa de clientes
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/datatable-responsiva-priority/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | com.algaworks.Messages
9 |
10 |
11 | pt_BR
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/datatable-responsiva-priority/src/main/webapp/WEB-INF/templates/Layout.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | AlgaWorks
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
51 |
52 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/datatable-responsiva-priority/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | primefaces.FONT_AWESOME
5 | true
6 |
7 |
8 | javax.faces.PROJECT_STAGE
9 | Development
10 |
11 |
12 | javax.faces.FACELETS_REFRESH_PERIOD
13 | 0
14 |
15 |
16 | Faces Servlet
17 | javax.faces.webapp.FacesServlet
18 | 1
19 |
20 |
21 | Faces Servlet
22 | *.xhtml
23 |
24 |
25 | woff
26 | application/font-woff
27 |
28 |
29 | woff2
30 | application/font-woff2
31 |
32 |
--------------------------------------------------------------------------------
/datatable-responsiva-priority/src/main/webapp/resources/algaworks/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/datatable-responsiva-priority/src/main/webapp/resources/algaworks/images/logo.png
--------------------------------------------------------------------------------
/datatable-responsiva-priority/src/main/webapp/resources/algaworks/javascripts/app.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function() {
2 |
3 | $('.js-toggle').bind('click', function() {
4 | $('.js-sidebar').toggleClass('is-toggled');
5 | $('.js-content').toggleClass('is-toggled');
6 | });
7 |
8 | });
--------------------------------------------------------------------------------
/datatable-responsiva-priority/src/main/webapp/resources/algaworks/styles/components.css:
--------------------------------------------------------------------------------
1 | /* TOGGLE */
2 | .aw-toggle {
3 | float: right;
4 | line-height: 50px;
5 | margin-right: 15px;
6 |
7 | color: #fff;
8 | }
9 |
10 | /* MENU */
11 | .aw-menu {
12 | font-size: 1.1em;
13 | }
14 |
15 | .aw-menu > ul {
16 | margin: 0;
17 | padding: 0;
18 | list-style: none;
19 | }
20 |
21 | .aw-menu > ul a {
22 | display: block;
23 | padding: 10px 15px;
24 |
25 | text-decoration: none;
26 | font-weight: 500;
27 | color: #373737;
28 | }
29 |
30 | .aw-menu > ul i {
31 | margin-right: 6px;
32 | }
33 |
34 | .aw-menu > ul a:hover, .aw-menu > ul a:focus {
35 | background-color: #dfdfdf;
36 | }
37 |
38 | .aw-menu > ul .is-selected {
39 | border-left: 3px solid #1e94d2;
40 | background-color: #f3f3f3;
41 | }
42 |
43 | .aw-menu > ul .is-selected a {
44 | margin-left: -3px;
45 | color: #1e94d2;
46 | }
47 |
48 | /* PAGE-TITLE */
49 | .aw-page-title {
50 | margin: 0;
51 | padding: 20px 0;
52 |
53 | font-size: 1.5em;
54 | color: #373737;
55 | }
56 |
57 |
58 |
--------------------------------------------------------------------------------
/datatable-responsiva-priority/src/main/webapp/resources/algaworks/styles/custom.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-size: 13px;
4 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
5 | }
--------------------------------------------------------------------------------
/datatable-responsiva-priority/src/main/webapp/resources/algaworks/styles/layout.css:
--------------------------------------------------------------------------------
1 | /* TOPBAR */
2 | .aw-topbar {
3 | position: fixed;
4 | top: 0;
5 | right: 0;
6 | left: 0;
7 | min-height: 50px;
8 | z-index: 9999;
9 |
10 | background-color: #1e94d2;
11 | }
12 |
13 | .aw-topbar > img {
14 | margin-top: 10px;
15 | margin-left: 5px;
16 | }
17 |
18 | /* SIDEBAR */
19 | .aw-sidebar {
20 | position: fixed;
21 | top: 50px;
22 | bottom: 0;
23 | left: 0;
24 | width: 210px;
25 | margin-left: -211px;
26 | z-index: 9998;
27 | transition: margin-left 0.5s;
28 | overflow-y: auto;
29 |
30 | background-color: #f6f6f6;
31 | border-right: 1px solid #eaeaea;
32 | }
33 |
34 | .aw-sidebar.is-toggled {
35 | margin-left: 0px;
36 | }
37 |
38 | @media (min-width: 960px) {
39 | .aw-sidebar {
40 | margin-left: 0px;
41 | }
42 |
43 | .aw-sidebar.is-toggled {
44 | margin-left: -211px;
45 | }
46 | }
47 |
48 | /* CONTENT */
49 | .aw-content {
50 | padding: 0 15px;
51 | margin-top: 50px;
52 | transition: margin-left 0.5s;
53 | }
54 |
55 | @media (min-width: 960px) {
56 | .aw-content {
57 | margin-left: 210px;
58 | }
59 |
60 | .aw-content.is-toggled {
61 | margin-left: 0;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/datatable-responsiva-reflow/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 | .DS_Store
3 | .metadata
4 | .settings
5 | .classpath
6 | .project
7 | target/
--------------------------------------------------------------------------------
/datatable-responsiva-reflow/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | com.algaworks
6 | primefaces-responsivo
7 | 1.0.0-SNAPSHOT
8 | war
9 |
10 |
11 | UTF-8
12 |
13 |
14 |
15 |
16 | org.primefaces
17 | primefaces
18 | 5.3
19 | compile
20 |
21 |
22 |
23 | org.glassfish
24 | javax.faces
25 | 2.2.9
26 | compile
27 |
28 |
29 |
30 | javax.servlet
31 | javax.servlet-api
32 | 3.1.0
33 | provided
34 |
35 |
36 |
37 |
38 |
39 |
40 | maven-compiler-plugin
41 | 3.3
42 |
43 | 1.8
44 | 1.8
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/datatable-responsiva-reflow/src/main/java/com/algaworks/model/Endereco.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.model;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Endereco implements Serializable {
6 |
7 | private static final long serialVersionUID = 1L;
8 |
9 | private String logradouro;
10 | private String numero;
11 | private String bairro;
12 | private String cidade;
13 |
14 | public Endereco() {
15 | }
16 |
17 | public Endereco(String logradouro, String numero, String bairro, String cidade) {
18 | super();
19 | this.logradouro = logradouro;
20 | this.numero = numero;
21 | this.bairro = bairro;
22 | this.cidade = cidade;
23 | }
24 |
25 | public String getLogradouro() {
26 | return logradouro;
27 | }
28 |
29 | public void setLogradouro(String logradouro) {
30 | this.logradouro = logradouro;
31 | }
32 |
33 | public String getNumero() {
34 | return numero;
35 | }
36 |
37 | public void setNumero(String numero) {
38 | this.numero = numero;
39 | }
40 |
41 | public String getBairro() {
42 | return bairro;
43 | }
44 |
45 | public void setBairro(String bairro) {
46 | this.bairro = bairro;
47 | }
48 |
49 | public String getCidade() {
50 | return cidade;
51 | }
52 |
53 | public void setCidade(String cidade) {
54 | this.cidade = cidade;
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/datatable-responsiva-reflow/src/main/resources/com/algaworks/Messages_pt_BR.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/datatable-responsiva-reflow/src/main/resources/com/algaworks/Messages_pt_BR.properties
--------------------------------------------------------------------------------
/datatable-responsiva-reflow/src/main/webapp/PesquisaClientes.xhtml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 | Pesquisa de clientes
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/datatable-responsiva-reflow/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | com.algaworks.Messages
9 |
10 |
11 | pt_BR
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/datatable-responsiva-reflow/src/main/webapp/WEB-INF/templates/Layout.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | AlgaWorks
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
51 |
52 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/datatable-responsiva-reflow/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | primefaces.FONT_AWESOME
5 | true
6 |
7 |
8 | javax.faces.PROJECT_STAGE
9 | Development
10 |
11 |
12 | javax.faces.FACELETS_REFRESH_PERIOD
13 | 0
14 |
15 |
16 | Faces Servlet
17 | javax.faces.webapp.FacesServlet
18 | 1
19 |
20 |
21 | Faces Servlet
22 | *.xhtml
23 |
24 |
25 | woff
26 | application/font-woff
27 |
28 |
29 | woff2
30 | application/font-woff2
31 |
32 |
--------------------------------------------------------------------------------
/datatable-responsiva-reflow/src/main/webapp/resources/algaworks/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/datatable-responsiva-reflow/src/main/webapp/resources/algaworks/images/logo.png
--------------------------------------------------------------------------------
/datatable-responsiva-reflow/src/main/webapp/resources/algaworks/javascripts/app.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function() {
2 |
3 | $('.js-toggle').bind('click', function() {
4 | $('.js-sidebar').toggleClass('is-toggled');
5 | $('.js-content').toggleClass('is-toggled');
6 | });
7 |
8 | });
--------------------------------------------------------------------------------
/datatable-responsiva-reflow/src/main/webapp/resources/algaworks/styles/components.css:
--------------------------------------------------------------------------------
1 | /* TOGGLE */
2 | .aw-toggle {
3 | float: right;
4 | line-height: 50px;
5 | margin-right: 15px;
6 |
7 | color: #fff;
8 | }
9 |
10 | /* MENU */
11 | .aw-menu {
12 | font-size: 1.1em;
13 | }
14 |
15 | .aw-menu > ul {
16 | margin: 0;
17 | padding: 0;
18 | list-style: none;
19 | }
20 |
21 | .aw-menu > ul a {
22 | display: block;
23 | padding: 10px 15px;
24 |
25 | text-decoration: none;
26 | font-weight: 500;
27 | color: #373737;
28 | }
29 |
30 | .aw-menu > ul i {
31 | margin-right: 6px;
32 | }
33 |
34 | .aw-menu > ul a:hover, .aw-menu > ul a:focus {
35 | background-color: #dfdfdf;
36 | }
37 |
38 | .aw-menu > ul .is-selected {
39 | border-left: 3px solid #1e94d2;
40 | background-color: #f3f3f3;
41 | }
42 |
43 | .aw-menu > ul .is-selected a {
44 | margin-left: -3px;
45 | color: #1e94d2;
46 | }
47 |
48 | /* PAGE-TITLE */
49 | .aw-page-title {
50 | margin: 0;
51 | padding: 20px 0;
52 |
53 | font-size: 1.5em;
54 | color: #373737;
55 | }
56 |
57 |
58 |
--------------------------------------------------------------------------------
/datatable-responsiva-reflow/src/main/webapp/resources/algaworks/styles/custom.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-size: 13px;
4 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
5 | }
--------------------------------------------------------------------------------
/datatable-responsiva-reflow/src/main/webapp/resources/algaworks/styles/layout.css:
--------------------------------------------------------------------------------
1 | /* TOPBAR */
2 | .aw-topbar {
3 | position: fixed;
4 | top: 0;
5 | right: 0;
6 | left: 0;
7 | min-height: 50px;
8 | z-index: 9999;
9 |
10 | background-color: #1e94d2;
11 | }
12 |
13 | .aw-topbar > img {
14 | margin-top: 10px;
15 | margin-left: 5px;
16 | }
17 |
18 | /* SIDEBAR */
19 | .aw-sidebar {
20 | position: fixed;
21 | top: 50px;
22 | bottom: 0;
23 | left: 0;
24 | width: 210px;
25 | margin-left: -211px;
26 | z-index: 9998;
27 | transition: margin-left 0.5s;
28 | overflow-y: auto;
29 |
30 | background-color: #f6f6f6;
31 | border-right: 1px solid #eaeaea;
32 | }
33 |
34 | .aw-sidebar.is-toggled {
35 | margin-left: 0px;
36 | }
37 |
38 | @media (min-width: 960px) {
39 | .aw-sidebar {
40 | margin-left: 0px;
41 | }
42 |
43 | .aw-sidebar.is-toggled {
44 | margin-left: -211px;
45 | }
46 | }
47 |
48 | /* CONTENT */
49 | .aw-content {
50 | padding: 0 15px;
51 | margin-top: 50px;
52 | transition: margin-left 0.5s;
53 | }
54 |
55 | @media (min-width: 960px) {
56 | .aw-content {
57 | margin-left: 210px;
58 | }
59 |
60 | .aw-content.is-toggled {
61 | margin-left: 0;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/dialog-responsivo/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 | .DS_Store
3 | .metadata
4 | .settings
5 | .classpath
6 | .project
7 | target/
--------------------------------------------------------------------------------
/dialog-responsivo/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | com.algaworks
6 | primefaces-responsivo
7 | 1.0.0-SNAPSHOT
8 | war
9 |
10 |
11 | UTF-8
12 |
13 |
14 |
15 |
16 | org.primefaces
17 | primefaces
18 | 5.3
19 | compile
20 |
21 |
22 |
23 | org.primefaces.themes
24 | bootstrap
25 | 1.0.10
26 | compile
27 |
28 |
29 |
30 | org.glassfish
31 | javax.faces
32 | 2.2.9
33 | compile
34 |
35 |
36 |
37 | javax.servlet
38 | javax.servlet-api
39 | 3.1.0
40 | provided
41 |
42 |
43 |
44 |
45 |
46 |
47 | maven-compiler-plugin
48 | 3.3
49 |
50 | 1.8
51 | 1.8
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | prime-repo
60 | PrimeFaces Maven Repository
61 | http://repository.primefaces.org
62 | default
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/dialog-responsivo/src/main/java/com/algaworks/model/Endereco.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.model;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Endereco implements Serializable {
6 |
7 | private static final long serialVersionUID = 1L;
8 |
9 | private String logradouro;
10 | private String numero;
11 | private String bairro;
12 | private String cidade;
13 |
14 | public Endereco() {
15 | }
16 |
17 | public Endereco(String logradouro, String numero, String bairro, String cidade) {
18 | super();
19 | this.logradouro = logradouro;
20 | this.numero = numero;
21 | this.bairro = bairro;
22 | this.cidade = cidade;
23 | }
24 |
25 | public String getLogradouro() {
26 | return logradouro;
27 | }
28 |
29 | public void setLogradouro(String logradouro) {
30 | this.logradouro = logradouro;
31 | }
32 |
33 | public String getNumero() {
34 | return numero;
35 | }
36 |
37 | public void setNumero(String numero) {
38 | this.numero = numero;
39 | }
40 |
41 | public String getBairro() {
42 | return bairro;
43 | }
44 |
45 | public void setBairro(String bairro) {
46 | this.bairro = bairro;
47 | }
48 |
49 | public String getCidade() {
50 | return cidade;
51 | }
52 |
53 | public void setCidade(String cidade) {
54 | this.cidade = cidade;
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/dialog-responsivo/src/main/resources/com/algaworks/Messages_pt_BR.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/dialog-responsivo/src/main/resources/com/algaworks/Messages_pt_BR.properties
--------------------------------------------------------------------------------
/dialog-responsivo/src/main/webapp/PesquisaClientes.xhtml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 | Pesquisa de clientes
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/dialog-responsivo/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | com.algaworks.Messages
9 |
10 |
11 | pt_BR
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/dialog-responsivo/src/main/webapp/WEB-INF/templates/Layout.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | AlgaWorks
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
51 |
52 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/dialog-responsivo/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | primefaces.THEME
5 | bootstrap
6 |
7 |
8 | primefaces.FONT_AWESOME
9 | true
10 |
11 |
12 | javax.faces.PROJECT_STAGE
13 | Development
14 |
15 |
16 | javax.faces.FACELETS_REFRESH_PERIOD
17 | 0
18 |
19 |
20 | Faces Servlet
21 | javax.faces.webapp.FacesServlet
22 | 1
23 |
24 |
25 | Faces Servlet
26 | *.xhtml
27 |
28 |
29 | woff
30 | application/font-woff
31 |
32 |
33 | woff2
34 | application/font-woff2
35 |
36 |
--------------------------------------------------------------------------------
/dialog-responsivo/src/main/webapp/resources/algaworks/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/dialog-responsivo/src/main/webapp/resources/algaworks/images/logo.png
--------------------------------------------------------------------------------
/dialog-responsivo/src/main/webapp/resources/algaworks/javascripts/app.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function() {
2 |
3 | $('.js-toggle').bind('click', function() {
4 | $('.js-sidebar').toggleClass('is-toggled');
5 | $('.js-content').toggleClass('is-toggled');
6 | });
7 |
8 | });
--------------------------------------------------------------------------------
/dialog-responsivo/src/main/webapp/resources/algaworks/styles/components.css:
--------------------------------------------------------------------------------
1 | /* TOGGLE */
2 | .aw-toggle {
3 | float: right;
4 | line-height: 50px;
5 | margin-right: 15px;
6 |
7 | color: #fff;
8 | }
9 |
10 | /* MENU */
11 | .aw-menu {
12 | font-size: 1.1em;
13 | }
14 |
15 | .aw-menu > ul {
16 | margin: 0;
17 | padding: 0;
18 | list-style: none;
19 | }
20 |
21 | .aw-menu > ul a {
22 | display: block;
23 | padding: 10px 15px;
24 |
25 | text-decoration: none;
26 | font-weight: 500;
27 | color: #373737;
28 | }
29 |
30 | .aw-menu > ul i {
31 | margin-right: 6px;
32 | }
33 |
34 | .aw-menu > ul a:hover, .aw-menu > ul a:focus {
35 | background-color: #dfdfdf;
36 | }
37 |
38 | .aw-menu > ul .is-selected {
39 | border-left: 3px solid #1e94d2;
40 | background-color: #f3f3f3;
41 | }
42 |
43 | .aw-menu > ul .is-selected a {
44 | margin-left: -3px;
45 | color: #1e94d2;
46 | }
47 |
48 | /* PAGE-TITLE */
49 | .aw-page-title {
50 | margin: 0;
51 | padding: 20px 0;
52 |
53 | font-size: 1.5em;
54 | color: #373737;
55 | }
56 |
57 |
58 |
--------------------------------------------------------------------------------
/dialog-responsivo/src/main/webapp/resources/algaworks/styles/custom.css:
--------------------------------------------------------------------------------
1 | /* BASE */
2 | body {
3 | margin: 0;
4 | font-size: 13px;
5 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
6 | }
7 |
8 | /* TABVIEW */
9 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected a {
10 | color: #555;
11 | }
12 |
13 | @media (max-width: 640px) {
14 | .ui-tabs.ui-tabs-top > .ui-tabs-nav li {
15 | width: 100%;
16 | }
17 | }
18 |
19 | /* PANELGRID */
20 | .ui-panelgrid.panelgrid-noborder .ui-grid-responsive {
21 | border: none;
22 | }
23 |
24 | @media (max-width: 640px) {
25 | .ui-panelgrid.panelgrid-noborder .ui-grid-responsive .ui-grid-row {
26 | border: none;
27 | }
28 | }
--------------------------------------------------------------------------------
/dialog-responsivo/src/main/webapp/resources/algaworks/styles/layout.css:
--------------------------------------------------------------------------------
1 | /* TOPBAR */
2 | .aw-topbar {
3 | position: fixed;
4 | top: 0;
5 | right: 0;
6 | left: 0;
7 | min-height: 50px;
8 | z-index: 9999;
9 |
10 | background-color: #1e94d2;
11 | }
12 |
13 | .aw-topbar > img {
14 | margin-top: 10px;
15 | margin-left: 5px;
16 | }
17 |
18 | /* SIDEBAR */
19 | .aw-sidebar {
20 | position: fixed;
21 | top: 50px;
22 | bottom: 0;
23 | left: 0;
24 | width: 210px;
25 | margin-left: -211px;
26 | z-index: 9998;
27 | transition: margin-left 0.5s;
28 | overflow-y: auto;
29 |
30 | background-color: #f6f6f6;
31 | border-right: 1px solid #eaeaea;
32 | }
33 |
34 | .aw-sidebar.is-toggled {
35 | margin-left: 0px;
36 | }
37 |
38 | @media (min-width: 960px) {
39 | .aw-sidebar {
40 | margin-left: 0px;
41 | }
42 |
43 | .aw-sidebar.is-toggled {
44 | margin-left: -211px;
45 | }
46 | }
47 |
48 | /* CONTENT */
49 | .aw-content {
50 | padding: 0 15px;
51 | margin-top: 50px;
52 | transition: margin-left 0.5s;
53 | }
54 |
55 | @media (min-width: 960px) {
56 | .aw-content {
57 | margin-left: 210px;
58 | }
59 |
60 | .aw-content.is-toggled {
61 | margin-left: 0;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/editando-clientes/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 | .DS_Store
3 | .metadata
4 | .settings
5 | .classpath
6 | .project
7 | target/
--------------------------------------------------------------------------------
/editando-clientes/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | com.algaworks
6 | primefaces-responsivo
7 | 1.0.0-SNAPSHOT
8 | war
9 |
10 |
11 | UTF-8
12 |
13 |
14 |
15 |
16 | org.primefaces
17 | primefaces
18 | 5.3
19 | compile
20 |
21 |
22 |
23 | org.primefaces.themes
24 | bootstrap
25 | 1.0.10
26 | compile
27 |
28 |
29 |
30 | org.glassfish
31 | javax.faces
32 | 2.2.9
33 | compile
34 |
35 |
36 |
37 | javax.servlet
38 | javax.servlet-api
39 | 3.1.0
40 | provided
41 |
42 |
43 |
44 |
45 |
46 |
47 | maven-compiler-plugin
48 | 3.3
49 |
50 | 1.8
51 | 1.8
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | prime-repo
60 | PrimeFaces Maven Repository
61 | http://repository.primefaces.org
62 | default
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/editando-clientes/src/main/java/com/algaworks/model/Endereco.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.model;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Endereco implements Serializable {
6 |
7 | private static final long serialVersionUID = 1L;
8 |
9 | private String logradouro;
10 | private String numero;
11 | private String bairro;
12 | private String cidade;
13 |
14 | public Endereco() {
15 | }
16 |
17 | public Endereco(String logradouro, String numero, String bairro, String cidade) {
18 | super();
19 | this.logradouro = logradouro;
20 | this.numero = numero;
21 | this.bairro = bairro;
22 | this.cidade = cidade;
23 | }
24 |
25 | public String getLogradouro() {
26 | return logradouro;
27 | }
28 |
29 | public void setLogradouro(String logradouro) {
30 | this.logradouro = logradouro;
31 | }
32 |
33 | public String getNumero() {
34 | return numero;
35 | }
36 |
37 | public void setNumero(String numero) {
38 | this.numero = numero;
39 | }
40 |
41 | public String getBairro() {
42 | return bairro;
43 | }
44 |
45 | public void setBairro(String bairro) {
46 | this.bairro = bairro;
47 | }
48 |
49 | public String getCidade() {
50 | return cidade;
51 | }
52 |
53 | public void setCidade(String cidade) {
54 | this.cidade = cidade;
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/editando-clientes/src/main/resources/com/algaworks/Messages_pt_BR.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/editando-clientes/src/main/resources/com/algaworks/Messages_pt_BR.properties
--------------------------------------------------------------------------------
/editando-clientes/src/main/webapp/PesquisaClientes.xhtml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 | Pesquisa de clientes
10 |
11 |
12 |
13 |
14 |
15 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/editando-clientes/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | com.algaworks.Messages
9 |
10 |
11 | pt_BR
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/editando-clientes/src/main/webapp/WEB-INF/templates/Layout.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | AlgaWorks
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
51 |
52 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/editando-clientes/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | primefaces.THEME
5 | bootstrap
6 |
7 |
8 | primefaces.FONT_AWESOME
9 | true
10 |
11 |
12 | javax.faces.PROJECT_STAGE
13 | Development
14 |
15 |
16 | javax.faces.FACELETS_REFRESH_PERIOD
17 | 0
18 |
19 |
20 | Faces Servlet
21 | javax.faces.webapp.FacesServlet
22 | 1
23 |
24 |
25 | Faces Servlet
26 | *.xhtml
27 |
28 |
29 | woff
30 | application/font-woff
31 |
32 |
33 | woff2
34 | application/font-woff2
35 |
36 |
--------------------------------------------------------------------------------
/editando-clientes/src/main/webapp/resources/algaworks/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/editando-clientes/src/main/webapp/resources/algaworks/images/logo.png
--------------------------------------------------------------------------------
/editando-clientes/src/main/webapp/resources/algaworks/javascripts/app.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function() {
2 |
3 | $('.js-toggle').bind('click', function() {
4 | $('.js-sidebar').toggleClass('is-toggled');
5 | $('.js-content').toggleClass('is-toggled');
6 | });
7 |
8 | });
--------------------------------------------------------------------------------
/editando-clientes/src/main/webapp/resources/algaworks/styles/components.css:
--------------------------------------------------------------------------------
1 | /* TOGGLE */
2 | .aw-toggle {
3 | float: right;
4 | line-height: 50px;
5 | margin-right: 15px;
6 |
7 | color: #fff;
8 | }
9 |
10 | /* MENU */
11 | .aw-menu {
12 | font-size: 1.1em;
13 | }
14 |
15 | .aw-menu > ul {
16 | margin: 0;
17 | padding: 0;
18 | list-style: none;
19 | }
20 |
21 | .aw-menu > ul a {
22 | display: block;
23 | padding: 10px 15px;
24 |
25 | text-decoration: none;
26 | font-weight: 500;
27 | color: #373737;
28 | }
29 |
30 | .aw-menu > ul i {
31 | margin-right: 6px;
32 | }
33 |
34 | .aw-menu > ul a:hover, .aw-menu > ul a:focus {
35 | background-color: #dfdfdf;
36 | }
37 |
38 | .aw-menu > ul .is-selected {
39 | border-left: 3px solid #1e94d2;
40 | background-color: #f3f3f3;
41 | }
42 |
43 | .aw-menu > ul .is-selected a {
44 | margin-left: -3px;
45 | color: #1e94d2;
46 | }
47 |
48 | /* PAGE-TITLE */
49 | .aw-page-title {
50 | margin: 0;
51 | padding: 20px 0;
52 |
53 | font-size: 1.5em;
54 | color: #373737;
55 | }
56 |
57 |
58 |
--------------------------------------------------------------------------------
/editando-clientes/src/main/webapp/resources/algaworks/styles/custom.css:
--------------------------------------------------------------------------------
1 | /* BASE */
2 | body {
3 | margin: 0;
4 | font-size: 13px;
5 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
6 | }
7 |
8 | /* TABVIEW */
9 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected a {
10 | color: #555;
11 | }
12 |
13 | @media (max-width: 640px) {
14 | .ui-tabs.ui-tabs-top > .ui-tabs-nav li {
15 | width: 100%;
16 | }
17 | }
18 |
19 | /* PANELGRID */
20 | .ui-panelgrid.panelgrid-noborder .ui-grid-responsive {
21 | border: none;
22 | }
23 |
24 | @media (max-width: 640px) {
25 | .ui-panelgrid.panelgrid-noborder .ui-grid-responsive .ui-grid-row {
26 | border: none;
27 | }
28 | }
--------------------------------------------------------------------------------
/editando-clientes/src/main/webapp/resources/algaworks/styles/layout.css:
--------------------------------------------------------------------------------
1 | /* TOPBAR */
2 | .aw-topbar {
3 | position: fixed;
4 | top: 0;
5 | right: 0;
6 | left: 0;
7 | min-height: 50px;
8 | z-index: 9999;
9 |
10 | background-color: #1e94d2;
11 | }
12 |
13 | .aw-topbar > img {
14 | margin-top: 10px;
15 | margin-left: 5px;
16 | }
17 |
18 | /* SIDEBAR */
19 | .aw-sidebar {
20 | position: fixed;
21 | top: 50px;
22 | bottom: 0;
23 | left: 0;
24 | width: 210px;
25 | margin-left: -211px;
26 | z-index: 9998;
27 | transition: margin-left 0.5s;
28 | overflow-y: auto;
29 |
30 | background-color: #f6f6f6;
31 | border-right: 1px solid #eaeaea;
32 | }
33 |
34 | .aw-sidebar.is-toggled {
35 | margin-left: 0px;
36 | }
37 |
38 | @media (min-width: 960px) {
39 | .aw-sidebar {
40 | margin-left: 0px;
41 | }
42 |
43 | .aw-sidebar.is-toggled {
44 | margin-left: -211px;
45 | }
46 | }
47 |
48 | /* CONTENT */
49 | .aw-content {
50 | padding: 0 15px;
51 | margin-top: 50px;
52 | transition: margin-left 0.5s;
53 | }
54 |
55 | @media (min-width: 960px) {
56 | .aw-content {
57 | margin-left: 210px;
58 | }
59 |
60 | .aw-content.is-toggled {
61 | margin-left: 0;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/grid-css/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 | .DS_Store
3 | .metadata
4 | .settings
5 | .classpath
6 | .project
7 | target/
--------------------------------------------------------------------------------
/grid-css/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | com.algaworks
6 | primefaces-responsivo
7 | 1.0.0-SNAPSHOT
8 | war
9 |
10 |
11 | UTF-8
12 |
13 |
14 |
15 |
16 | org.primefaces
17 | primefaces
18 | 5.3
19 | compile
20 |
21 |
22 |
23 | org.glassfish
24 | javax.faces
25 | 2.2.9
26 | compile
27 |
28 |
29 |
30 | javax.servlet
31 | javax.servlet-api
32 | 3.1.0
33 | provided
34 |
35 |
36 |
37 |
38 |
39 |
40 | maven-compiler-plugin
41 | 3.3
42 |
43 | 1.8
44 | 1.8
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/grid-css/src/main/java/com/algaworks/controller/ClientesManager.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.controller;
2 |
3 | import java.io.Serializable;
4 | import java.util.ArrayList;
5 | import java.util.Arrays;
6 | import java.util.Date;
7 | import java.util.List;
8 |
9 | import javax.faces.application.FacesMessage;
10 | import javax.faces.bean.ManagedBean;
11 | import javax.faces.bean.SessionScoped;
12 | import javax.faces.context.FacesContext;
13 |
14 | import com.algaworks.model.Cliente;
15 | import com.algaworks.model.Endereco;
16 |
17 | @ManagedBean
18 | @SessionScoped
19 | public class ClientesManager implements Serializable {
20 |
21 | private static final long serialVersionUID = 1L;
22 |
23 | private List clientes = new ArrayList<>();
24 | private Cliente clienteEdicao = new Cliente();
25 | private Endereco enderecoEdicao;
26 |
27 | public ClientesManager() {
28 | List enderecosJoao = new ArrayList<>();
29 | enderecosJoao.addAll(Arrays.asList(
30 | new Endereco("Rua José Fonseca", "1000", "Centro", "Uberlândia"),
31 | new Endereco("Av. Cesário Alvim", "12", "Brasil", "Belo Horizonte"),
32 | new Endereco("Av. Afonso Pena", "1280", "Centro", "Uberaba")));
33 |
34 | clientes.add(new Cliente("123.123.123-11", "João da Silva Albuquerque",
35 | "(34) 3238-1111", "(34) 9 9999-7716", "joao@algaworks.com",
36 | "Minas Gerais", new Date(), true, "Cliente especial\nÉ gente boa!", enderecosJoao));
37 |
38 | clientes.add(new Cliente("333.333.123-11", "Maria Abadia das Couves Teixeira",
39 | "(11) 4000-1234", "(11) 9 8888-1122", "maria@algaworks.com",
40 | "São Paulo", null, false, null, new ArrayList<>()));
41 |
42 | clientes.add(new Cliente("444.444.123-11", "Paula Maria de Souza Mendes",
43 | "(31) 2233-4455", "(31) 9 9433-2282", "paula@algaworks.com",
44 | "Minas Gerais", null, false, null, new ArrayList<>()));
45 | }
46 |
47 | public void novoEndereco() {
48 | enderecoEdicao = new Endereco();
49 | }
50 |
51 | public String novoCliente() {
52 | clienteEdicao = new Cliente();
53 | return "CadastroCliente?faces-redirect=true";
54 | }
55 |
56 | public void salvar() {
57 | if (!clientes.contains(clienteEdicao)) {
58 | clientes.add(clienteEdicao);
59 | }
60 | clienteEdicao = new Cliente();
61 |
62 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Cliente salvo com sucesso!"));
63 | }
64 |
65 | public List getClientes() {
66 | return clientes;
67 | }
68 |
69 | public Cliente getClienteEdicao() {
70 | return clienteEdicao;
71 | }
72 |
73 | public void setClienteEdicao(Cliente clienteEdicao) {
74 | this.clienteEdicao = clienteEdicao;
75 | }
76 |
77 | public Endereco getEnderecoEdicao() {
78 | return enderecoEdicao;
79 | }
80 |
81 | public void setEnderecoEdicao(Endereco enderecoEdicao) {
82 | this.enderecoEdicao = enderecoEdicao;
83 | }
84 |
85 | }
--------------------------------------------------------------------------------
/grid-css/src/main/java/com/algaworks/model/Endereco.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.model;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Endereco implements Serializable {
6 |
7 | private static final long serialVersionUID = 1L;
8 |
9 | private String logradouro;
10 | private String numero;
11 | private String bairro;
12 | private String cidade;
13 |
14 | public Endereco() {
15 | }
16 |
17 | public Endereco(String logradouro, String numero, String bairro, String cidade) {
18 | super();
19 | this.logradouro = logradouro;
20 | this.numero = numero;
21 | this.bairro = bairro;
22 | this.cidade = cidade;
23 | }
24 |
25 | public String getLogradouro() {
26 | return logradouro;
27 | }
28 |
29 | public void setLogradouro(String logradouro) {
30 | this.logradouro = logradouro;
31 | }
32 |
33 | public String getNumero() {
34 | return numero;
35 | }
36 |
37 | public void setNumero(String numero) {
38 | this.numero = numero;
39 | }
40 |
41 | public String getBairro() {
42 | return bairro;
43 | }
44 |
45 | public void setBairro(String bairro) {
46 | this.bairro = bairro;
47 | }
48 |
49 | public String getCidade() {
50 | return cidade;
51 | }
52 |
53 | public void setCidade(String cidade) {
54 | this.cidade = cidade;
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/grid-css/src/main/resources/com/algaworks/Messages_pt_BR.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/grid-css/src/main/resources/com/algaworks/Messages_pt_BR.properties
--------------------------------------------------------------------------------
/grid-css/src/main/webapp/Teste.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | AlgaWorks
13 |
14 |
15 |
16 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
49 |
50 | Conteúdo
51 |
52 |
53 | Anúncio
54 |
55 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/grid-css/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | com.algaworks.Messages
9 |
10 |
11 | pt_BR
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/grid-css/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | javax.faces.PROJECT_STAGE
5 | Development
6 |
7 |
8 | javax.faces.FACELETS_REFRESH_PERIOD
9 | 0
10 |
11 |
12 | Faces Servlet
13 | javax.faces.webapp.FacesServlet
14 | 1
15 |
16 |
17 | Faces Servlet
18 | *.xhtml
19 |
20 |
--------------------------------------------------------------------------------
/grid-css/src/main/webapp/resources/algaworks/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/grid-css/src/main/webapp/resources/algaworks/images/logo.png
--------------------------------------------------------------------------------
/intercambiando-a-barra-lateral/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 | .DS_Store
3 | .metadata
4 | .settings
5 | .classpath
6 | .project
7 | target/
--------------------------------------------------------------------------------
/intercambiando-a-barra-lateral/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | com.algaworks
6 | primefaces-responsivo
7 | 1.0.0-SNAPSHOT
8 | war
9 |
10 |
11 | UTF-8
12 |
13 |
14 |
15 |
16 | org.primefaces
17 | primefaces
18 | 5.3
19 | compile
20 |
21 |
22 |
23 | org.glassfish
24 | javax.faces
25 | 2.2.9
26 | compile
27 |
28 |
29 |
30 | javax.servlet
31 | javax.servlet-api
32 | 3.1.0
33 | provided
34 |
35 |
36 |
37 |
38 |
39 |
40 | maven-compiler-plugin
41 | 3.3
42 |
43 | 1.8
44 | 1.8
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/intercambiando-a-barra-lateral/src/main/java/com/algaworks/model/Endereco.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.model;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Endereco implements Serializable {
6 |
7 | private static final long serialVersionUID = 1L;
8 |
9 | private String logradouro;
10 | private String numero;
11 | private String bairro;
12 | private String cidade;
13 |
14 | public Endereco() {
15 | }
16 |
17 | public Endereco(String logradouro, String numero, String bairro, String cidade) {
18 | super();
19 | this.logradouro = logradouro;
20 | this.numero = numero;
21 | this.bairro = bairro;
22 | this.cidade = cidade;
23 | }
24 |
25 | public String getLogradouro() {
26 | return logradouro;
27 | }
28 |
29 | public void setLogradouro(String logradouro) {
30 | this.logradouro = logradouro;
31 | }
32 |
33 | public String getNumero() {
34 | return numero;
35 | }
36 |
37 | public void setNumero(String numero) {
38 | this.numero = numero;
39 | }
40 |
41 | public String getBairro() {
42 | return bairro;
43 | }
44 |
45 | public void setBairro(String bairro) {
46 | this.bairro = bairro;
47 | }
48 |
49 | public String getCidade() {
50 | return cidade;
51 | }
52 |
53 | public void setCidade(String cidade) {
54 | this.cidade = cidade;
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/intercambiando-a-barra-lateral/src/main/resources/com/algaworks/Messages_pt_BR.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/intercambiando-a-barra-lateral/src/main/resources/com/algaworks/Messages_pt_BR.properties
--------------------------------------------------------------------------------
/intercambiando-a-barra-lateral/src/main/webapp/Layout.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | AlgaWorks
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
28 |
29 |
31 |
32 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/intercambiando-a-barra-lateral/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | com.algaworks.Messages
9 |
10 |
11 | pt_BR
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/intercambiando-a-barra-lateral/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | primefaces.FONT_AWESOME
9 | true
10 |
11 |
12 |
13 | javax.faces.PROJECT_STAGE
14 | Development
15 |
16 |
17 | javax.faces.FACELETS_REFRESH_PERIOD
18 | 0
19 |
20 |
21 |
22 | Faces Servlet
23 | javax.faces.webapp.FacesServlet
24 | 1
25 |
26 |
27 | Faces Servlet
28 | *.xhtml
29 |
30 |
31 |
32 | woff
33 | application/font-woff
34 |
35 |
36 |
37 | woff2
38 | application/font-woff2
39 |
40 |
41 |
--------------------------------------------------------------------------------
/intercambiando-a-barra-lateral/src/main/webapp/resources/algaworks/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/intercambiando-a-barra-lateral/src/main/webapp/resources/algaworks/images/logo.png
--------------------------------------------------------------------------------
/intercambiando-a-barra-lateral/src/main/webapp/resources/algaworks/javascripts/app.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function() {
2 |
3 | $('.js-toggle').bind('click', function() {
4 | $('.js-sidebar').toggleClass('is-toggled');
5 | $('.js-content').toggleClass('is-toggled');
6 | });
7 |
8 | });
--------------------------------------------------------------------------------
/intercambiando-a-barra-lateral/src/main/webapp/resources/algaworks/styles/components.css:
--------------------------------------------------------------------------------
1 | /* TOGGLE */
2 | .aw-toggle {
3 | float: right;
4 | line-height: 50px;
5 | margin-right: 15px;
6 |
7 | color: #fff;
8 | }
--------------------------------------------------------------------------------
/intercambiando-a-barra-lateral/src/main/webapp/resources/algaworks/styles/layout.css:
--------------------------------------------------------------------------------
1 | /* TOPBAR */
2 | .aw-topbar {
3 | position: fixed;
4 | top: 0;
5 | right: 0;
6 | left: 0;
7 | min-height: 50px;
8 | z-index: 9999;
9 |
10 | background-color: #1e94d2;
11 | }
12 |
13 | .aw-topbar > img {
14 | margin-top: 10px;
15 | margin-left: 5px;
16 | }
17 |
18 | /* SIDEBAR */
19 | .aw-sidebar {
20 | position: fixed;
21 | top: 50px;
22 | bottom: 0;
23 | left: 0;
24 | width: 210px;
25 | margin-left: -211px;
26 | z-index: 9998;
27 | transition: margin-left 0.5s;
28 | overflow-y: auto;
29 |
30 | background-color: #f6f6f6;
31 | border-right: 1px solid #eaeaea;
32 | }
33 |
34 | .aw-sidebar.is-toggled {
35 | margin-left: 0px;
36 | }
37 |
38 | @media (min-width: 960px) {
39 | .aw-sidebar {
40 | margin-left: 0px;
41 | }
42 |
43 | .aw-sidebar.is-toggled {
44 | margin-left: -211px;
45 | }
46 | }
47 |
48 | /* CONTENT */
49 | .aw-content {
50 | margin-top: 50px;
51 | transition: margin-left 0.5s;
52 | }
53 |
54 | @media (min-width: 960px) {
55 | .aw-content {
56 | margin-left: 210px;
57 | }
58 |
59 | .aw-content.is-toggled {
60 | margin-left: 0;
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/layout-fixo/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 | .DS_Store
3 | .metadata
4 | .settings
5 | .classpath
6 | .project
7 | target/
--------------------------------------------------------------------------------
/layout-fixo/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | com.algaworks
6 | primefaces-responsivo
7 | 1.0.0-SNAPSHOT
8 | war
9 |
10 |
11 | UTF-8
12 |
13 |
14 |
15 |
16 | org.primefaces
17 | primefaces
18 | 5.3
19 | compile
20 |
21 |
22 |
23 | org.glassfish
24 | javax.faces
25 | 2.2.9
26 | compile
27 |
28 |
29 |
30 | javax.servlet
31 | javax.servlet-api
32 | 3.1.0
33 | provided
34 |
35 |
36 |
37 |
38 |
39 |
40 | maven-compiler-plugin
41 | 3.3
42 |
43 | 1.8
44 | 1.8
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/layout-fixo/src/main/java/com/algaworks/controller/ClientesManager.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.controller;
2 |
3 | import java.io.Serializable;
4 | import java.util.ArrayList;
5 | import java.util.Arrays;
6 | import java.util.Date;
7 | import java.util.List;
8 |
9 | import javax.faces.application.FacesMessage;
10 | import javax.faces.bean.ManagedBean;
11 | import javax.faces.bean.SessionScoped;
12 | import javax.faces.context.FacesContext;
13 |
14 | import com.algaworks.model.Cliente;
15 | import com.algaworks.model.Endereco;
16 |
17 | @ManagedBean
18 | @SessionScoped
19 | public class ClientesManager implements Serializable {
20 |
21 | private static final long serialVersionUID = 1L;
22 |
23 | private List clientes = new ArrayList<>();
24 | private Cliente clienteEdicao = new Cliente();
25 | private Endereco enderecoEdicao;
26 |
27 | public ClientesManager() {
28 | List enderecosJoao = new ArrayList<>();
29 | enderecosJoao.addAll(Arrays.asList(
30 | new Endereco("Rua José Fonseca", "1000", "Centro", "Uberlândia"),
31 | new Endereco("Av. Cesário Alvim", "12", "Brasil", "Belo Horizonte"),
32 | new Endereco("Av. Afonso Pena", "1280", "Centro", "Uberaba")));
33 |
34 | clientes.add(new Cliente("123.123.123-11", "João da Silva Albuquerque",
35 | "(34) 3238-1111", "(34) 9 9999-7716", "joao@algaworks.com",
36 | "Minas Gerais", new Date(), true, "Cliente especial\nÉ gente boa!", enderecosJoao));
37 |
38 | clientes.add(new Cliente("333.333.123-11", "Maria Abadia das Couves Teixeira",
39 | "(11) 4000-1234", "(11) 9 8888-1122", "maria@algaworks.com",
40 | "São Paulo", null, false, null, new ArrayList<>()));
41 |
42 | clientes.add(new Cliente("444.444.123-11", "Paula Maria de Souza Mendes",
43 | "(31) 2233-4455", "(31) 9 9433-2282", "paula@algaworks.com",
44 | "Minas Gerais", null, false, null, new ArrayList<>()));
45 | }
46 |
47 | public void novoEndereco() {
48 | enderecoEdicao = new Endereco();
49 | }
50 |
51 | public String novoCliente() {
52 | clienteEdicao = new Cliente();
53 | return "CadastroCliente?faces-redirect=true";
54 | }
55 |
56 | public void salvar() {
57 | if (!clientes.contains(clienteEdicao)) {
58 | clientes.add(clienteEdicao);
59 | }
60 | clienteEdicao = new Cliente();
61 |
62 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Cliente salvo com sucesso!"));
63 | }
64 |
65 | public List getClientes() {
66 | return clientes;
67 | }
68 |
69 | public Cliente getClienteEdicao() {
70 | return clienteEdicao;
71 | }
72 |
73 | public void setClienteEdicao(Cliente clienteEdicao) {
74 | this.clienteEdicao = clienteEdicao;
75 | }
76 |
77 | public Endereco getEnderecoEdicao() {
78 | return enderecoEdicao;
79 | }
80 |
81 | public void setEnderecoEdicao(Endereco enderecoEdicao) {
82 | this.enderecoEdicao = enderecoEdicao;
83 | }
84 |
85 | }
--------------------------------------------------------------------------------
/layout-fixo/src/main/java/com/algaworks/model/Endereco.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.model;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Endereco implements Serializable {
6 |
7 | private static final long serialVersionUID = 1L;
8 |
9 | private String logradouro;
10 | private String numero;
11 | private String bairro;
12 | private String cidade;
13 |
14 | public Endereco() {
15 | }
16 |
17 | public Endereco(String logradouro, String numero, String bairro, String cidade) {
18 | super();
19 | this.logradouro = logradouro;
20 | this.numero = numero;
21 | this.bairro = bairro;
22 | this.cidade = cidade;
23 | }
24 |
25 | public String getLogradouro() {
26 | return logradouro;
27 | }
28 |
29 | public void setLogradouro(String logradouro) {
30 | this.logradouro = logradouro;
31 | }
32 |
33 | public String getNumero() {
34 | return numero;
35 | }
36 |
37 | public void setNumero(String numero) {
38 | this.numero = numero;
39 | }
40 |
41 | public String getBairro() {
42 | return bairro;
43 | }
44 |
45 | public void setBairro(String bairro) {
46 | this.bairro = bairro;
47 | }
48 |
49 | public String getCidade() {
50 | return cidade;
51 | }
52 |
53 | public void setCidade(String cidade) {
54 | this.cidade = cidade;
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/layout-fixo/src/main/resources/com/algaworks/Messages_pt_BR.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/layout-fixo/src/main/resources/com/algaworks/Messages_pt_BR.properties
--------------------------------------------------------------------------------
/layout-fixo/src/main/webapp/Teste.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | AlgaWorks
14 |
15 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/layout-fixo/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | com.algaworks.Messages
9 |
10 |
11 | pt_BR
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/layout-fixo/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | javax.faces.PROJECT_STAGE
5 | Development
6 |
7 |
8 | javax.faces.FACELETS_REFRESH_PERIOD
9 | 0
10 |
11 |
12 | Faces Servlet
13 | javax.faces.webapp.FacesServlet
14 | 1
15 |
16 |
17 | Faces Servlet
18 | *.xhtml
19 |
20 |
--------------------------------------------------------------------------------
/layout-fixo/src/main/webapp/resources/algaworks/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/layout-fixo/src/main/webapp/resources/algaworks/images/logo.png
--------------------------------------------------------------------------------
/layout-fluido/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 | .DS_Store
3 | .metadata
4 | .settings
5 | .classpath
6 | .project
7 | target/
--------------------------------------------------------------------------------
/layout-fluido/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | com.algaworks
6 | primefaces-responsivo
7 | 1.0.0-SNAPSHOT
8 | war
9 |
10 |
11 | UTF-8
12 |
13 |
14 |
15 |
16 | org.primefaces
17 | primefaces
18 | 5.3
19 | compile
20 |
21 |
22 |
23 | org.glassfish
24 | javax.faces
25 | 2.2.9
26 | compile
27 |
28 |
29 |
30 | javax.servlet
31 | javax.servlet-api
32 | 3.1.0
33 | provided
34 |
35 |
36 |
37 |
38 |
39 |
40 | maven-compiler-plugin
41 | 3.3
42 |
43 | 1.8
44 | 1.8
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/layout-fluido/src/main/java/com/algaworks/controller/ClientesManager.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.controller;
2 |
3 | import java.io.Serializable;
4 | import java.util.ArrayList;
5 | import java.util.Arrays;
6 | import java.util.Date;
7 | import java.util.List;
8 |
9 | import javax.faces.application.FacesMessage;
10 | import javax.faces.bean.ManagedBean;
11 | import javax.faces.bean.SessionScoped;
12 | import javax.faces.context.FacesContext;
13 |
14 | import com.algaworks.model.Cliente;
15 | import com.algaworks.model.Endereco;
16 |
17 | @ManagedBean
18 | @SessionScoped
19 | public class ClientesManager implements Serializable {
20 |
21 | private static final long serialVersionUID = 1L;
22 |
23 | private List clientes = new ArrayList<>();
24 | private Cliente clienteEdicao = new Cliente();
25 | private Endereco enderecoEdicao;
26 |
27 | public ClientesManager() {
28 | List enderecosJoao = new ArrayList<>();
29 | enderecosJoao.addAll(Arrays.asList(
30 | new Endereco("Rua José Fonseca", "1000", "Centro", "Uberlândia"),
31 | new Endereco("Av. Cesário Alvim", "12", "Brasil", "Belo Horizonte"),
32 | new Endereco("Av. Afonso Pena", "1280", "Centro", "Uberaba")));
33 |
34 | clientes.add(new Cliente("123.123.123-11", "João da Silva Albuquerque",
35 | "(34) 3238-1111", "(34) 9 9999-7716", "joao@algaworks.com",
36 | "Minas Gerais", new Date(), true, "Cliente especial\nÉ gente boa!", enderecosJoao));
37 |
38 | clientes.add(new Cliente("333.333.123-11", "Maria Abadia das Couves Teixeira",
39 | "(11) 4000-1234", "(11) 9 8888-1122", "maria@algaworks.com",
40 | "São Paulo", null, false, null, new ArrayList<>()));
41 |
42 | clientes.add(new Cliente("444.444.123-11", "Paula Maria de Souza Mendes",
43 | "(31) 2233-4455", "(31) 9 9433-2282", "paula@algaworks.com",
44 | "Minas Gerais", null, false, null, new ArrayList<>()));
45 | }
46 |
47 | public void novoEndereco() {
48 | enderecoEdicao = new Endereco();
49 | }
50 |
51 | public String novoCliente() {
52 | clienteEdicao = new Cliente();
53 | return "CadastroCliente?faces-redirect=true";
54 | }
55 |
56 | public void salvar() {
57 | if (!clientes.contains(clienteEdicao)) {
58 | clientes.add(clienteEdicao);
59 | }
60 | clienteEdicao = new Cliente();
61 |
62 | FacesContext.getCurrentInstance().addMessage(null, new FacesMessage("Cliente salvo com sucesso!"));
63 | }
64 |
65 | public List getClientes() {
66 | return clientes;
67 | }
68 |
69 | public Cliente getClienteEdicao() {
70 | return clienteEdicao;
71 | }
72 |
73 | public void setClienteEdicao(Cliente clienteEdicao) {
74 | this.clienteEdicao = clienteEdicao;
75 | }
76 |
77 | public Endereco getEnderecoEdicao() {
78 | return enderecoEdicao;
79 | }
80 |
81 | public void setEnderecoEdicao(Endereco enderecoEdicao) {
82 | this.enderecoEdicao = enderecoEdicao;
83 | }
84 |
85 | }
--------------------------------------------------------------------------------
/layout-fluido/src/main/java/com/algaworks/model/Endereco.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.model;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Endereco implements Serializable {
6 |
7 | private static final long serialVersionUID = 1L;
8 |
9 | private String logradouro;
10 | private String numero;
11 | private String bairro;
12 | private String cidade;
13 |
14 | public Endereco() {
15 | }
16 |
17 | public Endereco(String logradouro, String numero, String bairro, String cidade) {
18 | super();
19 | this.logradouro = logradouro;
20 | this.numero = numero;
21 | this.bairro = bairro;
22 | this.cidade = cidade;
23 | }
24 |
25 | public String getLogradouro() {
26 | return logradouro;
27 | }
28 |
29 | public void setLogradouro(String logradouro) {
30 | this.logradouro = logradouro;
31 | }
32 |
33 | public String getNumero() {
34 | return numero;
35 | }
36 |
37 | public void setNumero(String numero) {
38 | this.numero = numero;
39 | }
40 |
41 | public String getBairro() {
42 | return bairro;
43 | }
44 |
45 | public void setBairro(String bairro) {
46 | this.bairro = bairro;
47 | }
48 |
49 | public String getCidade() {
50 | return cidade;
51 | }
52 |
53 | public void setCidade(String cidade) {
54 | this.cidade = cidade;
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/layout-fluido/src/main/resources/com/algaworks/Messages_pt_BR.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/layout-fluido/src/main/resources/com/algaworks/Messages_pt_BR.properties
--------------------------------------------------------------------------------
/layout-fluido/src/main/webapp/Teste.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | AlgaWorks
14 |
15 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/layout-fluido/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | com.algaworks.Messages
9 |
10 |
11 | pt_BR
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/layout-fluido/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | javax.faces.PROJECT_STAGE
5 | Development
6 |
7 |
8 | javax.faces.FACELETS_REFRESH_PERIOD
9 | 0
10 |
11 |
12 | Faces Servlet
13 | javax.faces.webapp.FacesServlet
14 | 1
15 |
16 |
17 | Faces Servlet
18 | *.xhtml
19 |
20 |
--------------------------------------------------------------------------------
/layout-fluido/src/main/webapp/resources/algaworks/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/layout-fluido/src/main/webapp/resources/algaworks/images/logo.png
--------------------------------------------------------------------------------
/layout-responsivo/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 | .DS_Store
3 | .metadata
4 | .settings
5 | .classpath
6 | .project
7 | target/
--------------------------------------------------------------------------------
/layout-responsivo/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | com.algaworks
6 | primefaces-responsivo
7 | 1.0.0-SNAPSHOT
8 | war
9 |
10 |
11 | UTF-8
12 |
13 |
14 |
15 |
16 | org.primefaces
17 | primefaces
18 | 5.3
19 | compile
20 |
21 |
22 |
23 | org.glassfish
24 | javax.faces
25 | 2.2.9
26 | compile
27 |
28 |
29 |
30 | javax.servlet
31 | javax.servlet-api
32 | 3.1.0
33 | provided
34 |
35 |
36 |
37 |
38 |
39 |
40 | maven-compiler-plugin
41 | 3.3
42 |
43 | 1.8
44 | 1.8
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/layout-responsivo/src/main/java/com/algaworks/model/Endereco.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.model;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Endereco implements Serializable {
6 |
7 | private static final long serialVersionUID = 1L;
8 |
9 | private String logradouro;
10 | private String numero;
11 | private String bairro;
12 | private String cidade;
13 |
14 | public Endereco() {
15 | }
16 |
17 | public Endereco(String logradouro, String numero, String bairro, String cidade) {
18 | super();
19 | this.logradouro = logradouro;
20 | this.numero = numero;
21 | this.bairro = bairro;
22 | this.cidade = cidade;
23 | }
24 |
25 | public String getLogradouro() {
26 | return logradouro;
27 | }
28 |
29 | public void setLogradouro(String logradouro) {
30 | this.logradouro = logradouro;
31 | }
32 |
33 | public String getNumero() {
34 | return numero;
35 | }
36 |
37 | public void setNumero(String numero) {
38 | this.numero = numero;
39 | }
40 |
41 | public String getBairro() {
42 | return bairro;
43 | }
44 |
45 | public void setBairro(String bairro) {
46 | this.bairro = bairro;
47 | }
48 |
49 | public String getCidade() {
50 | return cidade;
51 | }
52 |
53 | public void setCidade(String cidade) {
54 | this.cidade = cidade;
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/layout-responsivo/src/main/resources/com/algaworks/Messages_pt_BR.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/layout-responsivo/src/main/resources/com/algaworks/Messages_pt_BR.properties
--------------------------------------------------------------------------------
/layout-responsivo/src/main/webapp/Teste.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | AlgaWorks
14 |
15 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/layout-responsivo/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | com.algaworks.Messages
9 |
10 |
11 | pt_BR
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/layout-responsivo/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | javax.faces.PROJECT_STAGE
5 | Development
6 |
7 |
8 | javax.faces.FACELETS_REFRESH_PERIOD
9 | 0
10 |
11 |
12 | Faces Servlet
13 | javax.faces.webapp.FacesServlet
14 | 1
15 |
16 |
17 | Faces Servlet
18 | *.xhtml
19 |
20 |
--------------------------------------------------------------------------------
/layout-responsivo/src/main/webapp/resources/algaworks/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/layout-responsivo/src/main/webapp/resources/algaworks/images/logo.png
--------------------------------------------------------------------------------
/meta-tag-viewport/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 | .DS_Store
3 | .metadata
4 | .settings
5 | .classpath
6 | .project
7 | target/
--------------------------------------------------------------------------------
/meta-tag-viewport/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | com.algaworks
6 | primefaces-responsivo
7 | 1.0.0-SNAPSHOT
8 | war
9 |
10 |
11 | UTF-8
12 |
13 |
14 |
15 |
16 | org.primefaces
17 | primefaces
18 | 5.3
19 | compile
20 |
21 |
22 |
23 | org.glassfish
24 | javax.faces
25 | 2.2.9
26 | compile
27 |
28 |
29 |
30 | javax.servlet
31 | javax.servlet-api
32 | 3.1.0
33 | provided
34 |
35 |
36 |
37 |
38 |
39 |
40 | maven-compiler-plugin
41 | 3.3
42 |
43 | 1.8
44 | 1.8
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/meta-tag-viewport/src/main/java/com/algaworks/model/Endereco.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.model;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Endereco implements Serializable {
6 |
7 | private static final long serialVersionUID = 1L;
8 |
9 | private String logradouro;
10 | private String numero;
11 | private String bairro;
12 | private String cidade;
13 |
14 | public Endereco() {
15 | }
16 |
17 | public Endereco(String logradouro, String numero, String bairro, String cidade) {
18 | super();
19 | this.logradouro = logradouro;
20 | this.numero = numero;
21 | this.bairro = bairro;
22 | this.cidade = cidade;
23 | }
24 |
25 | public String getLogradouro() {
26 | return logradouro;
27 | }
28 |
29 | public void setLogradouro(String logradouro) {
30 | this.logradouro = logradouro;
31 | }
32 |
33 | public String getNumero() {
34 | return numero;
35 | }
36 |
37 | public void setNumero(String numero) {
38 | this.numero = numero;
39 | }
40 |
41 | public String getBairro() {
42 | return bairro;
43 | }
44 |
45 | public void setBairro(String bairro) {
46 | this.bairro = bairro;
47 | }
48 |
49 | public String getCidade() {
50 | return cidade;
51 | }
52 |
53 | public void setCidade(String cidade) {
54 | this.cidade = cidade;
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/meta-tag-viewport/src/main/resources/com/algaworks/Messages_pt_BR.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/meta-tag-viewport/src/main/resources/com/algaworks/Messages_pt_BR.properties
--------------------------------------------------------------------------------
/meta-tag-viewport/src/main/webapp/Teste.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | AlgaWorks
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/meta-tag-viewport/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | com.algaworks.Messages
9 |
10 |
11 | pt_BR
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/meta-tag-viewport/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | javax.faces.PROJECT_STAGE
5 | Development
6 |
7 |
8 | javax.faces.FACELETS_REFRESH_PERIOD
9 | 0
10 |
11 |
12 | Faces Servlet
13 | javax.faces.webapp.FacesServlet
14 | 1
15 |
16 |
17 | Faces Servlet
18 | *.xhtml
19 |
20 |
--------------------------------------------------------------------------------
/meta-tag-viewport/src/main/webapp/resources/algaworks/images/duke.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/meta-tag-viewport/src/main/webapp/resources/algaworks/images/duke.jpg
--------------------------------------------------------------------------------
/meta-tag-viewport/src/main/webapp/resources/algaworks/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/meta-tag-viewport/src/main/webapp/resources/algaworks/images/logo.png
--------------------------------------------------------------------------------
/panelgrid-responsivo/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 | .DS_Store
3 | .metadata
4 | .settings
5 | .classpath
6 | .project
7 | target/
--------------------------------------------------------------------------------
/panelgrid-responsivo/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | com.algaworks
6 | primefaces-responsivo
7 | 1.0.0-SNAPSHOT
8 | war
9 |
10 |
11 | UTF-8
12 |
13 |
14 |
15 |
16 | org.primefaces
17 | primefaces
18 | 5.3
19 | compile
20 |
21 |
22 |
23 | org.primefaces.themes
24 | bootstrap
25 | 1.0.10
26 | compile
27 |
28 |
29 |
30 | org.glassfish
31 | javax.faces
32 | 2.2.9
33 | compile
34 |
35 |
36 |
37 | javax.servlet
38 | javax.servlet-api
39 | 3.1.0
40 | provided
41 |
42 |
43 |
44 |
45 |
46 |
47 | maven-compiler-plugin
48 | 3.3
49 |
50 | 1.8
51 | 1.8
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | prime-repo
60 | PrimeFaces Maven Repository
61 | http://repository.primefaces.org
62 | default
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/panelgrid-responsivo/src/main/java/com/algaworks/model/Endereco.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.model;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Endereco implements Serializable {
6 |
7 | private static final long serialVersionUID = 1L;
8 |
9 | private String logradouro;
10 | private String numero;
11 | private String bairro;
12 | private String cidade;
13 |
14 | public Endereco() {
15 | }
16 |
17 | public Endereco(String logradouro, String numero, String bairro, String cidade) {
18 | super();
19 | this.logradouro = logradouro;
20 | this.numero = numero;
21 | this.bairro = bairro;
22 | this.cidade = cidade;
23 | }
24 |
25 | public String getLogradouro() {
26 | return logradouro;
27 | }
28 |
29 | public void setLogradouro(String logradouro) {
30 | this.logradouro = logradouro;
31 | }
32 |
33 | public String getNumero() {
34 | return numero;
35 | }
36 |
37 | public void setNumero(String numero) {
38 | this.numero = numero;
39 | }
40 |
41 | public String getBairro() {
42 | return bairro;
43 | }
44 |
45 | public void setBairro(String bairro) {
46 | this.bairro = bairro;
47 | }
48 |
49 | public String getCidade() {
50 | return cidade;
51 | }
52 |
53 | public void setCidade(String cidade) {
54 | this.cidade = cidade;
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/panelgrid-responsivo/src/main/resources/com/algaworks/Messages_pt_BR.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/panelgrid-responsivo/src/main/resources/com/algaworks/Messages_pt_BR.properties
--------------------------------------------------------------------------------
/panelgrid-responsivo/src/main/webapp/PesquisaClientes.xhtml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 | Pesquisa de clientes
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/panelgrid-responsivo/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | com.algaworks.Messages
9 |
10 |
11 | pt_BR
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/panelgrid-responsivo/src/main/webapp/WEB-INF/templates/Layout.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | AlgaWorks
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
51 |
52 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/panelgrid-responsivo/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | primefaces.THEME
5 | bootstrap
6 |
7 |
8 | primefaces.FONT_AWESOME
9 | true
10 |
11 |
12 | javax.faces.PROJECT_STAGE
13 | Development
14 |
15 |
16 | javax.faces.FACELETS_REFRESH_PERIOD
17 | 0
18 |
19 |
20 | Faces Servlet
21 | javax.faces.webapp.FacesServlet
22 | 1
23 |
24 |
25 | Faces Servlet
26 | *.xhtml
27 |
28 |
29 | woff
30 | application/font-woff
31 |
32 |
33 | woff2
34 | application/font-woff2
35 |
36 |
--------------------------------------------------------------------------------
/panelgrid-responsivo/src/main/webapp/resources/algaworks/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/panelgrid-responsivo/src/main/webapp/resources/algaworks/images/logo.png
--------------------------------------------------------------------------------
/panelgrid-responsivo/src/main/webapp/resources/algaworks/javascripts/app.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function() {
2 |
3 | $('.js-toggle').bind('click', function() {
4 | $('.js-sidebar').toggleClass('is-toggled');
5 | $('.js-content').toggleClass('is-toggled');
6 | });
7 |
8 | });
--------------------------------------------------------------------------------
/panelgrid-responsivo/src/main/webapp/resources/algaworks/styles/components.css:
--------------------------------------------------------------------------------
1 | /* TOGGLE */
2 | .aw-toggle {
3 | float: right;
4 | line-height: 50px;
5 | margin-right: 15px;
6 |
7 | color: #fff;
8 | }
9 |
10 | /* MENU */
11 | .aw-menu {
12 | font-size: 1.1em;
13 | }
14 |
15 | .aw-menu > ul {
16 | margin: 0;
17 | padding: 0;
18 | list-style: none;
19 | }
20 |
21 | .aw-menu > ul a {
22 | display: block;
23 | padding: 10px 15px;
24 |
25 | text-decoration: none;
26 | font-weight: 500;
27 | color: #373737;
28 | }
29 |
30 | .aw-menu > ul i {
31 | margin-right: 6px;
32 | }
33 |
34 | .aw-menu > ul a:hover, .aw-menu > ul a:focus {
35 | background-color: #dfdfdf;
36 | }
37 |
38 | .aw-menu > ul .is-selected {
39 | border-left: 3px solid #1e94d2;
40 | background-color: #f3f3f3;
41 | }
42 |
43 | .aw-menu > ul .is-selected a {
44 | margin-left: -3px;
45 | color: #1e94d2;
46 | }
47 |
48 | /* PAGE-TITLE */
49 | .aw-page-title {
50 | margin: 0;
51 | padding: 20px 0;
52 |
53 | font-size: 1.5em;
54 | color: #373737;
55 | }
56 |
57 |
58 |
--------------------------------------------------------------------------------
/panelgrid-responsivo/src/main/webapp/resources/algaworks/styles/custom.css:
--------------------------------------------------------------------------------
1 | /* BASE */
2 | body {
3 | margin: 0;
4 | font-size: 13px;
5 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
6 | }
7 |
8 | /* TABVIEW */
9 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected a {
10 | color: #555;
11 | }
12 |
13 | @media (max-width: 640px) {
14 | .ui-tabs.ui-tabs-top > .ui-tabs-nav li {
15 | width: 100%;
16 | }
17 | }
18 |
19 | /* PANELGRID */
20 | .ui-panelgrid.panelgrid-noborder .ui-grid-responsive {
21 | border: none;
22 | }
23 |
24 | @media (max-width: 640px) {
25 | .ui-panelgrid.panelgrid-noborder .ui-grid-responsive .ui-grid-row {
26 | border: none;
27 | }
28 | }
--------------------------------------------------------------------------------
/panelgrid-responsivo/src/main/webapp/resources/algaworks/styles/layout.css:
--------------------------------------------------------------------------------
1 | /* TOPBAR */
2 | .aw-topbar {
3 | position: fixed;
4 | top: 0;
5 | right: 0;
6 | left: 0;
7 | min-height: 50px;
8 | z-index: 9999;
9 |
10 | background-color: #1e94d2;
11 | }
12 |
13 | .aw-topbar > img {
14 | margin-top: 10px;
15 | margin-left: 5px;
16 | }
17 |
18 | /* SIDEBAR */
19 | .aw-sidebar {
20 | position: fixed;
21 | top: 50px;
22 | bottom: 0;
23 | left: 0;
24 | width: 210px;
25 | margin-left: -211px;
26 | z-index: 9998;
27 | transition: margin-left 0.5s;
28 | overflow-y: auto;
29 |
30 | background-color: #f6f6f6;
31 | border-right: 1px solid #eaeaea;
32 | }
33 |
34 | .aw-sidebar.is-toggled {
35 | margin-left: 0px;
36 | }
37 |
38 | @media (min-width: 960px) {
39 | .aw-sidebar {
40 | margin-left: 0px;
41 | }
42 |
43 | .aw-sidebar.is-toggled {
44 | margin-left: -211px;
45 | }
46 | }
47 |
48 | /* CONTENT */
49 | .aw-content {
50 | padding: 0 15px;
51 | margin-top: 50px;
52 | transition: margin-left 0.5s;
53 | }
54 |
55 | @media (min-width: 960px) {
56 | .aw-content {
57 | margin-left: 210px;
58 | }
59 |
60 | .aw-content.is-toggled {
61 | margin-left: 0;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/tabview-responsivo/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 | .DS_Store
3 | .metadata
4 | .settings
5 | .classpath
6 | .project
7 | target/
--------------------------------------------------------------------------------
/tabview-responsivo/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 |
5 | com.algaworks
6 | primefaces-responsivo
7 | 1.0.0-SNAPSHOT
8 | war
9 |
10 |
11 | UTF-8
12 |
13 |
14 |
15 |
16 | org.primefaces
17 | primefaces
18 | 5.3
19 | compile
20 |
21 |
22 |
23 | org.primefaces.themes
24 | bootstrap
25 | 1.0.10
26 | compile
27 |
28 |
29 |
30 | org.glassfish
31 | javax.faces
32 | 2.2.9
33 | compile
34 |
35 |
36 |
37 | javax.servlet
38 | javax.servlet-api
39 | 3.1.0
40 | provided
41 |
42 |
43 |
44 |
45 |
46 |
47 | maven-compiler-plugin
48 | 3.3
49 |
50 | 1.8
51 | 1.8
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | prime-repo
60 | PrimeFaces Maven Repository
61 | http://repository.primefaces.org
62 | default
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/tabview-responsivo/src/main/java/com/algaworks/model/Endereco.java:
--------------------------------------------------------------------------------
1 | package com.algaworks.model;
2 |
3 | import java.io.Serializable;
4 |
5 | public class Endereco implements Serializable {
6 |
7 | private static final long serialVersionUID = 1L;
8 |
9 | private String logradouro;
10 | private String numero;
11 | private String bairro;
12 | private String cidade;
13 |
14 | public Endereco() {
15 | }
16 |
17 | public Endereco(String logradouro, String numero, String bairro, String cidade) {
18 | super();
19 | this.logradouro = logradouro;
20 | this.numero = numero;
21 | this.bairro = bairro;
22 | this.cidade = cidade;
23 | }
24 |
25 | public String getLogradouro() {
26 | return logradouro;
27 | }
28 |
29 | public void setLogradouro(String logradouro) {
30 | this.logradouro = logradouro;
31 | }
32 |
33 | public String getNumero() {
34 | return numero;
35 | }
36 |
37 | public void setNumero(String numero) {
38 | this.numero = numero;
39 | }
40 |
41 | public String getBairro() {
42 | return bairro;
43 | }
44 |
45 | public void setBairro(String bairro) {
46 | this.bairro = bairro;
47 | }
48 |
49 | public String getCidade() {
50 | return cidade;
51 | }
52 |
53 | public void setCidade(String cidade) {
54 | this.cidade = cidade;
55 | }
56 |
57 | }
--------------------------------------------------------------------------------
/tabview-responsivo/src/main/resources/com/algaworks/Messages_pt_BR.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/tabview-responsivo/src/main/resources/com/algaworks/Messages_pt_BR.properties
--------------------------------------------------------------------------------
/tabview-responsivo/src/main/webapp/CadastroCliente.xhtml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 | Cadastro de cliente
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | Aba 1
25 |
26 |
27 |
28 | Aba 2
29 |
30 |
31 |
32 | Aba 3
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/tabview-responsivo/src/main/webapp/PesquisaClientes.xhtml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 | Pesquisa de clientes
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/tabview-responsivo/src/main/webapp/WEB-INF/faces-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 | com.algaworks.Messages
9 |
10 |
11 | pt_BR
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/tabview-responsivo/src/main/webapp/WEB-INF/templates/Layout.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | AlgaWorks
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
51 |
52 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/tabview-responsivo/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | primefaces.THEME
5 | bootstrap
6 |
7 |
8 | primefaces.FONT_AWESOME
9 | true
10 |
11 |
12 | javax.faces.PROJECT_STAGE
13 | Development
14 |
15 |
16 | javax.faces.FACELETS_REFRESH_PERIOD
17 | 0
18 |
19 |
20 | Faces Servlet
21 | javax.faces.webapp.FacesServlet
22 | 1
23 |
24 |
25 | Faces Servlet
26 | *.xhtml
27 |
28 |
29 | woff
30 | application/font-woff
31 |
32 |
33 | woff2
34 | application/font-woff2
35 |
36 |
--------------------------------------------------------------------------------
/tabview-responsivo/src/main/webapp/resources/algaworks/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/algaworks/workshop-primefaces-responsivo/9f46164e1039d4feec5dbfa83cee07e19689f878/tabview-responsivo/src/main/webapp/resources/algaworks/images/logo.png
--------------------------------------------------------------------------------
/tabview-responsivo/src/main/webapp/resources/algaworks/javascripts/app.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function() {
2 |
3 | $('.js-toggle').bind('click', function() {
4 | $('.js-sidebar').toggleClass('is-toggled');
5 | $('.js-content').toggleClass('is-toggled');
6 | });
7 |
8 | });
--------------------------------------------------------------------------------
/tabview-responsivo/src/main/webapp/resources/algaworks/styles/components.css:
--------------------------------------------------------------------------------
1 | /* TOGGLE */
2 | .aw-toggle {
3 | float: right;
4 | line-height: 50px;
5 | margin-right: 15px;
6 |
7 | color: #fff;
8 | }
9 |
10 | /* MENU */
11 | .aw-menu {
12 | font-size: 1.1em;
13 | }
14 |
15 | .aw-menu > ul {
16 | margin: 0;
17 | padding: 0;
18 | list-style: none;
19 | }
20 |
21 | .aw-menu > ul a {
22 | display: block;
23 | padding: 10px 15px;
24 |
25 | text-decoration: none;
26 | font-weight: 500;
27 | color: #373737;
28 | }
29 |
30 | .aw-menu > ul i {
31 | margin-right: 6px;
32 | }
33 |
34 | .aw-menu > ul a:hover, .aw-menu > ul a:focus {
35 | background-color: #dfdfdf;
36 | }
37 |
38 | .aw-menu > ul .is-selected {
39 | border-left: 3px solid #1e94d2;
40 | background-color: #f3f3f3;
41 | }
42 |
43 | .aw-menu > ul .is-selected a {
44 | margin-left: -3px;
45 | color: #1e94d2;
46 | }
47 |
48 | /* PAGE-TITLE */
49 | .aw-page-title {
50 | margin: 0;
51 | padding: 20px 0;
52 |
53 | font-size: 1.5em;
54 | color: #373737;
55 | }
56 |
57 |
58 |
--------------------------------------------------------------------------------
/tabview-responsivo/src/main/webapp/resources/algaworks/styles/custom.css:
--------------------------------------------------------------------------------
1 | /* BASE */
2 | body {
3 | margin: 0;
4 | font-size: 13px;
5 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
6 | }
7 |
8 | /* TABVIEW */
9 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected a {
10 | color: #555;
11 | }
12 |
13 | @media (max-width: 640px) {
14 | .ui-tabs.ui-tabs-top > .ui-tabs-nav li {
15 | width: 100%;
16 | }
17 | }
--------------------------------------------------------------------------------
/tabview-responsivo/src/main/webapp/resources/algaworks/styles/layout.css:
--------------------------------------------------------------------------------
1 | /* TOPBAR */
2 | .aw-topbar {
3 | position: fixed;
4 | top: 0;
5 | right: 0;
6 | left: 0;
7 | min-height: 50px;
8 | z-index: 9999;
9 |
10 | background-color: #1e94d2;
11 | }
12 |
13 | .aw-topbar > img {
14 | margin-top: 10px;
15 | margin-left: 5px;
16 | }
17 |
18 | /* SIDEBAR */
19 | .aw-sidebar {
20 | position: fixed;
21 | top: 50px;
22 | bottom: 0;
23 | left: 0;
24 | width: 210px;
25 | margin-left: -211px;
26 | z-index: 9998;
27 | transition: margin-left 0.5s;
28 | overflow-y: auto;
29 |
30 | background-color: #f6f6f6;
31 | border-right: 1px solid #eaeaea;
32 | }
33 |
34 | .aw-sidebar.is-toggled {
35 | margin-left: 0px;
36 | }
37 |
38 | @media (min-width: 960px) {
39 | .aw-sidebar {
40 | margin-left: 0px;
41 | }
42 |
43 | .aw-sidebar.is-toggled {
44 | margin-left: -211px;
45 | }
46 | }
47 |
48 | /* CONTENT */
49 | .aw-content {
50 | padding: 0 15px;
51 | margin-top: 50px;
52 | transition: margin-left 0.5s;
53 | }
54 |
55 | @media (min-width: 960px) {
56 | .aw-content {
57 | margin-left: 210px;
58 | }
59 |
60 | .aw-content.is-toggled {
61 | margin-left: 0;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------