Skip to content

Instantly share code, notes, and snippets.

View fwfurtado's full-sized avatar

Mimi fwfurtado

View GitHub Profile
@fwfurtado
fwfurtado / themes.java
Last active February 21, 2017 18:39
Temas PrimeFaces
temas = new TreeMap<>();
temas.put("Afterdark", "afterdark");
temas.put("Afternoon", "afternoon");
temas.put("Afterwork", "afterwork");
temas.put("Aristo", "aristo");
temas.put("Black-Tie", "black-tie");
temas.put("Blitzer", "blitzer");
temas.put("Bluesky", "bluesky");
temas.put("Bootstrap", "bootstrap");
temas.put("Casablanca", "casablanca");
@fwfurtado
fwfurtado / primefaces_locale_pt_br.js
Created June 22, 2016 20:55
Arquivo para Locale p:calendar
PrimeFaces.locales['pt'] = {
closeText: 'Fechar',
prevText: 'Anterior',
nextText: 'Próximo',
currentText: 'Hoje',
monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun', 'Jul','Ago','Set','Out','Nov','Dez'],
dayNames: ['Domingo','Segunda','Terça','Quarta','Quinta','Sexta','Sábado'],
dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
dayNamesMin: ['D','S','T','Q','Q','S','S'],
@fwfurtado
fwfurtado / datasource-mysql.xml
Last active October 3, 2016 07:27
[FJ-37] datasource-mysql.xml
<datasource jndi-name="java:jboss/datasources/casadocodigoDS" pool-name="casadocodigoDS">
<connection-url>jdbc:mysql://localhost:3306/casadocodigo</connection-url>
<driver>mysql</driver>
<security>
<user-name>root</user-name>
</security>
<pool>
<min-pool-size>10</min-pool-size>
<max-pool-size>20</max-pool-size>
</pool>
@fwfurtado
fwfurtado / driver-datasource.xml
Last active October 3, 2016 07:27
[FJ-37] driver-datasource.xml
<driver name="mysql" module="com.mysql">
<datasource-class>com.mysql.jdbc.Driver</datasource-class>
</driver>
@fwfurtado
fwfurtado / mysql-module.xml
Last active October 3, 2016 07:26
[FJ-37] mysql-module.xml
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.3" name="com.mysql">
<resources>
<resource-root path="mysql-connector-java-5.1.35.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
</dependencies>
</module>
@fwfurtado
fwfurtado / insert-authors.sql
Last active October 3, 2016 07:26
[FJ-37] insert-authors.sql
insert into Author(name) values('Alberto Souza');
insert into Author(name) values('Mauricio Aniche');
insert into Author(name) values('Adriano Almeida');
insert into Author(name) values('Paulo Silveira');
insert into Author(name) values('Sergio Lopes');
insert into Author(name) values('Guilherme Silveira');
@fwfurtado
fwfurtado / web.xml
Last active October 3, 2016 07:25
[FJ-37] web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
<display-name>casadocodigo</display-name>
<servlet>
@fwfurtado
fwfurtado / persistence.xml
Last active October 3, 2016 07:25
[FJ-37] persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.1"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="casadocodigo-dev" transaction-type="JTA">
<description>Dev persistence unit</description>
@fwfurtado
fwfurtado / checkout.xhtml
Last active October 3, 2016 07:25
[FJ-37] checkout.xhtml
<html xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns="http://www.w3.org/1999/xhtml"
xmlns:pt="http://xmlns.jcp.org/jsf/passthrough" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:jsf="http://xmlns.jcp.org/jsf"
xmlns:o="http://omnifaces.org/ui">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1" />
<link href="https://plus.googlecom/108540024862647200608"
rel="publisher" />
@fwfurtado
fwfurtado / carrinho.xhtml
Last active October 3, 2016 07:25
[FJ-37] carrinho.xhtml
<html xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns="http://www.w3.org/1999/xhtml"
xmlns:pt="http://xmlns.jcp.org/jsf/passthrough" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:jsf="http://xmlns.jcp.org/jsf"
xmlns:o="http://omnifaces.org/ui">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1" />
<link href="https://plus.googlecom/108540024862647200608"
rel="publisher" />