diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/build.xml b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/build.xml deleted file mode 100644 index 749e498d..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/build.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - Builds, tests, and runs the project AnaliseAcidentesTrabalho. - - - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/catalog.xml b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/catalog.xml deleted file mode 100644 index e69de29b..00000000 diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/jars/activation.jar b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/jars/activation.jar deleted file mode 100755 index 589b6749..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/jars/activation.jar and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/jars/mail.jar b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/jars/mail.jar deleted file mode 100755 index e6f70832..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/jars/mail.jar and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/jars/postgresql-8.0-315.jdbc3.jar b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/jars/postgresql-8.0-315.jdbc3.jar deleted file mode 100755 index 777b3040..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/jars/postgresql-8.0-315.jdbc3.jar and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/jars/postgresql-8.1-407.jdbc3.jar b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/jars/postgresql-8.1-407.jdbc3.jar deleted file mode 100755 index ddf17862..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/jars/postgresql-8.1-407.jdbc3.jar and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/jars/postgresql-8.2-506.jdbc4.jar b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/jars/postgresql-8.2-506.jdbc4.jar deleted file mode 100644 index 260a95eb..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/jars/postgresql-8.2-506.jdbc4.jar and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/nbproject/ant-deploy.xml b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/nbproject/ant-deploy.xml deleted file mode 100644 index bcfeee44..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/nbproject/ant-deploy.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/nbproject/build-impl.xml b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/nbproject/build-impl.xml deleted file mode 100644 index 30bc61b4..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/nbproject/build-impl.xml +++ /dev/null @@ -1,739 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set src.dir - Must set test.src.dir - Must set build.dir - Must set build.web.dir - Must set build.generated.dir - Must set dist.dir - Must set build.classes.dir - Must set dist.javadoc.dir - Must set build.test.classes.dir - Must set build.test.results.dir - Must set build.classes.excludes - Must set dist.war - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.jsp.includes - - - - - - - - - - - - - - - - - - - - Must select a file in the IDE or set jsp.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable. - - - Launching ${browse.url} - - - - - - Must select one file in the IDE or set run.class - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set debug.class - - - - - Must set fix.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - - - - Some tests failed; see details above. - - - - - - - - - Must select some files in the IDE or set test.includes - - - - Some tests failed; see details above. - - - - - Must select one file in the IDE or set test.class - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/nbproject/genfiles.properties b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/nbproject/genfiles.properties deleted file mode 100644 index dac81cc4..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/nbproject/genfiles.properties +++ /dev/null @@ -1,8 +0,0 @@ -build.xml.data.CRC32=2ba63215 -build.xml.script.CRC32=ab1471e9 -build.xml.stylesheet.CRC32=95be3570 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=2ba63215 -nbproject/build-impl.xml.script.CRC32=cae04df0 -nbproject/build-impl.xml.stylesheet.CRC32=ac43bae1 diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/nbproject/project.properties b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/nbproject/project.properties deleted file mode 100644 index 2ae3bd37..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/nbproject/project.properties +++ /dev/null @@ -1,88 +0,0 @@ -build.classes.dir=${build.web.dir}/WEB-INF/classes -build.classes.excludes=**/*.java,**/*.form -build.dir=build -build.ear.classes.dir=${build.ear.web.dir}/WEB-INF/classes -build.ear.web.dir=${build.dir}/web -build.generated.dir=${build.dir}/generated -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${build.dir}/test/results -build.web.dir=${build.dir}/web -build.web.excludes=${build.classes.excludes} -client.urlPart= -compile.jsps=false -conf.dir=${source.root}/conf -creator=3.0 -debug.classpath=${javac.classpath}:${build.classes.dir}:${build.ear.classes.dir} -debug.test.classpath=\ - ${run.test.classpath} -display.browser=true -dist.dir=dist -dist.ear.war=${dist.dir}/${war.ear.name} -dist.javadoc.dir=${dist.dir}/javadoc -dist.war=${dist.dir}/${war.name} -file.reference.activation.jar=jars/activation.jar -file.reference.itext-2.0.5.jar=../../../Download/iText205/itext-2.0.5.jar -file.reference.mail.jar=jars/mail.jar -file.reference.postgresql-8.2-506.jdbc4.jar=jars/postgresql-8.2-506.jdbc4.jar -j2ee.platform=1.4 -j2ee.server.type=Tomcat55 -jar.compress=false -javac.classpath=\ - ${libs.jsf-designtime.classpath}:\ - ${libs.jsfsupport-designtime.classpath}:\ - ${libs.webui-designtime.classpath}:\ - ${libs.jdbcsupport-designtime.classpath}:\ - ${libs.theme-default.classpath}:\ - ${libs.jstl11.classpath}:\ - ${file.reference.activation.jar}:\ - ${file.reference.mail.jar}:\ - ${file.reference.postgresql-8.2-506.jdbc4.jar}:\ - ${file.reference.itext-2.0.5.jar} -# Space-separated list of extra javac options -javac.compilerargs= -javac.debug=true -javac.deprecation=false -javac.source=1.4 -javac.target=1.4 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir}:\ - ${libs.junit.classpath} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding= -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.preview=true -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -jspcompilation.classpath=${jspc.classpath}:${javac.classpath} -lib.dir=${web.docbase.dir}/WEB-INF/lib -platform.active=default_platform -resource.dir=setup -run.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -# Space-separated list of JVM arguments used when running class with main method -# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value): -runmain.jvmargs= -source.root=src -src.dir=${source.root}/java -test.src.dir=test -war.content.additional=\ - ${libs.jsf-runtime.classpath}:\ - ${libs.jsfsupport-runtime.classpath}:\ - ${libs.webui-runtime.classpath}:\ - ${libs.jdbcsupport-runtime.classpath}:\ - ${libs.exceptionhandler-runtime.classpath}:\ - ${libs.theme-default.classpath}:\ - ${libs.jstl11.classpath} -war.ear.name=AnaliseAcidentesTrabalho.war -war.name=AnaliseAcidentesTrabalho.war -war.package=true -web.docbase.dir=web -webinf.dir=web/WEB-INF diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/nbproject/project.xml b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/nbproject/project.xml deleted file mode 100644 index 11fbc246..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/nbproject/project.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - org.netbeans.modules.web.project - - - - AnaliseAcidentesTrabalho - 1.6 - - - ${libs.jsf-designtime.classpath} - - - ${libs.jsfsupport-designtime.classpath} - - - ${libs.webui-designtime.classpath} - - - ${libs.jdbcsupport-designtime.classpath} - - - ${libs.theme-default.classpath} - - - ${libs.jstl11.classpath} - - - ${file.reference.activation.jar} - WEB-INF/lib - - - ${file.reference.mail.jar} - WEB-INF/lib - - - ${file.reference.postgresql-8.2-506.jdbc4.jar} - WEB-INF/lib - - - ${file.reference.itext-2.0.5.jar} - WEB-INF/lib - - - - - ${libs.jsf-runtime.classpath} - WEB-INF/lib - - - ${libs.jsfsupport-runtime.classpath} - WEB-INF/lib - - - ${libs.webui-runtime.classpath} - WEB-INF/lib - - - ${libs.jdbcsupport-runtime.classpath} - WEB-INF/lib - - - ${libs.exceptionhandler-runtime.classpath} - WEB-INF/lib - - - ${libs.theme-default.classpath} - WEB-INF/lib - - - ${libs.jstl11.classpath} - WEB-INF/lib - - - - - - - - - - - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/conf/MANIFEST.MF b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/conf/MANIFEST.MF deleted file mode 100644 index 59499bce..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/conf/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Acidentado.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Acidentado.java deleted file mode 100644 index f8d7fa1d..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Acidentado.java +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Acidentado.java - * - * Created on October 16, 2007, 2:36 PM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package analiseacidentestrabalho; - -/** - * - * @author lluis - */ -public class Acidentado { - private Integer id; - private String nome; - private java.sql.Date data_nascimento; - private String bilhete_identidade; - private String morada; - private String cod_postal; - private String localidade; - private String contacto_telefonico; - private java.sql.Date data_admissao; - private String funcao; - private String turno; - private Integer trabalhador_id; - private String numero_mecanografico; - /** Creates a new instance of Acidentado */ - public Acidentado() { - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public java.sql.Date getData_nascimento() { - return data_nascimento; - } - - public void setData_nascimento(java.sql.Date data_nascimento) { - this.data_nascimento = data_nascimento; - } - - public String getBilhete_identidade() { - return bilhete_identidade; - } - - public void setBilhete_identidade(String bilhete_identidade) { - this.bilhete_identidade = bilhete_identidade; - } - - public String getMorada() { - return morada; - } - - public void setMorada(String morada) { - this.morada = morada; - } - - public String getCod_postal() { - return cod_postal; - } - - public void setCod_postal(String cod_postal) { - this.cod_postal = cod_postal; - } - - public String getLocalidade() { - return localidade; - } - - public void setLocalidade(String localidade) { - this.localidade = localidade; - } - - public String getContacto_telefonico() { - return contacto_telefonico; - } - - public void setContacto_telefonico(String contacto_telefonico) { - this.contacto_telefonico = contacto_telefonico; - } - - public java.sql.Date getData_admissao() { - return data_admissao; - } - - public void setData_admissao(java.sql.Date data_admissao) { - this.data_admissao = data_admissao; - } - - public String getFuncao() { - return funcao; - } - - public void setFuncao(String funcao) { - this.funcao = funcao; - } - - public Integer getTrabalhador_id() { - return trabalhador_id; - } - - public void setTrabalhador_id(Integer trabalhador_id) { - this.trabalhador_id = trabalhador_id; - } - - public String getNome() { - return nome; - } - - public void setNome(String nome) { - this.nome = nome; - } - - public String getTurno() { - return turno; - } - - public void setTurno(String turno) { - this.turno = turno; - } - - public String getNumero_mecanografico() { - return numero_mecanografico; - } - - public void setNumero_mecanografico(String numero_mecanografico) { - this.numero_mecanografico = numero_mecanografico; - } - -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/AnaliseAcidente.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/AnaliseAcidente.java deleted file mode 100644 index 37fdc5bb..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/AnaliseAcidente.java +++ /dev/null @@ -1,842 +0,0 @@ -/* - * AnaliseAcidente.java - * - * Created on September 20, 2007, 1:34 PM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package analiseacidentestrabalho; - -import java.sql.Date; -import java.sql.Time; - -/** - * - * @author lluis - */ -public class AnaliseAcidente { - private Integer id; - private Integer nr; - private String analise_nr; - private Date data_acidente; - private Integer acidentado_id; - private String nome_acidentado; - private Integer empresa_id; - private Integer estabelecimento_id; - private Integer estado; - private Integer estado_assinatura; - private String fase; - - private String morada; - private String telefone; - private Integer horas_turno; - private String seccao; - private String local_trabalho; - private String tarefa; - private String substancias; - private String superior_hierarquico; - private String condicoes; - private String testemunhas; - private String causas; - private String descricao; - private String conclusoes; - private String accoes; - - private Time hora_acidente; - private String formacao_shst; - private String formacao_shst_nao_porque; - private String outros_acidentes_com_colaborador; - private Integer nr_acidentes_com_colaborador; - private Integer nr_relatorio_acidente_colaborador1; - private Integer nr_relatorio_acidente_colaborador2; - private Integer nr_relatorio_acidente_colaborador3; - private Integer nr_relatorio_acidente_colaborador4; - private String acidentes_outros_colaboradores; - private Integer nr_acidentes_outros_colaboradores; - private Integer nr_relatorio_acidente_outros_colaboradores1; - private Integer nr_relatorio_acidente_outros_colaboradores2; - private Integer nr_relatorio_acidente_outros_colaboradores3; - private Integer nr_relatorio_acidente_outros_colaboradores4; - - private String lesao_cabeca; - private String lesao_pescoco; - private String lesao_tronco; - private String lesao_membro_sup_dir; - private String lesao_membro_sup_esq; - private String lesao_membro_inf_dir; - private String lesao_membro_inf_esq; - private String especif1; - private String especif2; - private String especif3; - private String especif4; - private String tipo_lesao; - private String tipo_incapacidade; // 't' ou 'p' - private Integer coef_incapacidade; - private Date data_aval_incapacidade; - private Date data_rev_incapacidade; - private Date periodo_incapacidade_de; - private Date periodo_incapacidade_a; - private String img_flexao; - private String img_ext1; - private String img_ext2; - private String img_cab2; - private String img_cab3; - private String img_ma2; - private String img_ma3; - private String img_ma5; - private String img_ma6; - private String img_ma8; - private String img_ma10; - - private String img_rot1; - private String img_rot2; - private String img_cab1; - private String img_cab4; - private String img_ma1; - private String img_ma4; - private String img_ma7; - private String img_ma9; - - private Integer restricao_carga; - private String restricao_motricidade; - private String restricao_conducao; - private String restricao_vibracoes; - private String restricao_outras; - private String med_observ; - - private Integer medico_id; - private Integer tecnico_saude_id; - - private String ass_resp_seg; - private String ass_seg; - private String ass_hs; - private String ass_med; - private String ass_resp_rh; - - /** Creates a new instance of AnaliseAcidente */ - public AnaliseAcidente() { - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Date getData_acidente() { - return data_acidente; - } - - public void setData_acidente(Date data_acidente) { - this.data_acidente = data_acidente; - } - - public Integer getAcidentado_id() { - return acidentado_id; - } - - public void setAcidentado_id(Integer acidentado_id) { - this.acidentado_id = acidentado_id; - } - - public Integer getEstado() { - return estado; - } - - public void setEstado(Integer estado) { - this.estado = estado; - } - - public String getNome_acidentado() { - return nome_acidentado; - } - - public void setNome_acidentado(String nome_acidentado) { - this.nome_acidentado = nome_acidentado; - } - - public Integer getEstabelecimento_id() { - return estabelecimento_id; - } - - public void setEstabelecimento_id(Integer estabelecimento_id) { - this.estabelecimento_id = estabelecimento_id; - } - - public Integer getNr() { - return nr; - } - - public void setNr(Integer nr) { - this.nr = nr; - } - - public String getMorada() { - return morada; - } - - public void setMorada(String morada) { - this.morada = morada; - } - - public String getTelefone() { - return telefone; - } - - public void setTelefone(String telefone) { - this.telefone = telefone; - } - - public Integer getHoras_turno() { - return horas_turno; - } - - public void setHoras_turno(Integer horas_turno) { - this.horas_turno = horas_turno; - } - - public String getSeccao() { - return seccao; - } - - public void setSeccao(String seccao) { - this.seccao = seccao; - } - - public String getLocal_trabalho() { - return local_trabalho; - } - - public void setLocal_trabalho(String local_trabalho) { - this.local_trabalho = local_trabalho; - } - - public String getTarefa() { - return tarefa; - } - - public void setTarefa(String tarefa) { - this.tarefa = tarefa; - } - - public String getSubstancias() { - return substancias; - } - - public void setSubstancias(String substancias) { - this.substancias = substancias; - } - - public String getSuperior_hierarquico() { - return superior_hierarquico; - } - - public void setSuperior_hierarquico(String superior_hierarquico) { - this.superior_hierarquico = superior_hierarquico; - } - - public String getCondicoes() { - return condicoes; - } - - public void setCondicoes(String condicoes) { - this.condicoes = condicoes; - } - - public String getTestemunhas() { - return testemunhas; - } - - public void setTestemunhas(String testemunhas) { - this.testemunhas = testemunhas; - } - - public String getCausas() { - return causas; - } - - public void setCausas(String causas) { - this.causas = causas; - } - - public String getDescricao() { - return descricao; - } - - public void setDescricao(String descricao) { - this.descricao = descricao; - } - - public String getConclusoes() { - return conclusoes; - } - - public void setConclusoes(String conclusoes) { - this.conclusoes = conclusoes; - } - - public String getAccoes() { - return accoes; - } - - public void setAccoes(String accoes) { - this.accoes = accoes; - } - - public Time getHora_acidente() { - return hora_acidente; - } - - public void setHora_acidente(Time hora_acidente) { - this.hora_acidente = hora_acidente; - } - - public String getFormacao_shst() { - return formacao_shst; - } - - public void setFormacao_shst(String formacao_shst) { - this.formacao_shst = formacao_shst; - } - - public String getFormacao_shst_nao_porque() { - return formacao_shst_nao_porque; - } - - public void setFormacao_shst_nao_porque(String formacao_shst_nao_porque) { - this.formacao_shst_nao_porque = formacao_shst_nao_porque; - } - - public String getOutros_acidentes_com_colaborador() { - return outros_acidentes_com_colaborador; - } - - public void setOutros_acidentes_com_colaborador(String outros_acidentes_com_colaborador) { - this.outros_acidentes_com_colaborador = outros_acidentes_com_colaborador; - } - - public Integer getNr_acidentes_com_colaborador() { - return nr_acidentes_com_colaborador; - } - - public void setNr_acidentes_com_colaborador(Integer nr_acidentes_com_colaborador) { - this.nr_acidentes_com_colaborador = nr_acidentes_com_colaborador; - } - - public Integer getNr_relatorio_acidente_colaborador1() { - return nr_relatorio_acidente_colaborador1; - } - - public void setNr_relatorio_acidente_colaborador1(Integer nr_relatorio_acidente_colaborador1) { - this.nr_relatorio_acidente_colaborador1 = nr_relatorio_acidente_colaborador1; - } - - public Integer getNr_relatorio_acidente_colaborador2() { - return nr_relatorio_acidente_colaborador2; - } - - public void setNr_relatorio_acidente_colaborador2(Integer nr_relatorio_acidente_colaborador2) { - this.nr_relatorio_acidente_colaborador2 = nr_relatorio_acidente_colaborador2; - } - - public Integer getNr_relatorio_acidente_colaborador3() { - return nr_relatorio_acidente_colaborador3; - } - - public void setNr_relatorio_acidente_colaborador3(Integer nr_relatorio_acidente_colaborador3) { - this.nr_relatorio_acidente_colaborador3 = nr_relatorio_acidente_colaborador3; - } - - public Integer getNr_relatorio_acidente_colaborador4() { - return nr_relatorio_acidente_colaborador4; - } - - public void setNr_relatorio_acidente_colaborador4(Integer nr_relatorio_acidente_colaborador4) { - this.nr_relatorio_acidente_colaborador4 = nr_relatorio_acidente_colaborador4; - } - - public String getAcidentes_outros_colaboradores() { - return acidentes_outros_colaboradores; - } - - public void setAcidentes_outros_colaboradores(String acidentes_outros_colaboradores) { - this.acidentes_outros_colaboradores = acidentes_outros_colaboradores; - } - - public Integer getNr_acidentes_outros_colaboradores() { - return nr_acidentes_outros_colaboradores; - } - - public void setNr_acidentes_outros_colaboradores(Integer nr_acidentes_outros_colaboradores) { - this.nr_acidentes_outros_colaboradores = nr_acidentes_outros_colaboradores; - } - - public Integer getNr_relatorio_acidente_outros_colaboradores1() { - return nr_relatorio_acidente_outros_colaboradores1; - } - - public void setNr_relatorio_acidente_outros_colaboradores1(Integer nr_relatorio_acidente_outros_colaboradores1) { - this.nr_relatorio_acidente_outros_colaboradores1 = nr_relatorio_acidente_outros_colaboradores1; - } - - public Integer getNr_relatorio_acidente_outros_colaboradores2() { - return nr_relatorio_acidente_outros_colaboradores2; - } - - public void setNr_relatorio_acidente_outros_colaboradores2(Integer nr_relatorio_acidente_outros_colaboradores2) { - this.nr_relatorio_acidente_outros_colaboradores2 = nr_relatorio_acidente_outros_colaboradores2; - } - - public Integer getNr_relatorio_acidente_outros_colaboradores3() { - return nr_relatorio_acidente_outros_colaboradores3; - } - - public void setNr_relatorio_acidente_outros_colaboradores3(Integer nr_relatorio_acidente_outros_colaboradores3) { - this.nr_relatorio_acidente_outros_colaboradores3 = nr_relatorio_acidente_outros_colaboradores3; - } - - public Integer getNr_relatorio_acidente_outros_colaboradores4() { - return nr_relatorio_acidente_outros_colaboradores4; - } - - public void setNr_relatorio_acidente_outros_colaboradores4(Integer nr_relatorio_acidente_outros_colaboradores4) { - this.nr_relatorio_acidente_outros_colaboradores4 = nr_relatorio_acidente_outros_colaboradores4; - } - - public String getLesao_cabeca() { - return lesao_cabeca; - } - - public void setLesao_cabeca(String lesao_cabeca) { - this.lesao_cabeca = lesao_cabeca; - } - - public String getLesao_pescoco() { - return lesao_pescoco; - } - - public void setLesao_pescoco(String lesao_pescoco) { - this.lesao_pescoco = lesao_pescoco; - } - - public String getLesao_tronco() { - return lesao_tronco; - } - - public void setLesao_tronco(String lesao_tronco) { - this.lesao_tronco = lesao_tronco; - } - - public String getLesao_membro_sup_dir() { - return lesao_membro_sup_dir; - } - - public void setLesao_membro_sup_dir(String lesao_membro_sup_dir) { - this.lesao_membro_sup_dir = lesao_membro_sup_dir; - } - - public String getLesao_membro_sup_esq() { - return lesao_membro_sup_esq; - } - - public void setLesao_membro_sup_esq(String lesao_membro_sup_esq) { - this.lesao_membro_sup_esq = lesao_membro_sup_esq; - } - - public String getLesao_membro_inf_dir() { - return lesao_membro_inf_dir; - } - - public void setLesao_membro_inf_dir(String lesao_membro_inf_dir) { - this.lesao_membro_inf_dir = lesao_membro_inf_dir; - } - - public String getLesao_membro_inf_esq() { - return lesao_membro_inf_esq; - } - - public void setLesao_membro_inf_esq(String lesao_membro_inf_esq) { - this.lesao_membro_inf_esq = lesao_membro_inf_esq; - } - - public String getEspecif1() { - return especif1; - } - - public void setEspecif1(String especif1) { - this.especif1 = especif1; - } - - public String getEspecif2() { - return especif2; - } - - public void setEspecif2(String especif2) { - this.especif2 = especif2; - } - - public String getEspecif3() { - return especif3; - } - - public void setEspecif3(String especif3) { - this.especif3 = especif3; - } - - public String getEspecif4() { - return especif4; - } - - public void setEspecif4(String especif4) { - this.especif4 = especif4; - } - - public String getTipo_incapacidade() { - return tipo_incapacidade; - } - - public void setTipo_incapacidade(String tipo_incapacidade) { - this.tipo_incapacidade = tipo_incapacidade; - } - - public Integer getCoef_incapacidade() { - return coef_incapacidade; - } - - public void setCoef_incapacidade(Integer coef_incapacidade) { - this.coef_incapacidade = coef_incapacidade; - } - - public Date getData_aval_incapacidade() { - return data_aval_incapacidade; - } - - public void setData_aval_incapacidade(Date data_aval_incapacidade) { - this.data_aval_incapacidade = data_aval_incapacidade; - } - - public Date getData_rev_incapacidade() { - return data_rev_incapacidade; - } - - public void setData_rev_incapacidade(Date data_rev_incapacidade) { - this.data_rev_incapacidade = data_rev_incapacidade; - } - - public Date getPeriodo_incapacidade_de() { - return periodo_incapacidade_de; - } - - public void setPeriodo_incapacidade_de(Date periodo_incapacidade_de) { - this.periodo_incapacidade_de = periodo_incapacidade_de; - } - - public Date getPeriodo_incapacidade_a() { - return periodo_incapacidade_a; - } - - public void setPeriodo_incapacidade_a(Date periodo_incapacidade_a) { - this.periodo_incapacidade_a = periodo_incapacidade_a; - } - - public String getImg_flexao() { - return img_flexao; - } - - public void setImg_flexao(String img_flexao) { - this.img_flexao = img_flexao; - } - - public String getImg_ext1() { - return img_ext1; - } - - public void setImg_ext1(String img_ext1) { - this.img_ext1 = img_ext1; - } - - public String getImg_ext2() { - return img_ext2; - } - - public void setImg_ext2(String img_ext2) { - this.img_ext2 = img_ext2; - } - - public String getImg_cab2() { - return img_cab2; - } - - public void setImg_cab2(String img_cab2) { - this.img_cab2 = img_cab2; - } - - public String getImg_cab3() { - return img_cab3; - } - - public void setImg_cab3(String img_cab3) { - this.img_cab3 = img_cab3; - } - - public String getImg_ma2() { - return img_ma2; - } - - public void setImg_ma2(String img_ma2) { - this.img_ma2 = img_ma2; - } - - public String getImg_ma3() { - return img_ma3; - } - - public void setImg_ma3(String img_ma3) { - this.img_ma3 = img_ma3; - } - - public String getImg_ma5() { - return img_ma5; - } - - public void setImg_ma5(String img_ma5) { - this.img_ma5 = img_ma5; - } - - public String getImg_ma6() { - return img_ma6; - } - - public void setImg_ma6(String img_ma6) { - this.img_ma6 = img_ma6; - } - - public String getImg_ma8() { - return img_ma8; - } - - public void setImg_ma8(String img_ma8) { - this.img_ma8 = img_ma8; - } - - public String getImg_ma10() { - return img_ma10; - } - - public void setImg_ma10(String img_ma10) { - this.img_ma10 = img_ma10; - } - - public Integer getRestricao_carga() { - return restricao_carga; - } - - public void setRestricao_carga(Integer restricao_carga) { - this.restricao_carga = restricao_carga; - } - - public String getRestricao_motricidade() { - return restricao_motricidade; - } - - public void setRestricao_motricidade(String restricao_motricidade) { - this.restricao_motricidade = restricao_motricidade; - } - - public String getRestricao_conducao() { - return restricao_conducao; - } - - public void setRestricao_conducao(String restricao_conducao) { - this.restricao_conducao = restricao_conducao; - } - - public String getRestricao_vibracoes() { - return restricao_vibracoes; - } - - public void setRestricao_vibracoes(String restricao_vibracoes) { - this.restricao_vibracoes = restricao_vibracoes; - } - - public String getRestricao_outras() { - return restricao_outras; - } - - public void setRestricao_outras(String restricao_outras) { - this.restricao_outras = restricao_outras; - } - - public String getMed_observ() { - return med_observ; - } - - public void setMed_observ(String med_observ) { - this.med_observ = med_observ; - } - - public String getTipo_lesao() { - return tipo_lesao; - } - - public void setTipo_lesao(String tipo_lesao) { - this.tipo_lesao = tipo_lesao; - } - - public String getImg_rot1() { - return img_rot1; - } - - public void setImg_rot1(String img_rot1) { - this.img_rot1 = img_rot1; - } - - public String getImg_rot2() { - return img_rot2; - } - - public void setImg_rot2(String img_rot2) { - this.img_rot2 = img_rot2; - } - - public String getImg_cab1() { - return img_cab1; - } - - public void setImg_cab1(String img_cab1) { - this.img_cab1 = img_cab1; - } - - public String getImg_cab4() { - return img_cab4; - } - - public void setImg_cab4(String img_cab4) { - this.img_cab4 = img_cab4; - } - - public String getImg_ma1() { - return img_ma1; - } - - public void setImg_ma1(String img_ma1) { - this.img_ma1 = img_ma1; - } - - public String getImg_ma4() { - return img_ma4; - } - - public void setImg_ma4(String img_ma4) { - this.img_ma4 = img_ma4; - } - - public String getImg_ma7() { - return img_ma7; - } - - public void setImg_ma7(String img_ma7) { - this.img_ma7 = img_ma7; - } - - public String getImg_ma9() { - return img_ma9; - } - - public void setImg_ma9(String img_ma9) { - this.img_ma9 = img_ma9; - } - - public Integer getEmpresa_id() { - return empresa_id; - } - - public void setEmpresa_id(Integer empresa_id) { - this.empresa_id = empresa_id; - } - - public Integer getMedico_id() { - return medico_id; - } - - public void setMedico_id(Integer medico_id) { - this.medico_id = medico_id; - } - - public Integer getTecnico_saude_id() { - return tecnico_saude_id; - } - - public void setTecnico_saude_id(Integer tecnico_saude_id) { - this.tecnico_saude_id = tecnico_saude_id; - } - - public String getAnalise_nr() { - return analise_nr; - } - - public void setAnalise_nr(String analise_nr) { - this.analise_nr = analise_nr; - } - - public String getFase() { - return fase; - } - - public void setFase(String fase) { - this.fase = fase; - } - - public Integer getEstado_assinatura() { - return estado_assinatura; - } - - public void setEstado_assinatura(Integer estado_assinatura) { - this.estado_assinatura = estado_assinatura; - } - - public String getAss_resp_seg() { - return ass_resp_seg; - } - - public void setAss_resp_seg(String ass_resp_seg) { - this.ass_resp_seg = ass_resp_seg; - } - - public String getAss_seg() { - return ass_seg; - } - - public void setAss_seg(String ass_seg) { - this.ass_seg = ass_seg; - } - - public String getAss_hs() { - return ass_hs; - } - - public void setAss_hs(String ass_hs) { - this.ass_hs = ass_hs; - } - - public String getAss_med() { - return ass_med; - } - - public void setAss_med(String ass_med) { - this.ass_med = ass_med; - } - - public String getAss_resp_rh() { - return ass_resp_rh; - } - - public void setAss_resp_rh(String ass_resp_rh) { - this.ass_resp_rh = ass_resp_rh; - } - -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/AnaliseAcidenteTrabalho.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/AnaliseAcidenteTrabalho.java deleted file mode 100644 index c5b04ce6..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/AnaliseAcidenteTrabalho.java +++ /dev/null @@ -1,10864 +0,0 @@ -/* - * AnaliseAcidenteTrabalho.java - * - * Created on September 28, 2007, 3:56 PM - * Copyright lluis - */ -package analiseacidentestrabalho; - -import com.sun.data.provider.RowKey; -import com.sun.rave.web.ui.appbase.AbstractPageBean; -import com.sun.rave.web.ui.component.Body; -import com.sun.rave.web.ui.component.Button; -import com.sun.rave.web.ui.component.Checkbox; -import com.sun.rave.web.ui.component.DropDown; -import com.sun.rave.web.ui.component.Form; -import com.sun.rave.web.ui.component.Head; -import com.sun.rave.web.ui.component.HiddenField; -import com.sun.rave.web.ui.component.Html; -import com.sun.rave.web.ui.component.Hyperlink; -import com.sun.rave.web.ui.component.ImageComponent; -import com.sun.rave.web.ui.component.ImageHyperlink; -import com.sun.rave.web.ui.component.Link; -import com.sun.rave.web.ui.component.Page; -import com.sun.rave.web.ui.component.PanelGroup; -import com.sun.rave.web.ui.component.RadioButton; -import com.sun.rave.web.ui.component.StaticText; -import com.sun.rave.web.ui.component.Table; -import com.sun.rave.web.ui.component.TableColumn; -import com.sun.rave.web.ui.component.TableRowGroup; -import com.sun.rave.web.ui.component.TextArea; -import com.sun.rave.web.ui.component.TextField; -import com.sun.rave.web.ui.model.SingleSelectOptionsList; -import db.AnalisesDataProvider; -import db.TrabalhadoresListDataProvider; -import db.UtilizadoresDataProvider; -import java.io.File; -import java.sql.Time; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Date; -import java.util.ListIterator; -import java.util.Properties; -import javax.faces.FacesException; -import javax.faces.component.html.HtmlPanelGrid; -import javax.faces.el.MethodBinding; -import javax.faces.event.ValueChangeEvent; -import javax.mail.BodyPart; -import javax.mail.Message; -import javax.mail.Multipart; -import javax.mail.Session; -import javax.mail.Transport; -import javax.mail.internet.InternetAddress; -import javax.mail.internet.MimeBodyPart; -import javax.mail.internet.MimeMessage; -import javax.mail.internet.MimeMultipart; -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; -import pagestate.AnaliseAcidenteTrabalhoState; -import pdf.Pdf; -import utils.Utils; - -/** - *

Page bean that corresponds to a similarly named JSP page. This - * class contains component definitions (and initialization code) for - * all components that you have defined on this page, as well as - * lifecycle methods and event handlers where you may add behavior - * to respond to incoming events.

- */ -public class AnaliseAcidenteTrabalho extends AbstractPageBean { - // - private int __placeholder; - - /** - *

Automatically managed component initialization. WARNING: - * This method is automatically generated, so any user-specified code inserted - * here is subject to being replaced.

- */ - private void _init() throws Exception { - } - - private Page page1 = new Page(); - - public Page getPage1() { - return page1; - } - - public void setPage1(Page p) { - this.page1 = p; - } - - private Html html1 = new Html(); - - public Html getHtml1() { - return html1; - } - - public void setHtml1(Html h) { - this.html1 = h; - } - - private Head head1 = new Head(); - - public Head getHead1() { - return head1; - } - - public void setHead1(Head h) { - this.head1 = h; - } - - private Link link1 = new Link(); - - public Link getLink1() { - return link1; - } - - public void setLink1(Link l) { - this.link1 = l; - } - - private Body body1 = new Body(); - - public Body getBody1() { - return body1; - } - - public void setBody1(Body b) { - this.body1 = b; - } - - private Form form1 = new Form(); - - public Form getForm1() { - return form1; - } - - public void setForm1(Form f) { - this.form1 = f; - } - - private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridBase1() { - return gridBase1; - } - - public void setGridBase1(HtmlPanelGrid hpg) { - this.gridBase1 = hpg; - } - - private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridLayout1() { - return gridLayout1; - } - - public void setGridLayout1(HtmlPanelGrid hpg) { - this.gridLayout1 = hpg; - } - - private HtmlPanelGrid gridMsg = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridMsg() { - return gridMsg; - } - - public void setGridMsg(HtmlPanelGrid hpg) { - this.gridMsg = hpg; - } - - private StaticText txtMsg = new StaticText(); - - public StaticText getTxtMsg() { - return txtMsg; - } - - public void setTxtMsg(StaticText st) { - this.txtMsg = st; - } - - private HtmlPanelGrid gridCabecalho = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridCabecalho() { - return gridCabecalho; - } - - public void setGridCabecalho(HtmlPanelGrid hpg) { - this.gridCabecalho = hpg; - } - - private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel2() { - return gridPanel2; - } - - public void setGridPanel2(HtmlPanelGrid hpg) { - this.gridPanel2 = hpg; - } - - private StaticText lblEmpresa1 = new StaticText(); - - public StaticText getLblEmpresa1() { - return lblEmpresa1; - } - - public void setLblEmpresa1(StaticText st) { - this.lblEmpresa1 = st; - } - - private StaticText txtEmpresa = new StaticText(); - - public StaticText getTxtEmpresa() { - return txtEmpresa; - } - - public void setTxtEmpresa(StaticText st) { - this.txtEmpresa = st; - } - - private StaticText staticText4 = new StaticText(); - - public StaticText getStaticText4() { - return staticText4; - } - - public void setStaticText4(StaticText st) { - this.staticText4 = st; - } - - private StaticText txtEstabelecimento = new StaticText(); - - public StaticText getTxtEstabelecimento() { - return txtEstabelecimento; - } - - public void setTxtEstabelecimento(StaticText st) { - this.txtEstabelecimento = st; - } - - private StaticText txtTrabalhador = new StaticText(); - - public StaticText getTxtTrabalhador() { - return txtTrabalhador; - } - - public void setTxtTrabalhador(StaticText st) { - this.txtTrabalhador = st; - } - - private HtmlPanelGrid gridTrabalhadores = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridTrabalhadores() { - return gridTrabalhadores; - } - - public void setGridTrabalhadores(HtmlPanelGrid hpg) { - this.gridTrabalhadores = hpg; - } - - private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel3() { - return gridPanel3; - } - - public void setGridPanel3(HtmlPanelGrid hpg) { - this.gridPanel3 = hpg; - } - - private StaticText staticText5 = new StaticText(); - - public StaticText getStaticText5() { - return staticText5; - } - - public void setStaticText5(StaticText st) { - this.staticText5 = st; - } - - private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel4() { - return gridPanel4; - } - - public void setGridPanel4(HtmlPanelGrid hpg) { - this.gridPanel4 = hpg; - } - - private Table table1 = new Table(); - - public Table getTable1() { - return table1; - } - - public void setTable1(Table t) { - this.table1 = t; - } - - private TableRowGroup tableRowGroup1 = new TableRowGroup(); - - public TableRowGroup getTableRowGroup1() { - return tableRowGroup1; - } - - public void setTableRowGroup1(TableRowGroup trg) { - this.tableRowGroup1 = trg; - } - - private TableColumn tableColumn1 = new TableColumn(); - - public TableColumn getTableColumn1() { - return tableColumn1; - } - - public void setTableColumn1(TableColumn tc) { - this.tableColumn1 = tc; - } - - private Hyperlink lnkNome1 = new Hyperlink(); - - public Hyperlink getLnkNome1() { - return lnkNome1; - } - - public void setLnkNome1(Hyperlink h) { - this.lnkNome1 = h; - } - - private TableColumn tableColumn2 = new TableColumn(); - - public TableColumn getTableColumn2() { - return tableColumn2; - } - - public void setTableColumn2(TableColumn tc) { - this.tableColumn2 = tc; - } - - private Hyperlink lnkDataNascimento1 = new Hyperlink(); - - public Hyperlink getLnkDataNascimento1() { - return lnkDataNascimento1; - } - - public void setLnkDataNascimento1(Hyperlink h) { - this.lnkDataNascimento1 = h; - } - - private StaticText txtSearchMsg = new StaticText(); - - public StaticText getTxtSearchMsg() { - return txtSearchMsg; - } - - public void setTxtSearchMsg(StaticText st) { - this.txtSearchMsg = st; - } - - private HtmlPanelGrid gridSiprp = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridSiprp() { - return gridSiprp; - } - - public void setGridSiprp(HtmlPanelGrid hpg) { - this.gridSiprp = hpg; - } - - private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel5() { - return gridPanel5; - } - - public void setGridPanel5(HtmlPanelGrid hpg) { - this.gridPanel5 = hpg; - } - - private StaticText staticText6 = new StaticText(); - - public StaticText getStaticText6() { - return staticText6; - } - - public void setStaticText6(StaticText st) { - this.staticText6 = st; - } - - private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel6() { - return gridPanel6; - } - - public void setGridPanel6(HtmlPanelGrid hpg) { - this.gridPanel6 = hpg; - } - - private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel7() { - return gridPanel7; - } - - public void setGridPanel7(HtmlPanelGrid hpg) { - this.gridPanel7 = hpg; - } - - private StaticText staticText7 = new StaticText(); - - public StaticText getStaticText7() { - return staticText7; - } - - public void setStaticText7(StaticText st) { - this.staticText7 = st; - } - - private StaticText staticText8 = new StaticText(); - - public StaticText getStaticText8() { - return staticText8; - } - - public void setStaticText8(StaticText st) { - this.staticText8 = st; - } - - private StaticText staticText9 = new StaticText(); - - public StaticText getStaticText9() { - return staticText9; - } - - public void setStaticText9(StaticText st) { - this.staticText9 = st; - } - - private PanelGroup groupPanel3 = new PanelGroup(); - - public PanelGroup getGroupPanel3() { - return groupPanel3; - } - - public void setGroupPanel3(PanelGroup pg) { - this.groupPanel3 = pg; - } - - private DropDown drpTecnicos = new DropDown(); - - public DropDown getDrpTecnicos() { - return drpTecnicos; - } - - public void setDrpTecnicos(DropDown dd) { - this.drpTecnicos = dd; - } - - private StaticText staticText10 = new StaticText(); - - public StaticText getStaticText10() { - return staticText10; - } - - public void setStaticText10(StaticText st) { - this.staticText10 = st; - } - - private StaticText txtCap = new StaticText(); - - public StaticText getTxtCap() { - return txtCap; - } - - public void setTxtCap(StaticText st) { - this.txtCap = st; - } - - private StaticText staticText11 = new StaticText(); - - public StaticText getStaticText11() { - return staticText11; - } - - public void setStaticText11(StaticText st) { - this.staticText11 = st; - } - - private PanelGroup groupPanel4 = new PanelGroup(); - - public PanelGroup getGroupPanel4() { - return groupPanel4; - } - - public void setGroupPanel4(PanelGroup pg) { - this.groupPanel4 = pg; - } - - private DropDown drpMedicos = new DropDown(); - - public DropDown getDrpMedicos() { - return drpMedicos; - } - - public void setDrpMedicos(DropDown dd) { - this.drpMedicos = dd; - } - - private StaticText staticText12 = new StaticText(); - - public StaticText getStaticText12() { - return staticText12; - } - - public void setStaticText12(StaticText st) { - this.staticText12 = st; - } - - private StaticText txtCedula = new StaticText(); - - public StaticText getTxtCedula() { - return txtCedula; - } - - public void setTxtCedula(StaticText st) { - this.txtCedula = st; - } - - //
- private String IMAGE_URL = "/resources/images"; - - private final static int ESTADO_SEG = 1; - private final static int ESTADO_RH1 = 2; - private final static int ESTADO_HS = 3; - private final static int ESTADO_RH2 = 4; - private final static int ESTADO_MEDICO = 5; - private final static int ESTADO_ASSINATURAS = 6; - private final static int ESTADO_IMPRESSAO = 7; - private final static int ESTADO_FECHAR = 8; - private final static int ESTADO_CONCLUIDO = 9; - - - private final static int ESTADO_ASSINATURA_1 = 1; - private final static int ESTADO_ASSINATURA_2 = 2; - private final static int ESTADO_ASSINATURA_3 = 3; - - private final static int ESTADO_ASSINATURA_RESP_SEG = 1; - private final static int ESTADO_ASSINATURA_SEG = 2; - private final static int ESTADO_ASSINATURA_HS = 3; - private final static int ESTADO_ASSINATURA_MED = 4; - private final static int ESTADO_ASSINATURA_RH = 5; - private final static int ESTADO_ASSINATURA_RESP_RH = 6; - - private final static int IMAGE_WIDTH = 48; - private final static int IMAGE_HEIGHT = 48; - - private static final String PDFS_FOLDER_URL = "/resources/pdfs"; - - private Hyperlink lnkLblTrabalhador = new Hyperlink(); - - public Hyperlink getLnkLblTrabalhador() { - return lnkLblTrabalhador; - } - - public void setLnkLblTrabalhador(Hyperlink h) { - this.lnkLblTrabalhador = h; - } - - private HtmlPanelGrid gridAcidentado = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridAcidentado() { - return gridAcidentado; - } - - public void setGridAcidentado(HtmlPanelGrid hpg) { - this.gridAcidentado = hpg; - } - - private HtmlPanelGrid gridPanel23 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel23() { - return gridPanel23; - } - - public void setGridPanel23(HtmlPanelGrid hpg) { - this.gridPanel23 = hpg; - } - - private StaticText staticText29 = new StaticText(); - - public StaticText getStaticText29() { - return staticText29; - } - - public void setStaticText29(StaticText st) { - this.staticText29 = st; - } - - private HtmlPanelGrid gridPanel24 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel24() { - return gridPanel24; - } - - public void setGridPanel24(HtmlPanelGrid hpg) { - this.gridPanel24 = hpg; - } - - private HtmlPanelGrid gridPanel25 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel25() { - return gridPanel25; - } - - public void setGridPanel25(HtmlPanelGrid hpg) { - this.gridPanel25 = hpg; - } - - private StaticText staticText30 = new StaticText(); - - public StaticText getStaticText30() { - return staticText30; - } - - public void setStaticText30(StaticText st) { - this.staticText30 = st; - } - - private StaticText txtNomeAcidentado = new StaticText(); - - public StaticText getTxtNomeAcidentado() { - return txtNomeAcidentado; - } - - public void setTxtNomeAcidentado(StaticText st) { - this.txtNomeAcidentado = st; - } - - private StaticText staticText31 = new StaticText(); - - public StaticText getStaticText31() { - return staticText31; - } - - public void setStaticText31(StaticText st) { - this.staticText31 = st; - } - - private StaticText txtDataNascimento = new StaticText(); - - public StaticText getTxtDataNascimento() { - return txtDataNascimento; - } - - public void setTxtDataNascimento(StaticText st) { - this.txtDataNascimento = st; - } - - private StaticText staticText32 = new StaticText(); - - public StaticText getStaticText32() { - return staticText32; - } - - public void setStaticText32(StaticText st) { - this.staticText32 = st; - } - - private TextField txtBI = new TextField(); - - public TextField getTxtBI() { - return txtBI; - } - - public void setTxtBI(TextField tf) { - this.txtBI = tf; - } - - private StaticText staticText33 = new StaticText(); - - public StaticText getStaticText33() { - return staticText33; - } - - public void setStaticText33(StaticText st) { - this.staticText33 = st; - } - - private TextField txtMorada = new TextField(); - - public TextField getTxtMorada() { - return txtMorada; - } - - public void setTxtMorada(TextField tf) { - this.txtMorada = tf; - } - - private StaticText staticText34 = new StaticText(); - - public StaticText getStaticText34() { - return staticText34; - } - - public void setStaticText34(StaticText st) { - this.staticText34 = st; - } - - private PanelGroup groupPanel6 = new PanelGroup(); - - public PanelGroup getGroupPanel6() { - return groupPanel6; - } - - public void setGroupPanel6(PanelGroup pg) { - this.groupPanel6 = pg; - } - - private TextField txtCodPostal1 = new TextField(); - - public TextField getTxtCodPostal1() { - return txtCodPostal1; - } - - public void setTxtCodPostal1(TextField tf) { - this.txtCodPostal1 = tf; - } - - private StaticText staticText35 = new StaticText(); - - public StaticText getStaticText35() { - return staticText35; - } - - public void setStaticText35(StaticText st) { - this.staticText35 = st; - } - - private TextField txtCodPostal2 = new TextField(); - - public TextField getTxtCodPostal2() { - return txtCodPostal2; - } - - public void setTxtCodPostal2(TextField tf) { - this.txtCodPostal2 = tf; - } - - private StaticText staticText36 = new StaticText(); - - public StaticText getStaticText36() { - return staticText36; - } - - public void setStaticText36(StaticText st) { - this.staticText36 = st; - } - - private TextField txtLocalidade = new TextField(); - - public TextField getTxtLocalidade() { - return txtLocalidade; - } - - public void setTxtLocalidade(TextField tf) { - this.txtLocalidade = tf; - } - - private StaticText staticText37 = new StaticText(); - - public StaticText getStaticText37() { - return staticText37; - } - - public void setStaticText37(StaticText st) { - this.staticText37 = st; - } - - private TextField txtContactoTelefonico = new TextField(); - - public TextField getTxtContactoTelefonico() { - return txtContactoTelefonico; - } - - public void setTxtContactoTelefonico(TextField tf) { - this.txtContactoTelefonico = tf; - } - - private StaticText staticText38 = new StaticText(); - - public StaticText getStaticText38() { - return staticText38; - } - - public void setStaticText38(StaticText st) { - this.staticText38 = st; - } - - private StaticText stDataAdmissao = new StaticText(); - - public StaticText getStDataAdmissao() { - return stDataAdmissao; - } - - public void setStDataAdmissao(StaticText st) { - this.stDataAdmissao = st; - } - - private StaticText staticText39 = new StaticText(); - - public StaticText getStaticText39() { - return staticText39; - } - - public void setStaticText39(StaticText st) { - this.staticText39 = st; - } - - private StaticText stFuncao = new StaticText(); - - public StaticText getStFuncao() { - return stFuncao; - } - - public void setStFuncao(StaticText st) { - this.stFuncao = st; - } - - private StaticText staticText40 = new StaticText(); - - public StaticText getStaticText40() { - return staticText40; - } - - public void setStaticText40(StaticText st) { - this.staticText40 = st; - } - - private HtmlPanelGrid gridDadosAcidenteSeg = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridDadosAcidenteSeg() { - return gridDadosAcidenteSeg; - } - - public void setGridDadosAcidenteSeg(HtmlPanelGrid hpg) { - this.gridDadosAcidenteSeg = hpg; - } - - private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel8() { - return gridPanel8; - } - - public void setGridPanel8(HtmlPanelGrid hpg) { - this.gridPanel8 = hpg; - } - - private StaticText staticText13 = new StaticText(); - - public StaticText getStaticText13() { - return staticText13; - } - - public void setStaticText13(StaticText st) { - this.staticText13 = st; - } - - private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel9() { - return gridPanel9; - } - - public void setGridPanel9(HtmlPanelGrid hpg) { - this.gridPanel9 = hpg; - } - - private HtmlPanelGrid gridPanel10 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel10() { - return gridPanel10; - } - - public void setGridPanel10(HtmlPanelGrid hpg) { - this.gridPanel10 = hpg; - } - - private PanelGroup groupPanel8 = new PanelGroup(); - - public PanelGroup getGroupPanel8() { - return groupPanel8; - } - - public void setGroupPanel8(PanelGroup pg) { - this.groupPanel8 = pg; - } - - private StaticText staticText14 = new StaticText(); - - public StaticText getStaticText14() { - return staticText14; - } - - public void setStaticText14(StaticText st) { - this.staticText14 = st; - } - - private StaticText stDataAcidente = new StaticText(); - - public StaticText getStDataAcidente() { - return stDataAcidente; - } - - public void setStDataAcidente(StaticText st) { - this.stDataAcidente = st; - } - - private PanelGroup groupPanel9 = new PanelGroup(); - - public PanelGroup getGroupPanel9() { - return groupPanel9; - } - - public void setGroupPanel9(PanelGroup pg) { - this.groupPanel9 = pg; - } - - private StaticText staticText15 = new StaticText(); - - public StaticText getStaticText15() { - return staticText15; - } - - public void setStaticText15(StaticText st) { - this.staticText15 = st; - } - - private HtmlPanelGrid gridPanel11 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel11() { - return gridPanel11; - } - - public void setGridPanel11(HtmlPanelGrid hpg) { - this.gridPanel11 = hpg; - } - - private StaticText staticText16 = new StaticText(); - - public StaticText getStaticText16() { - return staticText16; - } - - public void setStaticText16(StaticText st) { - this.staticText16 = st; - } - - private TextField txtHorasTurno = new TextField(); - - public TextField getTxtHorasTurno() { - return txtHorasTurno; - } - - public void setTxtHorasTurno(TextField tf) { - this.txtHorasTurno = tf; - } - - private PanelGroup groupPanel10 = new PanelGroup(); - - public PanelGroup getGroupPanel10() { - return groupPanel10; - } - - public void setGroupPanel10(PanelGroup pg) { - this.groupPanel10 = pg; - } - - private StaticText staticText17 = new StaticText(); - - public StaticText getStaticText17() { - return staticText17; - } - - public void setStaticText17(StaticText st) { - this.staticText17 = st; - } - - private TextField txtSeccao = new TextField(); - - public TextField getTxtSeccao() { - return txtSeccao; - } - - public void setTxtSeccao(TextField tf) { - this.txtSeccao = tf; - } - - private PanelGroup groupPanel11 = new PanelGroup(); - - public PanelGroup getGroupPanel11() { - return groupPanel11; - } - - public void setGroupPanel11(PanelGroup pg) { - this.groupPanel11 = pg; - } - - private StaticText staticText18 = new StaticText(); - - public StaticText getStaticText18() { - return staticText18; - } - - public void setStaticText18(StaticText st) { - this.staticText18 = st; - } - - private TextField txtLocal = new TextField(); - - public TextField getTxtLocal() { - return txtLocal; - } - - public void setTxtLocal(TextField tf) { - this.txtLocal = tf; - } - - private HtmlPanelGrid gridPanel12 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel12() { - return gridPanel12; - } - - public void setGridPanel12(HtmlPanelGrid hpg) { - this.gridPanel12 = hpg; - } - - private StaticText staticText19 = new StaticText(); - - public StaticText getStaticText19() { - return staticText19; - } - - public void setStaticText19(StaticText st) { - this.staticText19 = st; - } - - private TextField txtTarefa = new TextField(); - - public TextField getTxtTarefa() { - return txtTarefa; - } - - public void setTxtTarefa(TextField tf) { - this.txtTarefa = tf; - } - - private HtmlPanelGrid gridPanel13 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel13() { - return gridPanel13; - } - - public void setGridPanel13(HtmlPanelGrid hpg) { - this.gridPanel13 = hpg; - } - - private StaticText staticText20 = new StaticText(); - - public StaticText getStaticText20() { - return staticText20; - } - - public void setStaticText20(StaticText st) { - this.staticText20 = st; - } - - private TextField txtSubstancias = new TextField(); - - public TextField getTxtSubstancias() { - return txtSubstancias; - } - - public void setTxtSubstancias(TextField tf) { - this.txtSubstancias = tf; - } - - private HtmlPanelGrid gridPanel14 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel14() { - return gridPanel14; - } - - public void setGridPanel14(HtmlPanelGrid hpg) { - this.gridPanel14 = hpg; - } - - private StaticText staticText21 = new StaticText(); - - public StaticText getStaticText21() { - return staticText21; - } - - public void setStaticText21(StaticText st) { - this.staticText21 = st; - } - - private TextField txtSuperior = new TextField(); - - public TextField getTxtSuperior() { - return txtSuperior; - } - - public void setTxtSuperior(TextField tf) { - this.txtSuperior = tf; - } - - private HtmlPanelGrid gridPanel15 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel15() { - return gridPanel15; - } - - public void setGridPanel15(HtmlPanelGrid hpg) { - this.gridPanel15 = hpg; - } - - private StaticText staticText22 = new StaticText(); - - public StaticText getStaticText22() { - return staticText22; - } - - public void setStaticText22(StaticText st) { - this.staticText22 = st; - } - - private TextField txtCondicoes = new TextField(); - - public TextField getTxtCondicoes() { - return txtCondicoes; - } - - public void setTxtCondicoes(TextField tf) { - this.txtCondicoes = tf; - } - - private HtmlPanelGrid gridPanel16 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel16() { - return gridPanel16; - } - - public void setGridPanel16(HtmlPanelGrid hpg) { - this.gridPanel16 = hpg; - } - - private StaticText staticText23 = new StaticText(); - - public StaticText getStaticText23() { - return staticText23; - } - - public void setStaticText23(StaticText st) { - this.staticText23 = st; - } - - private TextField txtTestemunhas = new TextField(); - - public TextField getTxtTestemunhas() { - return txtTestemunhas; - } - - public void setTxtTestemunhas(TextField tf) { - this.txtTestemunhas = tf; - } - - private HtmlPanelGrid gridPanel17 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel17() { - return gridPanel17; - } - - public void setGridPanel17(HtmlPanelGrid hpg) { - this.gridPanel17 = hpg; - } - - private StaticText staticText24 = new StaticText(); - - public StaticText getStaticText24() { - return staticText24; - } - - public void setStaticText24(StaticText st) { - this.staticText24 = st; - } - - private TextField txtCausas = new TextField(); - - public TextField getTxtCausas() { - return txtCausas; - } - - public void setTxtCausas(TextField tf) { - this.txtCausas = tf; - } - - private HtmlPanelGrid gridPanel18 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel18() { - return gridPanel18; - } - - public void setGridPanel18(HtmlPanelGrid hpg) { - this.gridPanel18 = hpg; - } - - private StaticText staticText25 = new StaticText(); - - public StaticText getStaticText25() { - return staticText25; - } - - public void setStaticText25(StaticText st) { - this.staticText25 = st; - } - - private TextField txtDescricao = new TextField(); - - public TextField getTxtDescricao() { - return txtDescricao; - } - - public void setTxtDescricao(TextField tf) { - this.txtDescricao = tf; - } - - private HtmlPanelGrid gridPanel19 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel19() { - return gridPanel19; - } - - public void setGridPanel19(HtmlPanelGrid hpg) { - this.gridPanel19 = hpg; - } - - private HtmlPanelGrid gridPanel20 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel20() { - return gridPanel20; - } - - public void setGridPanel20(HtmlPanelGrid hpg) { - this.gridPanel20 = hpg; - } - - private StaticText staticText26 = new StaticText(); - - public StaticText getStaticText26() { - return staticText26; - } - - public void setStaticText26(StaticText st) { - this.staticText26 = st; - } - - private Button butImagem = new Button(); - - public Button getButImagem() { - return butImagem; - } - - public void setButImagem(Button b) { - this.butImagem = b; - } - - private HtmlPanelGrid gridImages = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridImages() { - return gridImages; - } - - public void setGridImages(HtmlPanelGrid hpg) { - this.gridImages = hpg; - } - - private HtmlPanelGrid gridPanel21 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel21() { - return gridPanel21; - } - - public void setGridPanel21(HtmlPanelGrid hpg) { - this.gridPanel21 = hpg; - } - - private StaticText staticText27 = new StaticText(); - - public StaticText getStaticText27() { - return staticText27; - } - - public void setStaticText27(StaticText st) { - this.staticText27 = st; - } - - private TextArea txtConclusoes = new TextArea(); - - public TextArea getTxtConclusoes() { - return txtConclusoes; - } - - public void setTxtConclusoes(TextArea ta) { - this.txtConclusoes = ta; - } - - private HtmlPanelGrid gridPanel26 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel26() { - return gridPanel26; - } - - public void setGridPanel26(HtmlPanelGrid hpg) { - this.gridPanel26 = hpg; - } - - private StaticText staticText28 = new StaticText(); - - public StaticText getStaticText28() { - return staticText28; - } - - public void setStaticText28(StaticText st) { - this.staticText28 = st; - } - - private TextArea txtAccoes = new TextArea(); - - public TextArea getTxtAccoes() { - return txtAccoes; - } - - public void setTxtAccoes(TextArea ta) { - this.txtAccoes = ta; - } - - private HtmlPanelGrid gridDadosAcidenteRh = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridDadosAcidenteRh() { - return gridDadosAcidenteRh; - } - - public void setGridDadosAcidenteRh(HtmlPanelGrid hpg) { - this.gridDadosAcidenteRh = hpg; - } - - private HtmlPanelGrid gridPanel27 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel27() { - return gridPanel27; - } - - public void setGridPanel27(HtmlPanelGrid hpg) { - this.gridPanel27 = hpg; - } - - private StaticText staticText46 = new StaticText(); - - public StaticText getStaticText46() { - return staticText46; - } - - public void setStaticText46(StaticText st) { - this.staticText46 = st; - } - - private HtmlPanelGrid gridPanel28 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel28() { - return gridPanel28; - } - - public void setGridPanel28(HtmlPanelGrid hpg) { - this.gridPanel28 = hpg; - } - - private HtmlPanelGrid gridPanel29 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel29() { - return gridPanel29; - } - - public void setGridPanel29(HtmlPanelGrid hpg) { - this.gridPanel29 = hpg; - } - - private StaticText staticText47 = new StaticText(); - - public StaticText getStaticText47() { - return staticText47; - } - - public void setStaticText47(StaticText st) { - this.staticText47 = st; - } - - private HtmlPanelGrid gridPanel30 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel30() { - return gridPanel30; - } - - public void setGridPanel30(HtmlPanelGrid hpg) { - this.gridPanel30 = hpg; - } - - private StaticText staticText48 = new StaticText(); - - public StaticText getStaticText48() { - return staticText48; - } - - public void setStaticText48(StaticText st) { - this.staticText48 = st; - } - - private HtmlPanelGrid gridPanel31 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel31() { - return gridPanel31; - } - - public void setGridPanel31(HtmlPanelGrid hpg) { - this.gridPanel31 = hpg; - } - - private RadioButton rbFormacaoSHSTY = new RadioButton(); - - public RadioButton getRbFormacaoSHSTY() { - return rbFormacaoSHSTY; - } - - public void setRbFormacaoSHSTY(RadioButton rb) { - this.rbFormacaoSHSTY = rb; - } - - private StaticText staticText49 = new StaticText(); - - public StaticText getStaticText49() { - return staticText49; - } - - public void setStaticText49(StaticText st) { - this.staticText49 = st; - } - - private HtmlPanelGrid gridPanel32 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel32() { - return gridPanel32; - } - - public void setGridPanel32(HtmlPanelGrid hpg) { - this.gridPanel32 = hpg; - } - - private StaticText staticText50 = new StaticText(); - - public StaticText getStaticText50() { - return staticText50; - } - - public void setStaticText50(StaticText st) { - this.staticText50 = st; - } - - private HtmlPanelGrid gridPanel33 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel33() { - return gridPanel33; - } - - public void setGridPanel33(HtmlPanelGrid hpg) { - this.gridPanel33 = hpg; - } - - private RadioButton rbFormacaoSHSTN = new RadioButton(); - - public RadioButton getRbFormacaoSHSTN() { - return rbFormacaoSHSTN; - } - - public void setRbFormacaoSHSTN(RadioButton rb) { - this.rbFormacaoSHSTN = rb; - } - - private StaticText stFormacaoDummy = new StaticText(); - - public StaticText getStFormacaoDummy() { - return stFormacaoDummy; - } - - public void setStFormacaoDummy(StaticText st) { - this.stFormacaoDummy = st; - } - - private PanelGroup groupPanel12 = new PanelGroup(); - - public PanelGroup getGroupPanel12() { - return groupPanel12; - } - - public void setGroupPanel12(PanelGroup pg) { - this.groupPanel12 = pg; - } - - private StaticText staticText52 = new StaticText(); - - public StaticText getStaticText52() { - return staticText52; - } - - public void setStaticText52(StaticText st) { - this.staticText52 = st; - } - - private TextField txtFormacaoSHSTNWhy = new TextField(); - - public TextField getTxtFormacaoSHSTNWhy() { - return txtFormacaoSHSTNWhy; - } - - public void setTxtFormacaoSHSTNWhy(TextField tf) { - this.txtFormacaoSHSTNWhy = tf; - } - - private HtmlPanelGrid gridPanel34 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel34() { - return gridPanel34; - } - - public void setGridPanel34(HtmlPanelGrid hpg) { - this.gridPanel34 = hpg; - } - - private StaticText staticText53 = new StaticText(); - - public StaticText getStaticText53() { - return staticText53; - } - - public void setStaticText53(StaticText st) { - this.staticText53 = st; - } - - private HtmlPanelGrid gridPanel35 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel35() { - return gridPanel35; - } - - public void setGridPanel35(HtmlPanelGrid hpg) { - this.gridPanel35 = hpg; - } - - private StaticText staticText54 = new StaticText(); - - public StaticText getStaticText54() { - return staticText54; - } - - public void setStaticText54(StaticText st) { - this.staticText54 = st; - } - - private HtmlPanelGrid gridPanel36 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel36() { - return gridPanel36; - } - - public void setGridPanel36(HtmlPanelGrid hpg) { - this.gridPanel36 = hpg; - } - - private RadioButton rbAcidentesColaboradorY = new RadioButton(); - - public RadioButton getRbAcidentesColaboradorY() { - return rbAcidentesColaboradorY; - } - - public void setRbAcidentesColaboradorY(RadioButton rb) { - this.rbAcidentesColaboradorY = rb; - } - - private StaticText staticText55 = new StaticText(); - - public StaticText getStaticText55() { - return staticText55; - } - - public void setStaticText55(StaticText st) { - this.staticText55 = st; - } - - private PanelGroup groupPanel13 = new PanelGroup(); - - public PanelGroup getGroupPanel13() { - return groupPanel13; - } - - public void setGroupPanel13(PanelGroup pg) { - this.groupPanel13 = pg; - } - - private StaticText staticText56 = new StaticText(); - - public StaticText getStaticText56() { - return staticText56; - } - - public void setStaticText56(StaticText st) { - this.staticText56 = st; - } - - private TextField txtNrAcidentesColaborador = new TextField(); - - public TextField getTxtNrAcidentesColaborador() { - return txtNrAcidentesColaborador; - } - - public void setTxtNrAcidentesColaborador(TextField tf) { - this.txtNrAcidentesColaborador = tf; - } - - private HtmlPanelGrid gridPanel37 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel37() { - return gridPanel37; - } - - public void setGridPanel37(HtmlPanelGrid hpg) { - this.gridPanel37 = hpg; - } - - private StaticText staticText57 = new StaticText(); - - public StaticText getStaticText57() { - return staticText57; - } - - public void setStaticText57(StaticText st) { - this.staticText57 = st; - } - - private TextField txtNrRelatorioAcidentesColaborador1 = new TextField(); - - public TextField getTxtNrRelatorioAcidentesColaborador1() { - return txtNrRelatorioAcidentesColaborador1; - } - - public void setTxtNrRelatorioAcidentesColaborador1(TextField tf) { - this.txtNrRelatorioAcidentesColaborador1 = tf; - } - - private TextField txtNrRelatorioAcidentesColaborador2 = new TextField(); - - public TextField getTxtNrRelatorioAcidentesColaborador2() { - return txtNrRelatorioAcidentesColaborador2; - } - - public void setTxtNrRelatorioAcidentesColaborador2(TextField tf) { - this.txtNrRelatorioAcidentesColaborador2 = tf; - } - - private TextField txtNrRelatorioAcidentesColaborador3 = new TextField(); - - public TextField getTxtNrRelatorioAcidentesColaborador3() { - return txtNrRelatorioAcidentesColaborador3; - } - - public void setTxtNrRelatorioAcidentesColaborador3(TextField tf) { - this.txtNrRelatorioAcidentesColaborador3 = tf; - } - - private TextField txtNrRelatorioAcidentesColaborador4 = new TextField(); - - public TextField getTxtNrRelatorioAcidentesColaborador4() { - return txtNrRelatorioAcidentesColaborador4; - } - - public void setTxtNrRelatorioAcidentesColaborador4(TextField tf) { - this.txtNrRelatorioAcidentesColaborador4 = tf; - } - - private HtmlPanelGrid gridPanel38 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel38() { - return gridPanel38; - } - - public void setGridPanel38(HtmlPanelGrid hpg) { - this.gridPanel38 = hpg; - } - - private StaticText staticText58 = new StaticText(); - - public StaticText getStaticText58() { - return staticText58; - } - - public void setStaticText58(StaticText st) { - this.staticText58 = st; - } - - private HtmlPanelGrid gridPanel39 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel39() { - return gridPanel39; - } - - public void setGridPanel39(HtmlPanelGrid hpg) { - this.gridPanel39 = hpg; - } - - private RadioButton rbAcidentesColaboradorN = new RadioButton(); - - public RadioButton getRbAcidentesColaboradorN() { - return rbAcidentesColaboradorN; - } - - public void setRbAcidentesColaboradorN(RadioButton rb) { - this.rbAcidentesColaboradorN = rb; - } - - private StaticText staticText59 = new StaticText(); - - public StaticText getStaticText59() { - return staticText59; - } - - public void setStaticText59(StaticText st) { - this.staticText59 = st; - } - - private HtmlPanelGrid gridPanel40 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel40() { - return gridPanel40; - } - - public void setGridPanel40(HtmlPanelGrid hpg) { - this.gridPanel40 = hpg; - } - - private StaticText staticText60 = new StaticText(); - - public StaticText getStaticText60() { - return staticText60; - } - - public void setStaticText60(StaticText st) { - this.staticText60 = st; - } - - private HtmlPanelGrid gridPanel41 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel41() { - return gridPanel41; - } - - public void setGridPanel41(HtmlPanelGrid hpg) { - this.gridPanel41 = hpg; - } - - private StaticText staticText61 = new StaticText(); - - public StaticText getStaticText61() { - return staticText61; - } - - public void setStaticText61(StaticText st) { - this.staticText61 = st; - } - - private HtmlPanelGrid gridPanel42 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel42() { - return gridPanel42; - } - - public void setGridPanel42(HtmlPanelGrid hpg) { - this.gridPanel42 = hpg; - } - - private RadioButton rbAcidentesColaboradoresY = new RadioButton(); - - public RadioButton getRbAcidentesColaboradoresY() { - return rbAcidentesColaboradoresY; - } - - public void setRbAcidentesColaboradoresY(RadioButton rb) { - this.rbAcidentesColaboradoresY = rb; - } - - private StaticText staticText62 = new StaticText(); - - public StaticText getStaticText62() { - return staticText62; - } - - public void setStaticText62(StaticText st) { - this.staticText62 = st; - } - - private PanelGroup groupPanel14 = new PanelGroup(); - - public PanelGroup getGroupPanel14() { - return groupPanel14; - } - - public void setGroupPanel14(PanelGroup pg) { - this.groupPanel14 = pg; - } - - private StaticText staticText63 = new StaticText(); - - public StaticText getStaticText63() { - return staticText63; - } - - public void setStaticText63(StaticText st) { - this.staticText63 = st; - } - - private TextField txtNrAcidentesColaboradores = new TextField(); - - public TextField getTxtNrAcidentesColaboradores() { - return txtNrAcidentesColaboradores; - } - - public void setTxtNrAcidentesColaboradores(TextField tf) { - this.txtNrAcidentesColaboradores = tf; - } - - private HtmlPanelGrid gridPanel43 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel43() { - return gridPanel43; - } - - public void setGridPanel43(HtmlPanelGrid hpg) { - this.gridPanel43 = hpg; - } - - private StaticText staticText64 = new StaticText(); - - public StaticText getStaticText64() { - return staticText64; - } - - public void setStaticText64(StaticText st) { - this.staticText64 = st; - } - - private TextField txtNrRelatorioAcidentesColaboradores1 = new TextField(); - - public TextField getTxtNrRelatorioAcidentesColaboradores1() { - return txtNrRelatorioAcidentesColaboradores1; - } - - public void setTxtNrRelatorioAcidentesColaboradores1(TextField tf) { - this.txtNrRelatorioAcidentesColaboradores1 = tf; - } - - private TextField txtNrRelatorioAcidentesColaboradores2 = new TextField(); - - public TextField getTxtNrRelatorioAcidentesColaboradores2() { - return txtNrRelatorioAcidentesColaboradores2; - } - - public void setTxtNrRelatorioAcidentesColaboradores2(TextField tf) { - this.txtNrRelatorioAcidentesColaboradores2 = tf; - } - - private TextField txtNrRelatorioAcidentesColaboradores3 = new TextField(); - - public TextField getTxtNrRelatorioAcidentesColaboradores3() { - return txtNrRelatorioAcidentesColaboradores3; - } - - public void setTxtNrRelatorioAcidentesColaboradores3(TextField tf) { - this.txtNrRelatorioAcidentesColaboradores3 = tf; - } - - private TextField txtNrRelatorioAcidentesColaboradores4 = new TextField(); - - public TextField getTxtNrRelatorioAcidentesColaboradores4() { - return txtNrRelatorioAcidentesColaboradores4; - } - - public void setTxtNrRelatorioAcidentesColaboradores4(TextField tf) { - this.txtNrRelatorioAcidentesColaboradores4 = tf; - } - - private HtmlPanelGrid gridPanel44 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel44() { - return gridPanel44; - } - - public void setGridPanel44(HtmlPanelGrid hpg) { - this.gridPanel44 = hpg; - } - - private StaticText staticText65 = new StaticText(); - - public StaticText getStaticText65() { - return staticText65; - } - - public void setStaticText65(StaticText st) { - this.staticText65 = st; - } - - private HtmlPanelGrid gridPanel45 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel45() { - return gridPanel45; - } - - public void setGridPanel45(HtmlPanelGrid hpg) { - this.gridPanel45 = hpg; - } - - private RadioButton rbAcidentesColaboradoresN = new RadioButton(); - - public RadioButton getRbAcidentesColaboradoresN() { - return rbAcidentesColaboradoresN; - } - - public void setRbAcidentesColaboradoresN(RadioButton rb) { - this.rbAcidentesColaboradoresN = rb; - } - - private StaticText staticText66 = new StaticText(); - - public StaticText getStaticText66() { - return staticText66; - } - - public void setStaticText66(StaticText st) { - this.staticText66 = st; - } - - private HtmlPanelGrid gridRecomendacoesHS = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridRecomendacoesHS() { - return gridRecomendacoesHS; - } - - public void setGridRecomendacoesHS(HtmlPanelGrid hpg) { - this.gridRecomendacoesHS = hpg; - } - - private HtmlPanelGrid gridPanel46 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel46() { - return gridPanel46; - } - - public void setGridPanel46(HtmlPanelGrid hpg) { - this.gridPanel46 = hpg; - } - - private StaticText staticText67 = new StaticText(); - - public StaticText getStaticText67() { - return staticText67; - } - - public void setStaticText67(StaticText st) { - this.staticText67 = st; - } - - private HtmlPanelGrid gridRecomendacoes = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridRecomendacoes() { - return gridRecomendacoes; - } - - public void setGridRecomendacoes(HtmlPanelGrid hpg) { - this.gridRecomendacoes = hpg; - } - - private HtmlPanelGrid gridPanel48 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel48() { - return gridPanel48; - } - - public void setGridPanel48(HtmlPanelGrid hpg) { - this.gridPanel48 = hpg; - } - - private StaticText stNrRecomendacao1 = new StaticText(); - - public StaticText getStNrRecomendacao1() { - return stNrRecomendacao1; - } - - public void setStNrRecomendacao1(StaticText st) { - this.stNrRecomendacao1 = st; - } - - private ImageHyperlink lnkMoreRec1 = new ImageHyperlink(); - - public ImageHyperlink getLnkMoreRec1() { - return lnkMoreRec1; - } - - public void setLnkMoreRec1(ImageHyperlink ih) { - this.lnkMoreRec1 = ih; - } - - private HtmlPanelGrid gridSiprpView = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridSiprpView() { - return gridSiprpView; - } - - public void setGridSiprpView(HtmlPanelGrid hpg) { - this.gridSiprpView = hpg; - } - - private HtmlPanelGrid gridPanel49 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel49() { - return gridPanel49; - } - - public void setGridPanel49(HtmlPanelGrid hpg) { - this.gridPanel49 = hpg; - } - - private StaticText staticText69 = new StaticText(); - - public StaticText getStaticText69() { - return staticText69; - } - - public void setStaticText69(StaticText st) { - this.staticText69 = st; - } - - private HtmlPanelGrid gridPanel50 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel50() { - return gridPanel50; - } - - public void setGridPanel50(HtmlPanelGrid hpg) { - this.gridPanel50 = hpg; - } - - private HtmlPanelGrid gridPanel51 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel51() { - return gridPanel51; - } - - public void setGridPanel51(HtmlPanelGrid hpg) { - this.gridPanel51 = hpg; - } - - private StaticText staticText70 = new StaticText(); - - public StaticText getStaticText70() { - return staticText70; - } - - public void setStaticText70(StaticText st) { - this.staticText70 = st; - } - - private StaticText staticText71 = new StaticText(); - - public StaticText getStaticText71() { - return staticText71; - } - - public void setStaticText71(StaticText st) { - this.staticText71 = st; - } - - private StaticText staticText72 = new StaticText(); - - public StaticText getStaticText72() { - return staticText72; - } - - public void setStaticText72(StaticText st) { - this.staticText72 = st; - } - - private PanelGroup groupPanel15 = new PanelGroup(); - - public PanelGroup getGroupPanel15() { - return groupPanel15; - } - - public void setGroupPanel15(PanelGroup pg) { - this.groupPanel15 = pg; - } - - private StaticText stTecnicoNome = new StaticText(); - - public StaticText getStTecnicoNome() { - return stTecnicoNome; - } - - public void setStTecnicoNome(StaticText st) { - this.stTecnicoNome = st; - } - - private StaticText staticText74 = new StaticText(); - - public StaticText getStaticText74() { - return staticText74; - } - - public void setStaticText74(StaticText st) { - this.staticText74 = st; - } - - private StaticText txtCap1 = new StaticText(); - - public StaticText getTxtCap1() { - return txtCap1; - } - - public void setTxtCap1(StaticText st) { - this.txtCap1 = st; - } - - private StaticText staticText75 = new StaticText(); - - public StaticText getStaticText75() { - return staticText75; - } - - public void setStaticText75(StaticText st) { - this.staticText75 = st; - } - - private PanelGroup groupPanel16 = new PanelGroup(); - - public PanelGroup getGroupPanel16() { - return groupPanel16; - } - - public void setGroupPanel16(PanelGroup pg) { - this.groupPanel16 = pg; - } - - private StaticText stMedicoNome = new StaticText(); - - public StaticText getStMedicoNome() { - return stMedicoNome; - } - - public void setStMedicoNome(StaticText st) { - this.stMedicoNome = st; - } - - private StaticText staticText77 = new StaticText(); - - public StaticText getStaticText77() { - return staticText77; - } - - public void setStaticText77(StaticText st) { - this.staticText77 = st; - } - - private StaticText txtCedula1 = new StaticText(); - - public StaticText getTxtCedula1() { - return txtCedula1; - } - - public void setTxtCedula1(StaticText st) { - this.txtCedula1 = st; - } - - private HtmlPanelGrid gridAcidentadoView = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridAcidentadoView() { - return gridAcidentadoView; - } - - public void setGridAcidentadoView(HtmlPanelGrid hpg) { - this.gridAcidentadoView = hpg; - } - - private HtmlPanelGrid gridPanel52 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel52() { - return gridPanel52; - } - - public void setGridPanel52(HtmlPanelGrid hpg) { - this.gridPanel52 = hpg; - } - - private StaticText staticText78 = new StaticText(); - - public StaticText getStaticText78() { - return staticText78; - } - - public void setStaticText78(StaticText st) { - this.staticText78 = st; - } - - private HtmlPanelGrid gridPanel53 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel53() { - return gridPanel53; - } - - public void setGridPanel53(HtmlPanelGrid hpg) { - this.gridPanel53 = hpg; - } - - private HtmlPanelGrid gridPanel54 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel54() { - return gridPanel54; - } - - public void setGridPanel54(HtmlPanelGrid hpg) { - this.gridPanel54 = hpg; - } - - private StaticText staticText79 = new StaticText(); - - public StaticText getStaticText79() { - return staticText79; - } - - public void setStaticText79(StaticText st) { - this.staticText79 = st; - } - - private StaticText stNomeAcidentado = new StaticText(); - - public StaticText getStNomeAcidentado() { - return stNomeAcidentado; - } - - public void setStNomeAcidentado(StaticText st) { - this.stNomeAcidentado = st; - } - - private StaticText staticText80 = new StaticText(); - - public StaticText getStaticText80() { - return staticText80; - } - - public void setStaticText80(StaticText st) { - this.staticText80 = st; - } - - private StaticText stDataNascimento = new StaticText(); - - public StaticText getStDataNascimento() { - return stDataNascimento; - } - - public void setStDataNascimento(StaticText st) { - this.stDataNascimento = st; - } - - private StaticText staticText81 = new StaticText(); - - public StaticText getStaticText81() { - return staticText81; - } - - public void setStaticText81(StaticText st) { - this.staticText81 = st; - } - - private StaticText stBI = new StaticText(); - - public StaticText getStBI() { - return stBI; - } - - public void setStBI(StaticText st) { - this.stBI = st; - } - - private StaticText staticText82 = new StaticText(); - - public StaticText getStaticText82() { - return staticText82; - } - - public void setStaticText82(StaticText st) { - this.staticText82 = st; - } - - private StaticText stMorada = new StaticText(); - - public StaticText getStMorada() { - return stMorada; - } - - public void setStMorada(StaticText st) { - this.stMorada = st; - } - - private StaticText staticText83 = new StaticText(); - - public StaticText getStaticText83() { - return staticText83; - } - - public void setStaticText83(StaticText st) { - this.staticText83 = st; - } - - private StaticText stCodPostal = new StaticText(); - - public StaticText getStCodPostal() { - return stCodPostal; - } - - public void setStCodPostal(StaticText st) { - this.stCodPostal = st; - } - - private StaticText staticText84 = new StaticText(); - - public StaticText getStaticText84() { - return staticText84; - } - - public void setStaticText84(StaticText st) { - this.staticText84 = st; - } - - private StaticText stContactoTelefonico = new StaticText(); - - public StaticText getStContactoTelefonico() { - return stContactoTelefonico; - } - - public void setStContactoTelefonico(StaticText st) { - this.stContactoTelefonico = st; - } - - private StaticText staticText85 = new StaticText(); - - public StaticText getStaticText85() { - return staticText85; - } - - public void setStaticText85(StaticText st) { - this.staticText85 = st; - } - - private StaticText stDataAdmissao1 = new StaticText(); - - public StaticText getStDataAdmissao1() { - return stDataAdmissao1; - } - - public void setStDataAdmissao1(StaticText st) { - this.stDataAdmissao1 = st; - } - - private StaticText staticText86 = new StaticText(); - - public StaticText getStaticText86() { - return staticText86; - } - - public void setStaticText86(StaticText st) { - this.staticText86 = st; - } - - private StaticText stFuncao1 = new StaticText(); - - public StaticText getStFuncao1() { - return stFuncao1; - } - - public void setStFuncao1(StaticText st) { - this.stFuncao1 = st; - } - - private StaticText staticText87 = new StaticText(); - - public StaticText getStaticText87() { - return staticText87; - } - - public void setStaticText87(StaticText st) { - this.staticText87 = st; - } - - private StaticText stTurno = new StaticText(); - - public StaticText getStTurno() { - return stTurno; - } - - public void setStTurno(StaticText st) { - this.stTurno = st; - } - - private HtmlPanelGrid gridDadosAcidenteRhView = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridDadosAcidenteRhView() { - return gridDadosAcidenteRhView; - } - - public void setGridDadosAcidenteRhView(HtmlPanelGrid hpg) { - this.gridDadosAcidenteRhView = hpg; - } - - private HtmlPanelGrid gridPanel55 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel55() { - return gridPanel55; - } - - public void setGridPanel55(HtmlPanelGrid hpg) { - this.gridPanel55 = hpg; - } - - private StaticText staticText88 = new StaticText(); - - public StaticText getStaticText88() { - return staticText88; - } - - public void setStaticText88(StaticText st) { - this.staticText88 = st; - } - - private HtmlPanelGrid gridPanel56 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel56() { - return gridPanel56; - } - - public void setGridPanel56(HtmlPanelGrid hpg) { - this.gridPanel56 = hpg; - } - - private HtmlPanelGrid gridSHST = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridSHST() { - return gridSHST; - } - - public void setGridSHST(HtmlPanelGrid hpg) { - this.gridSHST = hpg; - } - - private HtmlPanelGrid gridColaborador = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridColaborador() { - return gridColaborador; - } - - public void setGridColaborador(HtmlPanelGrid hpg) { - this.gridColaborador = hpg; - } - - private HtmlPanelGrid gridColaboradores = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridColaboradores() { - return gridColaboradores; - } - - public void setGridColaboradores(HtmlPanelGrid hpg) { - this.gridColaboradores = hpg; - } - - private DropDown drpHours = new DropDown(); - - public DropDown getDrpHours() { - return drpHours; - } - - public void setDrpHours(DropDown dd) { - this.drpHours = dd; - } - - private SingleSelectOptionsList drpHoursDefaultOptions = new SingleSelectOptionsList(); - - public SingleSelectOptionsList getDrpHoursDefaultOptions() { - return drpHoursDefaultOptions; - } - - public void setDrpHoursDefaultOptions(SingleSelectOptionsList ssol) { - this.drpHoursDefaultOptions = ssol; - } - - private StaticText staticText92 = new StaticText(); - - public StaticText getStaticText92() { - return staticText92; - } - - public void setStaticText92(StaticText st) { - this.staticText92 = st; - } - - private DropDown drpMinutes = new DropDown(); - - public DropDown getDrpMinutes() { - return drpMinutes; - } - - public void setDrpMinutes(DropDown dd) { - this.drpMinutes = dd; - } - - private SingleSelectOptionsList drpMinutesDefaultOptions = new SingleSelectOptionsList(); - - public SingleSelectOptionsList getDrpMinutesDefaultOptions() { - return drpMinutesDefaultOptions; - } - - public void setDrpMinutesDefaultOptions(SingleSelectOptionsList ssol) { - this.drpMinutesDefaultOptions = ssol; - } - - private TextArea txtRecomendacao1 = new TextArea(); - - public TextArea getTxtRecomendacao1() { - return txtRecomendacao1; - } - - public void setTxtRecomendacao1(TextArea ta) { - this.txtRecomendacao1 = ta; - } - - private HtmlPanelGrid gridRecomendacoesViewHS = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridRecomendacoesViewHS() { - return gridRecomendacoesViewHS; - } - - public void setGridRecomendacoesViewHS(HtmlPanelGrid hpg) { - this.gridRecomendacoesViewHS = hpg; - } - - private HtmlPanelGrid gridPanel47 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel47() { - return gridPanel47; - } - - public void setGridPanel47(HtmlPanelGrid hpg) { - this.gridPanel47 = hpg; - } - - private StaticText staticText51 = new StaticText(); - - public StaticText getStaticText51() { - return staticText51; - } - - public void setStaticText51(StaticText st) { - this.staticText51 = st; - } - - private HtmlPanelGrid gridRecomendacoesView = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridRecomendacoesView() { - return gridRecomendacoesView; - } - - public void setGridRecomendacoesView(HtmlPanelGrid hpg) { - this.gridRecomendacoesView = hpg; - } - - private HtmlPanelGrid gridMedidasRH = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridMedidasRH() { - return gridMedidasRH; - } - - public void setGridMedidasRH(HtmlPanelGrid hpg) { - this.gridMedidasRH = hpg; - } - - private HtmlPanelGrid gridPanel57 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel57() { - return gridPanel57; - } - - public void setGridPanel57(HtmlPanelGrid hpg) { - this.gridPanel57 = hpg; - } - - private StaticText staticText68 = new StaticText(); - - public StaticText getStaticText68() { - return staticText68; - } - - public void setStaticText68(StaticText st) { - this.staticText68 = st; - } - - private HtmlPanelGrid gridMedidas = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridMedidas() { - return gridMedidas; - } - - public void setGridMedidas(HtmlPanelGrid hpg) { - this.gridMedidas = hpg; - } - - private HtmlPanelGrid gridPanel58 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel58() { - return gridPanel58; - } - - public void setGridPanel58(HtmlPanelGrid hpg) { - this.gridPanel58 = hpg; - } - - private StaticText stNrMedida1 = new StaticText(); - - public StaticText getStNrMedida1() { - return stNrMedida1; - } - - public void setStNrMedida1(StaticText st) { - this.stNrMedida1 = st; - } - - private TextArea txtMedida1 = new TextArea(); - - public TextArea getTxtMedida1() { - return txtMedida1; - } - - public void setTxtMedida1(TextArea ta) { - this.txtMedida1 = ta; - } - - private ImageHyperlink lnkMoreMed1 = new ImageHyperlink(); - - public ImageHyperlink getLnkMoreMed1() { - return lnkMoreMed1; - } - - public void setLnkMoreMed1(ImageHyperlink ih) { - this.lnkMoreMed1 = ih; - } - - private HtmlPanelGrid gridMedidasViewRH = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridMedidasViewRH() { - return gridMedidasViewRH; - } - - public void setGridMedidasViewRH(HtmlPanelGrid hpg) { - this.gridMedidasViewRH = hpg; - } - - private HtmlPanelGrid gridPanel59 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel59() { - return gridPanel59; - } - - public void setGridPanel59(HtmlPanelGrid hpg) { - this.gridPanel59 = hpg; - } - - private StaticText staticText89 = new StaticText(); - - public StaticText getStaticText89() { - return staticText89; - } - - public void setStaticText89(StaticText st) { - this.staticText89 = st; - } - - private HtmlPanelGrid gridMedidasView = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridMedidasView() { - return gridMedidasView; - } - - public void setGridMedidasView(HtmlPanelGrid hpg) { - this.gridMedidasView = hpg; - } - - private HtmlPanelGrid gridMedico = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridMedico() { - return gridMedico; - } - - public void setGridMedico(HtmlPanelGrid hpg) { - this.gridMedico = hpg; - } - - private HtmlPanelGrid gridPanel60 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel60() { - return gridPanel60; - } - - public void setGridPanel60(HtmlPanelGrid hpg) { - this.gridPanel60 = hpg; - } - - private StaticText staticText90 = new StaticText(); - - public StaticText getStaticText90() { - return staticText90; - } - - public void setStaticText90(StaticText st) { - this.staticText90 = st; - } - - private HtmlPanelGrid gridLesao1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridLesao1() { - return gridLesao1; - } - - public void setGridLesao1(HtmlPanelGrid hpg) { - this.gridLesao1 = hpg; - } - - private StaticText staticText91 = new StaticText(); - - public StaticText getStaticText91() { - return staticText91; - } - - public void setStaticText91(StaticText st) { - this.staticText91 = st; - } - - private HtmlPanelGrid gridPanel61 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel61() { - return gridPanel61; - } - - public void setGridPanel61(HtmlPanelGrid hpg) { - this.gridPanel61 = hpg; - } - - private PanelGroup groupPanel17 = new PanelGroup(); - - public PanelGroup getGroupPanel17() { - return groupPanel17; - } - - public void setGroupPanel17(PanelGroup pg) { - this.groupPanel17 = pg; - } - - private Checkbox chkCabeca = new Checkbox(); - - public Checkbox getChkCabeca() { - return chkCabeca; - } - - public void setChkCabeca(Checkbox c) { - this.chkCabeca = c; - } - - private StaticText staticText93 = new StaticText(); - - public StaticText getStaticText93() { - return staticText93; - } - - public void setStaticText93(StaticText st) { - this.staticText93 = st; - } - - private PanelGroup groupPanel18 = new PanelGroup(); - - public PanelGroup getGroupPanel18() { - return groupPanel18; - } - - public void setGroupPanel18(PanelGroup pg) { - this.groupPanel18 = pg; - } - - private Checkbox chkMembroSupDir = new Checkbox(); - - public Checkbox getChkMembroSupDir() { - return chkMembroSupDir; - } - - public void setChkMembroSupDir(Checkbox c) { - this.chkMembroSupDir = c; - } - - private StaticText staticText94 = new StaticText(); - - public StaticText getStaticText94() { - return staticText94; - } - - public void setStaticText94(StaticText st) { - this.staticText94 = st; - } - - private HtmlPanelGrid gridPanel62 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel62() { - return gridPanel62; - } - - public void setGridPanel62(HtmlPanelGrid hpg) { - this.gridPanel62 = hpg; - } - - private StaticText lblEspecif1 = new StaticText(); - - public StaticText getLblEspecif1() { - return lblEspecif1; - } - - public void setLblEspecif1(StaticText st) { - this.lblEspecif1 = st; - } - - private TextField txtEspecif1 = new TextField(); - - public TextField getTxtEspecif1() { - return txtEspecif1; - } - - public void setTxtEspecif1(TextField tf) { - this.txtEspecif1 = tf; - } - - private PanelGroup groupPanel19 = new PanelGroup(); - - public PanelGroup getGroupPanel19() { - return groupPanel19; - } - - public void setGroupPanel19(PanelGroup pg) { - this.groupPanel19 = pg; - } - - private Checkbox chkPescoco = new Checkbox(); - - public Checkbox getChkPescoco() { - return chkPescoco; - } - - public void setChkPescoco(Checkbox c) { - this.chkPescoco = c; - } - - private StaticText staticText96 = new StaticText(); - - public StaticText getStaticText96() { - return staticText96; - } - - public void setStaticText96(StaticText st) { - this.staticText96 = st; - } - - private PanelGroup groupPanel20 = new PanelGroup(); - - public PanelGroup getGroupPanel20() { - return groupPanel20; - } - - public void setGroupPanel20(PanelGroup pg) { - this.groupPanel20 = pg; - } - - private Checkbox chkMembroSupEsq = new Checkbox(); - - public Checkbox getChkMembroSupEsq() { - return chkMembroSupEsq; - } - - public void setChkMembroSupEsq(Checkbox c) { - this.chkMembroSupEsq = c; - } - - private StaticText staticText97 = new StaticText(); - - public StaticText getStaticText97() { - return staticText97; - } - - public void setStaticText97(StaticText st) { - this.staticText97 = st; - } - - private HtmlPanelGrid gridPanel63 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel63() { - return gridPanel63; - } - - public void setGridPanel63(HtmlPanelGrid hpg) { - this.gridPanel63 = hpg; - } - - private StaticText lblEspecif2 = new StaticText(); - - public StaticText getLblEspecif2() { - return lblEspecif2; - } - - public void setLblEspecif2(StaticText st) { - this.lblEspecif2 = st; - } - - private TextField txtEspecif2 = new TextField(); - - public TextField getTxtEspecif2() { - return txtEspecif2; - } - - public void setTxtEspecif2(TextField tf) { - this.txtEspecif2 = tf; - } - - private PanelGroup groupPanel21 = new PanelGroup(); - - public PanelGroup getGroupPanel21() { - return groupPanel21; - } - - public void setGroupPanel21(PanelGroup pg) { - this.groupPanel21 = pg; - } - - private Checkbox chkTronco = new Checkbox(); - - public Checkbox getChkTronco() { - return chkTronco; - } - - public void setChkTronco(Checkbox c) { - this.chkTronco = c; - } - - private StaticText staticText99 = new StaticText(); - - public StaticText getStaticText99() { - return staticText99; - } - - public void setStaticText99(StaticText st) { - this.staticText99 = st; - } - - private PanelGroup groupPanel22 = new PanelGroup(); - - public PanelGroup getGroupPanel22() { - return groupPanel22; - } - - public void setGroupPanel22(PanelGroup pg) { - this.groupPanel22 = pg; - } - - private Checkbox chkMembroInfDir = new Checkbox(); - - public Checkbox getChkMembroInfDir() { - return chkMembroInfDir; - } - - public void setChkMembroInfDir(Checkbox c) { - this.chkMembroInfDir = c; - } - - private StaticText staticText100 = new StaticText(); - - public StaticText getStaticText100() { - return staticText100; - } - - public void setStaticText100(StaticText st) { - this.staticText100 = st; - } - - private HtmlPanelGrid gridPanel64 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel64() { - return gridPanel64; - } - - public void setGridPanel64(HtmlPanelGrid hpg) { - this.gridPanel64 = hpg; - } - - private StaticText lblEspecif3 = new StaticText(); - - public StaticText getLblEspecif3() { - return lblEspecif3; - } - - public void setLblEspecif3(StaticText st) { - this.lblEspecif3 = st; - } - - private TextField txtEspecif3 = new TextField(); - - public TextField getTxtEspecif3() { - return txtEspecif3; - } - - public void setTxtEspecif3(TextField tf) { - this.txtEspecif3 = tf; - } - - private StaticText staticText102 = new StaticText(); - - public StaticText getStaticText102() { - return staticText102; - } - - public void setStaticText102(StaticText st) { - this.staticText102 = st; - } - - private PanelGroup groupPanel23 = new PanelGroup(); - - public PanelGroup getGroupPanel23() { - return groupPanel23; - } - - public void setGroupPanel23(PanelGroup pg) { - this.groupPanel23 = pg; - } - - private Checkbox chkMembroInfEsq = new Checkbox(); - - public Checkbox getChkMembroInfEsq() { - return chkMembroInfEsq; - } - - public void setChkMembroInfEsq(Checkbox c) { - this.chkMembroInfEsq = c; - } - - private StaticText staticText103 = new StaticText(); - - public StaticText getStaticText103() { - return staticText103; - } - - public void setStaticText103(StaticText st) { - this.staticText103 = st; - } - - private HtmlPanelGrid gridPanel65 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel65() { - return gridPanel65; - } - - public void setGridPanel65(HtmlPanelGrid hpg) { - this.gridPanel65 = hpg; - } - - private StaticText lblEspecif4 = new StaticText(); - - public StaticText getLblEspecif4() { - return lblEspecif4; - } - - public void setLblEspecif4(StaticText st) { - this.lblEspecif4 = st; - } - - private TextField txtEspecif4 = new TextField(); - - public TextField getTxtEspecif4() { - return txtEspecif4; - } - - public void setTxtEspecif4(TextField tf) { - this.txtEspecif4 = tf; - } - - private HtmlPanelGrid gridPanel66 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel66() { - return gridPanel66; - } - - public void setGridPanel66(HtmlPanelGrid hpg) { - this.gridPanel66 = hpg; - } - - private StaticText staticText105 = new StaticText(); - - public StaticText getStaticText105() { - return staticText105; - } - - public void setStaticText105(StaticText st) { - this.staticText105 = st; - } - - private TextField txtTipoLesao = new TextField(); - - public TextField getTxtTipoLesao() { - return txtTipoLesao; - } - - public void setTxtTipoLesao(TextField tf) { - this.txtTipoLesao = tf; - } - - private HtmlPanelGrid gridPanel67 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel67() { - return gridPanel67; - } - - public void setGridPanel67(HtmlPanelGrid hpg) { - this.gridPanel67 = hpg; - } - - private StaticText staticText106 = new StaticText(); - - public StaticText getStaticText106() { - return staticText106; - } - - public void setStaticText106(StaticText st) { - this.staticText106 = st; - } - - private HtmlPanelGrid gridIncapacidade1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridIncapacidade1() { - return gridIncapacidade1; - } - - public void setGridIncapacidade1(HtmlPanelGrid hpg) { - this.gridIncapacidade1 = hpg; - } - - private HtmlPanelGrid gridPanel68 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel68() { - return gridPanel68; - } - - public void setGridPanel68(HtmlPanelGrid hpg) { - this.gridPanel68 = hpg; - } - - private PanelGroup groupPanel24 = new PanelGroup(); - - public PanelGroup getGroupPanel24() { - return groupPanel24; - } - - public void setGroupPanel24(PanelGroup pg) { - this.groupPanel24 = pg; - } - - private StaticText staticText107 = new StaticText(); - - public StaticText getStaticText107() { - return staticText107; - } - - public void setStaticText107(StaticText st) { - this.staticText107 = st; - } - - private RadioButton rbIncapacidadeNone = new RadioButton(); - - public RadioButton getRbIncapacidadeNone() { - return rbIncapacidadeNone; - } - - public void setRbIncapacidadeNone(RadioButton rb) { - this.rbIncapacidadeNone = rb; - } - - private StaticText staticText108 = new StaticText(); - - public StaticText getStaticText108() { - return staticText108; - } - - public void setStaticText108(StaticText st) { - this.staticText108 = st; - } - - private RadioButton rbIncapacidadeTemp = new RadioButton(); - - public RadioButton getRbIncapacidadeTemp() { - return rbIncapacidadeTemp; - } - - public void setRbIncapacidadeTemp(RadioButton rb) { - this.rbIncapacidadeTemp = rb; - } - - private StaticText staticText109 = new StaticText(); - - public StaticText getStaticText109() { - return staticText109; - } - - public void setStaticText109(StaticText st) { - this.staticText109 = st; - } - - private PanelGroup groupPanel25 = new PanelGroup(); - - public PanelGroup getGroupPanel25() { - return groupPanel25; - } - - public void setGroupPanel25(PanelGroup pg) { - this.groupPanel25 = pg; - } - - private StaticText staticText110 = new StaticText(); - - public StaticText getStaticText110() { - return staticText110; - } - - public void setStaticText110(StaticText st) { - this.staticText110 = st; - } - - private TextField txtCoefIncapacidade = new TextField(); - - public TextField getTxtCoefIncapacidade() { - return txtCoefIncapacidade; - } - - public void setTxtCoefIncapacidade(TextField tf) { - this.txtCoefIncapacidade = tf; - } - - private StaticText staticText111 = new StaticText(); - - public StaticText getStaticText111() { - return staticText111; - } - - public void setStaticText111(StaticText st) { - this.staticText111 = st; - } - - private HtmlPanelGrid gridPanel69 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel69() { - return gridPanel69; - } - - public void setGridPanel69(HtmlPanelGrid hpg) { - this.gridPanel69 = hpg; - } - - private StaticText staticText112 = new StaticText(); - - public StaticText getStaticText112() { - return staticText112; - } - - public void setStaticText112(StaticText st) { - this.staticText112 = st; - } - - private com.sun.rave.web.ui.component.Calendar calAvaliacaoIncap = new com.sun.rave.web.ui.component.Calendar(); - - public com.sun.rave.web.ui.component.Calendar getCalAvaliacaoIncap() { - return calAvaliacaoIncap; - } - - public void setCalAvaliacaoIncap(com.sun.rave.web.ui.component.Calendar c) { - this.calAvaliacaoIncap = c; - } - - private StaticText staticText113 = new StaticText(); - - public StaticText getStaticText113() { - return staticText113; - } - - public void setStaticText113(StaticText st) { - this.staticText113 = st; - } - - private com.sun.rave.web.ui.component.Calendar calRevisaoIncap = new com.sun.rave.web.ui.component.Calendar(); - - public com.sun.rave.web.ui.component.Calendar getCalRevisaoIncap() { - return calRevisaoIncap; - } - - public void setCalRevisaoIncap(com.sun.rave.web.ui.component.Calendar c) { - this.calRevisaoIncap = c; - } - - private HtmlPanelGrid gridPanel70 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel70() { - return gridPanel70; - } - - public void setGridPanel70(HtmlPanelGrid hpg) { - this.gridPanel70 = hpg; - } - - private StaticText staticText114 = new StaticText(); - - public StaticText getStaticText114() { - return staticText114; - } - - public void setStaticText114(StaticText st) { - this.staticText114 = st; - } - - private com.sun.rave.web.ui.component.Calendar calPeridoIncapDe = new com.sun.rave.web.ui.component.Calendar(); - - public com.sun.rave.web.ui.component.Calendar getCalPeridoIncapDe() { - return calPeridoIncapDe; - } - - public void setCalPeridoIncapDe(com.sun.rave.web.ui.component.Calendar c) { - this.calPeridoIncapDe = c; - } - - private StaticText staticText115 = new StaticText(); - - public StaticText getStaticText115() { - return staticText115; - } - - public void setStaticText115(StaticText st) { - this.staticText115 = st; - } - - private com.sun.rave.web.ui.component.Calendar calPeriodoIncapA = new com.sun.rave.web.ui.component.Calendar(); - - public com.sun.rave.web.ui.component.Calendar getCalPeriodoIncapA() { - return calPeriodoIncapA; - } - - public void setCalPeriodoIncapA(com.sun.rave.web.ui.component.Calendar c) { - this.calPeriodoIncapA = c; - } - - private HtmlPanelGrid gridPanel71 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel71() { - return gridPanel71; - } - - public void setGridPanel71(HtmlPanelGrid hpg) { - this.gridPanel71 = hpg; - } - - private StaticText staticText116 = new StaticText(); - - public StaticText getStaticText116() { - return staticText116; - } - - public void setStaticText116(StaticText st) { - this.staticText116 = st; - } - - private HtmlPanelGrid gridRestricoes = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridRestricoes() { - return gridRestricoes; - } - - public void setGridRestricoes(HtmlPanelGrid hpg) { - this.gridRestricoes = hpg; - } - - private HtmlPanelGrid gridPanel72 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel72() { - return gridPanel72; - } - - public void setGridPanel72(HtmlPanelGrid hpg) { - this.gridPanel72 = hpg; - } - - private HtmlPanelGrid gridPanel73 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel73() { - return gridPanel73; - } - - public void setGridPanel73(HtmlPanelGrid hpg) { - this.gridPanel73 = hpg; - } - - private HtmlPanelGrid gridPanel74 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel74() { - return gridPanel74; - } - - public void setGridPanel74(HtmlPanelGrid hpg) { - this.gridPanel74 = hpg; - } - - private HtmlPanelGrid gridPanel75 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel75() { - return gridPanel75; - } - - public void setGridPanel75(HtmlPanelGrid hpg) { - this.gridPanel75 = hpg; - } - - private ImageComponent image3 = new ImageComponent(); - - public ImageComponent getImage3() { - return image3; - } - - public void setImage3(ImageComponent ic) { - this.image3 = ic; - } - - private ImageComponent image4 = new ImageComponent(); - - public ImageComponent getImage4() { - return image4; - } - - public void setImage4(ImageComponent ic) { - this.image4 = ic; - } - - private ImageComponent image5 = new ImageComponent(); - - public ImageComponent getImage5() { - return image5; - } - - public void setImage5(ImageComponent ic) { - this.image5 = ic; - } - - private PanelGroup groupPanel26 = new PanelGroup(); - - public PanelGroup getGroupPanel26() { - return groupPanel26; - } - - public void setGroupPanel26(PanelGroup pg) { - this.groupPanel26 = pg; - } - - private StaticText staticText117 = new StaticText(); - - public StaticText getStaticText117() { - return staticText117; - } - - public void setStaticText117(StaticText st) { - this.staticText117 = st; - } - - private Checkbox chkImgFlexao = new Checkbox(); - - public Checkbox getChkImgFlexao() { - return chkImgFlexao; - } - - public void setChkImgFlexao(Checkbox c) { - this.chkImgFlexao = c; - } - - private HtmlPanelGrid gridPanel76 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel76() { - return gridPanel76; - } - - public void setGridPanel76(HtmlPanelGrid hpg) { - this.gridPanel76 = hpg; - } - - private ImageComponent image6 = new ImageComponent(); - - public ImageComponent getImage6() { - return image6; - } - - public void setImage6(ImageComponent ic) { - this.image6 = ic; - } - - private HtmlPanelGrid gridPanel77 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel77() { - return gridPanel77; - } - - public void setGridPanel77(HtmlPanelGrid hpg) { - this.gridPanel77 = hpg; - } - - private ImageComponent image7 = new ImageComponent(); - - public ImageComponent getImage7() { - return image7; - } - - public void setImage7(ImageComponent ic) { - this.image7 = ic; - } - - private ImageComponent image8 = new ImageComponent(); - - public ImageComponent getImage8() { - return image8; - } - - public void setImage8(ImageComponent ic) { - this.image8 = ic; - } - - private PanelGroup groupPanel27 = new PanelGroup(); - - public PanelGroup getGroupPanel27() { - return groupPanel27; - } - - public void setGroupPanel27(PanelGroup pg) { - this.groupPanel27 = pg; - } - - private StaticText staticText118 = new StaticText(); - - public StaticText getStaticText118() { - return staticText118; - } - - public void setStaticText118(StaticText st) { - this.staticText118 = st; - } - - private Checkbox chkImgExt1 = new Checkbox(); - - public Checkbox getChkImgExt1() { - return chkImgExt1; - } - - public void setChkImgExt1(Checkbox c) { - this.chkImgExt1 = c; - } - - private PanelGroup groupPanel28 = new PanelGroup(); - - public PanelGroup getGroupPanel28() { - return groupPanel28; - } - - public void setGroupPanel28(PanelGroup pg) { - this.groupPanel28 = pg; - } - - private StaticText staticText119 = new StaticText(); - - public StaticText getStaticText119() { - return staticText119; - } - - public void setStaticText119(StaticText st) { - this.staticText119 = st; - } - - private Checkbox chkImgExt2 = new Checkbox(); - - public Checkbox getChkImgExt2() { - return chkImgExt2; - } - - public void setChkImgExt2(Checkbox c) { - this.chkImgExt2 = c; - } - - private HtmlPanelGrid gridPanel78 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel78() { - return gridPanel78; - } - - public void setGridPanel78(HtmlPanelGrid hpg) { - this.gridPanel78 = hpg; - } - - private ImageComponent image9 = new ImageComponent(); - - public ImageComponent getImage9() { - return image9; - } - - public void setImage9(ImageComponent ic) { - this.image9 = ic; - } - - private ImageComponent image10 = new ImageComponent(); - - public ImageComponent getImage10() { - return image10; - } - - public void setImage10(ImageComponent ic) { - this.image10 = ic; - } - - private PanelGroup groupPanel29 = new PanelGroup(); - - public PanelGroup getGroupPanel29() { - return groupPanel29; - } - - public void setGroupPanel29(PanelGroup pg) { - this.groupPanel29 = pg; - } - - private StaticText staticText120 = new StaticText(); - - public StaticText getStaticText120() { - return staticText120; - } - - public void setStaticText120(StaticText st) { - this.staticText120 = st; - } - - private Checkbox chkImgCab2 = new Checkbox(); - - public Checkbox getChkImgCab2() { - return chkImgCab2; - } - - public void setChkImgCab2(Checkbox c) { - this.chkImgCab2 = c; - } - - private PanelGroup groupPanel30 = new PanelGroup(); - - public PanelGroup getGroupPanel30() { - return groupPanel30; - } - - public void setGroupPanel30(PanelGroup pg) { - this.groupPanel30 = pg; - } - - private StaticText staticText121 = new StaticText(); - - public StaticText getStaticText121() { - return staticText121; - } - - public void setStaticText121(StaticText st) { - this.staticText121 = st; - } - - private Checkbox chkImgCab3 = new Checkbox(); - - public Checkbox getChkImgCab3() { - return chkImgCab3; - } - - public void setChkImgCab3(Checkbox c) { - this.chkImgCab3 = c; - } - - private HtmlPanelGrid gridPanel79 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel79() { - return gridPanel79; - } - - public void setGridPanel79(HtmlPanelGrid hpg) { - this.gridPanel79 = hpg; - } - - private ImageComponent image12 = new ImageComponent(); - - public ImageComponent getImage12() { - return image12; - } - - public void setImage12(ImageComponent ic) { - this.image12 = ic; - } - - private ImageComponent image13 = new ImageComponent(); - - public ImageComponent getImage13() { - return image13; - } - - public void setImage13(ImageComponent ic) { - this.image13 = ic; - } - - private ImageComponent image14 = new ImageComponent(); - - public ImageComponent getImage14() { - return image14; - } - - public void setImage14(ImageComponent ic) { - this.image14 = ic; - } - - private PanelGroup groupPanel31 = new PanelGroup(); - - public PanelGroup getGroupPanel31() { - return groupPanel31; - } - - public void setGroupPanel31(PanelGroup pg) { - this.groupPanel31 = pg; - } - - private StaticText staticText122 = new StaticText(); - - public StaticText getStaticText122() { - return staticText122; - } - - public void setStaticText122(StaticText st) { - this.staticText122 = st; - } - - private Checkbox chkImgMa2 = new Checkbox(); - - public Checkbox getChkImgMa2() { - return chkImgMa2; - } - - public void setChkImgMa2(Checkbox c) { - this.chkImgMa2 = c; - } - - private PanelGroup groupPanel32 = new PanelGroup(); - - public PanelGroup getGroupPanel32() { - return groupPanel32; - } - - public void setGroupPanel32(PanelGroup pg) { - this.groupPanel32 = pg; - } - - private StaticText staticText123 = new StaticText(); - - public StaticText getStaticText123() { - return staticText123; - } - - public void setStaticText123(StaticText st) { - this.staticText123 = st; - } - - private Checkbox chkImgMa3 = new Checkbox(); - - public Checkbox getChkImgMa3() { - return chkImgMa3; - } - - public void setChkImgMa3(Checkbox c) { - this.chkImgMa3 = c; - } - - private PanelGroup groupPanel33 = new PanelGroup(); - - public PanelGroup getGroupPanel33() { - return groupPanel33; - } - - public void setGroupPanel33(PanelGroup pg) { - this.groupPanel33 = pg; - } - - private StaticText staticText124 = new StaticText(); - - public StaticText getStaticText124() { - return staticText124; - } - - public void setStaticText124(StaticText st) { - this.staticText124 = st; - } - - private Checkbox chkImgMa5 = new Checkbox(); - - public Checkbox getChkImgMa5() { - return chkImgMa5; - } - - public void setChkImgMa5(Checkbox c) { - this.chkImgMa5 = c; - } - - private PanelGroup groupPanel34 = new PanelGroup(); - - public PanelGroup getGroupPanel34() { - return groupPanel34; - } - - public void setGroupPanel34(PanelGroup pg) { - this.groupPanel34 = pg; - } - - private StaticText staticText125 = new StaticText(); - - public StaticText getStaticText125() { - return staticText125; - } - - public void setStaticText125(StaticText st) { - this.staticText125 = st; - } - - private Checkbox chkImgMa6 = new Checkbox(); - - public Checkbox getChkImgMa6() { - return chkImgMa6; - } - - public void setChkImgMa6(Checkbox c) { - this.chkImgMa6 = c; - } - - private HtmlPanelGrid gridPanel80 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel80() { - return gridPanel80; - } - - public void setGridPanel80(HtmlPanelGrid hpg) { - this.gridPanel80 = hpg; - } - - private ImageComponent image15 = new ImageComponent(); - - public ImageComponent getImage15() { - return image15; - } - - public void setImage15(ImageComponent ic) { - this.image15 = ic; - } - - private ImageComponent image16 = new ImageComponent(); - - public ImageComponent getImage16() { - return image16; - } - - public void setImage16(ImageComponent ic) { - this.image16 = ic; - } - - private PanelGroup groupPanel35 = new PanelGroup(); - - public PanelGroup getGroupPanel35() { - return groupPanel35; - } - - public void setGroupPanel35(PanelGroup pg) { - this.groupPanel35 = pg; - } - - private StaticText staticText126 = new StaticText(); - - public StaticText getStaticText126() { - return staticText126; - } - - public void setStaticText126(StaticText st) { - this.staticText126 = st; - } - - private Checkbox chkImgMa8 = new Checkbox(); - - public Checkbox getChkImgMa8() { - return chkImgMa8; - } - - public void setChkImgMa8(Checkbox c) { - this.chkImgMa8 = c; - } - - private PanelGroup groupPanel36 = new PanelGroup(); - - public PanelGroup getGroupPanel36() { - return groupPanel36; - } - - public void setGroupPanel36(PanelGroup pg) { - this.groupPanel36 = pg; - } - - private StaticText staticText127 = new StaticText(); - - public StaticText getStaticText127() { - return staticText127; - } - - public void setStaticText127(StaticText st) { - this.staticText127 = st; - } - - private Checkbox chkImgMa10 = new Checkbox(); - - public Checkbox getChkImgMa10() { - return chkImgMa10; - } - - public void setChkImgMa10(Checkbox c) { - this.chkImgMa10 = c; - } - - private HtmlPanelGrid gridPanel81 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel81() { - return gridPanel81; - } - - public void setGridPanel81(HtmlPanelGrid hpg) { - this.gridPanel81 = hpg; - } - - private StaticText staticText128 = new StaticText(); - - public StaticText getStaticText128() { - return staticText128; - } - - public void setStaticText128(StaticText st) { - this.staticText128 = st; - } - - private PanelGroup groupPanel37 = new PanelGroup(); - - public PanelGroup getGroupPanel37() { - return groupPanel37; - } - - public void setGroupPanel37(PanelGroup pg) { - this.groupPanel37 = pg; - } - - private Checkbox chkRestricaoCargas = new Checkbox(); - - public Checkbox getChkRestricaoCargas() { - return chkRestricaoCargas; - } - - public void setChkRestricaoCargas(Checkbox c) { - this.chkRestricaoCargas = c; - } - - private StaticText staticText129 = new StaticText(); - - public StaticText getStaticText129() { - return staticText129; - } - - public void setStaticText129(StaticText st) { - this.staticText129 = st; - } - - private RadioButton rbKgs2 = new RadioButton(); - - public RadioButton getRbKgs2() { - return rbKgs2; - } - - public void setRbKgs2(RadioButton rb) { - this.rbKgs2 = rb; - } - - private StaticText stKgs2 = new StaticText(); - - public StaticText getStKgs2() { - return stKgs2; - } - - public void setStKgs2(StaticText st) { - this.stKgs2 = st; - } - - private RadioButton rbKgs5 = new RadioButton(); - - public RadioButton getRbKgs5() { - return rbKgs5; - } - - public void setRbKgs5(RadioButton rb) { - this.rbKgs5 = rb; - } - - private StaticText stKgs5 = new StaticText(); - - public StaticText getStKgs5() { - return stKgs5; - } - - public void setStKgs5(StaticText st) { - this.stKgs5 = st; - } - - private RadioButton rbKgs10 = new RadioButton(); - - public RadioButton getRbKgs10() { - return rbKgs10; - } - - public void setRbKgs10(RadioButton rb) { - this.rbKgs10 = rb; - } - - private StaticText stKgs10 = new StaticText(); - - public StaticText getStKgs10() { - return stKgs10; - } - - public void setStKgs10(StaticText st) { - this.stKgs10 = st; - } - - private RadioButton rbKgs15 = new RadioButton(); - - public RadioButton getRbKgs15() { - return rbKgs15; - } - - public void setRbKgs15(RadioButton rb) { - this.rbKgs15 = rb; - } - - private StaticText stKgs15 = new StaticText(); - - public StaticText getStKgs15() { - return stKgs15; - } - - public void setStKgs15(StaticText st) { - this.stKgs15 = st; - } - - private RadioButton rbKgsOutro = new RadioButton(); - - public RadioButton getRbKgsOutro() { - return rbKgsOutro; - } - - public void setRbKgsOutro(RadioButton rb) { - this.rbKgsOutro = rb; - } - - private StaticText stKgsOutro = new StaticText(); - - public StaticText getStKgsOutro() { - return stKgsOutro; - } - - public void setStKgsOutro(StaticText st) { - this.stKgsOutro = st; - } - - private TextField txtKgs = new TextField(); - - public TextField getTxtKgs() { - return txtKgs; - } - - public void setTxtKgs(TextField tf) { - this.txtKgs = tf; - } - - private StaticText stKg = new StaticText(); - - public StaticText getStKg() { - return stKg; - } - - public void setStKg(StaticText st) { - this.stKg = st; - } - - private PanelGroup groupPanel38 = new PanelGroup(); - - public PanelGroup getGroupPanel38() { - return groupPanel38; - } - - public void setGroupPanel38(PanelGroup pg) { - this.groupPanel38 = pg; - } - - private Checkbox chkRestricaoMotricidade = new Checkbox(); - - public Checkbox getChkRestricaoMotricidade() { - return chkRestricaoMotricidade; - } - - public void setChkRestricaoMotricidade(Checkbox c) { - this.chkRestricaoMotricidade = c; - } - - private StaticText staticText136 = new StaticText(); - - public StaticText getStaticText136() { - return staticText136; - } - - public void setStaticText136(StaticText st) { - this.staticText136 = st; - } - - private PanelGroup groupPanel39 = new PanelGroup(); - - public PanelGroup getGroupPanel39() { - return groupPanel39; - } - - public void setGroupPanel39(PanelGroup pg) { - this.groupPanel39 = pg; - } - - private Checkbox chkRestricaoConducao = new Checkbox(); - - public Checkbox getChkRestricaoConducao() { - return chkRestricaoConducao; - } - - public void setChkRestricaoConducao(Checkbox c) { - this.chkRestricaoConducao = c; - } - - private StaticText staticText137 = new StaticText(); - - public StaticText getStaticText137() { - return staticText137; - } - - public void setStaticText137(StaticText st) { - this.staticText137 = st; - } - - private PanelGroup groupPanel40 = new PanelGroup(); - - public PanelGroup getGroupPanel40() { - return groupPanel40; - } - - public void setGroupPanel40(PanelGroup pg) { - this.groupPanel40 = pg; - } - - private Checkbox chkRestricaoVibracoes = new Checkbox(); - - public Checkbox getChkRestricaoVibracoes() { - return chkRestricaoVibracoes; - } - - public void setChkRestricaoVibracoes(Checkbox c) { - this.chkRestricaoVibracoes = c; - } - - private StaticText staticText138 = new StaticText(); - - public StaticText getStaticText138() { - return staticText138; - } - - public void setStaticText138(StaticText st) { - this.staticText138 = st; - } - - private HtmlPanelGrid gridPanel82 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel82() { - return gridPanel82; - } - - public void setGridPanel82(HtmlPanelGrid hpg) { - this.gridPanel82 = hpg; - } - - private PanelGroup groupPanel41 = new PanelGroup(); - - public PanelGroup getGroupPanel41() { - return groupPanel41; - } - - public void setGroupPanel41(PanelGroup pg) { - this.groupPanel41 = pg; - } - - private Checkbox chkRestricaoOutras = new Checkbox(); - - public Checkbox getChkRestricaoOutras() { - return chkRestricaoOutras; - } - - public void setChkRestricaoOutras(Checkbox c) { - this.chkRestricaoOutras = c; - } - - private StaticText staticText139 = new StaticText(); - - public StaticText getStaticText139() { - return staticText139; - } - - public void setStaticText139(StaticText st) { - this.staticText139 = st; - } - - private TextField txtRestricaoOutras = new TextField(); - - public TextField getTxtRestricaoOutras() { - return txtRestricaoOutras; - } - - public void setTxtRestricaoOutras(TextField tf) { - this.txtRestricaoOutras = tf; - } - - private HtmlPanelGrid gridPanel83 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel83() { - return gridPanel83; - } - - public void setGridPanel83(HtmlPanelGrid hpg) { - this.gridPanel83 = hpg; - } - - private StaticText staticText140 = new StaticText(); - - public StaticText getStaticText140() { - return staticText140; - } - - public void setStaticText140(StaticText st) { - this.staticText140 = st; - } - - private TextField txtObservacoes = new TextField(); - - public TextField getTxtObservacoes() { - return txtObservacoes; - } - - public void setTxtObservacoes(TextField tf) { - this.txtObservacoes = tf; - } - - private RadioButton rbIncapacidadePerm = new RadioButton(); - - public RadioButton getRbIncapacidadePerm() { - return rbIncapacidadePerm; - } - - public void setRbIncapacidadePerm(RadioButton rb) { - this.rbIncapacidadePerm = rb; - } - - private StaticText staticText141 = new StaticText(); - - public StaticText getStaticText141() { - return staticText141; - } - - public void setStaticText141(StaticText st) { - this.staticText141 = st; - } - - private ImageComponent image17 = new ImageComponent(); - - public ImageComponent getImage17() { - return image17; - } - - public void setImage17(ImageComponent ic) { - this.image17 = ic; - } - - private ImageComponent image18 = new ImageComponent(); - - public ImageComponent getImage18() { - return image18; - } - - public void setImage18(ImageComponent ic) { - this.image18 = ic; - } - - private HtmlPanelGrid gridPanel84 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel84() { - return gridPanel84; - } - - public void setGridPanel84(HtmlPanelGrid hpg) { - this.gridPanel84 = hpg; - } - - private ImageComponent image19 = new ImageComponent(); - - public ImageComponent getImage19() { - return image19; - } - - public void setImage19(ImageComponent ic) { - this.image19 = ic; - } - - private ImageComponent image20 = new ImageComponent(); - - public ImageComponent getImage20() { - return image20; - } - - public void setImage20(ImageComponent ic) { - this.image20 = ic; - } - - private PanelGroup groupPanel42 = new PanelGroup(); - - public PanelGroup getGroupPanel42() { - return groupPanel42; - } - - public void setGroupPanel42(PanelGroup pg) { - this.groupPanel42 = pg; - } - - private StaticText staticText142 = new StaticText(); - - public StaticText getStaticText142() { - return staticText142; - } - - public void setStaticText142(StaticText st) { - this.staticText142 = st; - } - - private Checkbox chkImgRot1 = new Checkbox(); - - public Checkbox getChkImgRot1() { - return chkImgRot1; - } - - public void setChkImgRot1(Checkbox c) { - this.chkImgRot1 = c; - } - - private PanelGroup groupPanel43 = new PanelGroup(); - - public PanelGroup getGroupPanel43() { - return groupPanel43; - } - - public void setGroupPanel43(PanelGroup pg) { - this.groupPanel43 = pg; - } - - private StaticText staticText143 = new StaticText(); - - public StaticText getStaticText143() { - return staticText143; - } - - public void setStaticText143(StaticText st) { - this.staticText143 = st; - } - - private Checkbox chkImgRot2 = new Checkbox(); - - public Checkbox getChkImgRot2() { - return chkImgRot2; - } - - public void setChkImgRot2(Checkbox c) { - this.chkImgRot2 = c; - } - - private ImageComponent image21 = new ImageComponent(); - - public ImageComponent getImage21() { - return image21; - } - - public void setImage21(ImageComponent ic) { - this.image21 = ic; - } - - private ImageComponent image11 = new ImageComponent(); - - public ImageComponent getImage11() { - return image11; - } - - public void setImage11(ImageComponent ic) { - this.image11 = ic; - } - - private PanelGroup groupPanel44 = new PanelGroup(); - - public PanelGroup getGroupPanel44() { - return groupPanel44; - } - - public void setGroupPanel44(PanelGroup pg) { - this.groupPanel44 = pg; - } - - private StaticText staticText144 = new StaticText(); - - public StaticText getStaticText144() { - return staticText144; - } - - public void setStaticText144(StaticText st) { - this.staticText144 = st; - } - - private Checkbox chkImgCab1 = new Checkbox(); - - public Checkbox getChkImgCab1() { - return chkImgCab1; - } - - public void setChkImgCab1(Checkbox c) { - this.chkImgCab1 = c; - } - - private PanelGroup groupPanel45 = new PanelGroup(); - - public PanelGroup getGroupPanel45() { - return groupPanel45; - } - - public void setGroupPanel45(PanelGroup pg) { - this.groupPanel45 = pg; - } - - private StaticText staticText145 = new StaticText(); - - public StaticText getStaticText145() { - return staticText145; - } - - public void setStaticText145(StaticText st) { - this.staticText145 = st; - } - - private Checkbox chkImgCab4 = new Checkbox(); - - public Checkbox getChkImgCab4() { - return chkImgCab4; - } - - public void setChkImgCab4(Checkbox c) { - this.chkImgCab4 = c; - } - - private ImageComponent image22 = new ImageComponent(); - - public ImageComponent getImage22() { - return image22; - } - - public void setImage22(ImageComponent ic) { - this.image22 = ic; - } - - private ImageComponent image23 = new ImageComponent(); - - public ImageComponent getImage23() { - return image23; - } - - public void setImage23(ImageComponent ic) { - this.image23 = ic; - } - - private ImageComponent image24 = new ImageComponent(); - - public ImageComponent getImage24() { - return image24; - } - - public void setImage24(ImageComponent ic) { - this.image24 = ic; - } - - private PanelGroup groupPanel46 = new PanelGroup(); - - public PanelGroup getGroupPanel46() { - return groupPanel46; - } - - public void setGroupPanel46(PanelGroup pg) { - this.groupPanel46 = pg; - } - - private StaticText staticText146 = new StaticText(); - - public StaticText getStaticText146() { - return staticText146; - } - - public void setStaticText146(StaticText st) { - this.staticText146 = st; - } - - private Checkbox chkImgMa1 = new Checkbox(); - - public Checkbox getChkImgMa1() { - return chkImgMa1; - } - - public void setChkImgMa1(Checkbox c) { - this.chkImgMa1 = c; - } - - private PanelGroup groupPanel47 = new PanelGroup(); - - public PanelGroup getGroupPanel47() { - return groupPanel47; - } - - public void setGroupPanel47(PanelGroup pg) { - this.groupPanel47 = pg; - } - - private StaticText staticText147 = new StaticText(); - - public StaticText getStaticText147() { - return staticText147; - } - - public void setStaticText147(StaticText st) { - this.staticText147 = st; - } - - private Checkbox chkImgMa4 = new Checkbox(); - - public Checkbox getChkImgMa4() { - return chkImgMa4; - } - - public void setChkImgMa4(Checkbox c) { - this.chkImgMa4 = c; - } - - private ImageComponent image25 = new ImageComponent(); - - public ImageComponent getImage25() { - return image25; - } - - public void setImage25(ImageComponent ic) { - this.image25 = ic; - } - - private ImageComponent image26 = new ImageComponent(); - - public ImageComponent getImage26() { - return image26; - } - - public void setImage26(ImageComponent ic) { - this.image26 = ic; - } - - private PanelGroup groupPanel48 = new PanelGroup(); - - public PanelGroup getGroupPanel48() { - return groupPanel48; - } - - public void setGroupPanel48(PanelGroup pg) { - this.groupPanel48 = pg; - } - - private StaticText staticText148 = new StaticText(); - - public StaticText getStaticText148() { - return staticText148; - } - - public void setStaticText148(StaticText st) { - this.staticText148 = st; - } - - private Checkbox chkImgMa7 = new Checkbox(); - - public Checkbox getChkImgMa7() { - return chkImgMa7; - } - - public void setChkImgMa7(Checkbox c) { - this.chkImgMa7 = c; - } - - private PanelGroup groupPanel49 = new PanelGroup(); - - public PanelGroup getGroupPanel49() { - return groupPanel49; - } - - public void setGroupPanel49(PanelGroup pg) { - this.groupPanel49 = pg; - } - - private StaticText staticText149 = new StaticText(); - - public StaticText getStaticText149() { - return staticText149; - } - - public void setStaticText149(StaticText st) { - this.staticText149 = st; - } - - private Checkbox chkImgMa9 = new Checkbox(); - - public Checkbox getChkImgMa9() { - return chkImgMa9; - } - - public void setChkImgMa9(Checkbox c) { - this.chkImgMa9 = c; - } - - private HtmlPanelGrid gridMedicoView = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridMedicoView() { - return gridMedicoView; - } - - public void setGridMedicoView(HtmlPanelGrid hpg) { - this.gridMedicoView = hpg; - } - - private HtmlPanelGrid gridPanel85 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel85() { - return gridPanel85; - } - - public void setGridPanel85(HtmlPanelGrid hpg) { - this.gridPanel85 = hpg; - } - - private StaticText staticText150 = new StaticText(); - - public StaticText getStaticText150() { - return staticText150; - } - - public void setStaticText150(StaticText st) { - this.staticText150 = st; - } - - private HtmlPanelGrid gridLesao = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridLesao() { - return gridLesao; - } - - public void setGridLesao(HtmlPanelGrid hpg) { - this.gridLesao = hpg; - } - - private StaticText staticText151 = new StaticText(); - - public StaticText getStaticText151() { - return staticText151; - } - - public void setStaticText151(StaticText st) { - this.staticText151 = st; - } - - private HtmlPanelGrid gridPanel86 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel86() { - return gridPanel86; - } - - public void setGridPanel86(HtmlPanelGrid hpg) { - this.gridPanel86 = hpg; - } - - private StaticText staticText152 = new StaticText(); - - public StaticText getStaticText152() { - return staticText152; - } - - public void setStaticText152(StaticText st) { - this.staticText152 = st; - } - - private HtmlPanelGrid gridIncapacidade2 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridIncapacidade2() { - return gridIncapacidade2; - } - - public void setGridIncapacidade2(HtmlPanelGrid hpg) { - this.gridIncapacidade2 = hpg; - } - - private HtmlPanelGrid gridPanel87 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel87() { - return gridPanel87; - } - - public void setGridPanel87(HtmlPanelGrid hpg) { - this.gridPanel87 = hpg; - } - - private StaticText staticText153 = new StaticText(); - - public StaticText getStaticText153() { - return staticText153; - } - - public void setStaticText153(StaticText st) { - this.staticText153 = st; - } - - private HtmlPanelGrid gridRestricoes1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridRestricoes1() { - return gridRestricoes1; - } - - public void setGridRestricoes1(HtmlPanelGrid hpg) { - this.gridRestricoes1 = hpg; - } - - private HtmlPanelGrid gridPanel88 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel88() { - return gridPanel88; - } - - public void setGridPanel88(HtmlPanelGrid hpg) { - this.gridPanel88 = hpg; - } - - private HtmlPanelGrid gridImagesRestricoes = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridImagesRestricoes() { - return gridImagesRestricoes; - } - - public void setGridImagesRestricoes(HtmlPanelGrid hpg) { - this.gridImagesRestricoes = hpg; - } - - private HtmlPanelGrid gridOutrasRestricoes = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridOutrasRestricoes() { - return gridOutrasRestricoes; - } - - public void setGridOutrasRestricoes(HtmlPanelGrid hpg) { - this.gridOutrasRestricoes = hpg; - } - - private StaticText staticText154 = new StaticText(); - - public StaticText getStaticText154() { - return staticText154; - } - - public void setStaticText154(StaticText st) { - this.staticText154 = st; - } - - private HtmlPanelGrid gridPanel90 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel90() { - return gridPanel90; - } - - public void setGridPanel90(HtmlPanelGrid hpg) { - this.gridPanel90 = hpg; - } - - private StaticText staticText155 = new StaticText(); - - public StaticText getStaticText155() { - return staticText155; - } - - public void setStaticText155(StaticText st) { - this.staticText155 = st; - } - - private StaticText stObservacoes = new StaticText(); - - public StaticText getStObservacoes() { - return stObservacoes; - } - - public void setStObservacoes(StaticText st) { - this.stObservacoes = st; - } - - private HtmlPanelGrid gridAssinaturas = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridAssinaturas() { - return gridAssinaturas; - } - - public void setGridAssinaturas(HtmlPanelGrid hpg) { - this.gridAssinaturas = hpg; - } - - private HtmlPanelGrid gridPanel89 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel89() { - return gridPanel89; - } - - public void setGridPanel89(HtmlPanelGrid hpg) { - this.gridPanel89 = hpg; - } - - private HtmlPanelGrid gridPanel91 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel91() { - return gridPanel91; - } - - public void setGridPanel91(HtmlPanelGrid hpg) { - this.gridPanel91 = hpg; - } - - private StaticText staticText73 = new StaticText(); - - public StaticText getStaticText73() { - return staticText73; - } - - public void setStaticText73(StaticText st) { - this.staticText73 = st; - } - - private HtmlPanelGrid gridPanel92 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel92() { - return gridPanel92; - } - - public void setGridPanel92(HtmlPanelGrid hpg) { - this.gridPanel92 = hpg; - } - - private PanelGroup groupPanel50 = new PanelGroup(); - - public PanelGroup getGroupPanel50() { - return groupPanel50; - } - - public void setGroupPanel50(PanelGroup pg) { - this.groupPanel50 = pg; - } - - private StaticText staticText76 = new StaticText(); - - public StaticText getStaticText76() { - return staticText76; - } - - public void setStaticText76(StaticText st) { - this.staticText76 = st; - } - - private TextField txtAssSeg = new TextField(); - - public TextField getTxtAssSeg() { - return txtAssSeg; - } - - public void setTxtAssSeg(TextField tf) { - this.txtAssSeg = tf; - } - - private HtmlPanelGrid gridPanel93 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel93() { - return gridPanel93; - } - - public void setGridPanel93(HtmlPanelGrid hpg) { - this.gridPanel93 = hpg; - } - - private StaticText stDtAssSeg = new StaticText(); - - public StaticText getStDtAssSeg() { - return stDtAssSeg; - } - - public void setStDtAssSeg(StaticText st) { - this.stDtAssSeg = st; - } - - private HtmlPanelGrid gridPanel94 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel94() { - return gridPanel94; - } - - public void setGridPanel94(HtmlPanelGrid hpg) { - this.gridPanel94 = hpg; - } - - private HtmlPanelGrid gridPanel95 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel95() { - return gridPanel95; - } - - public void setGridPanel95(HtmlPanelGrid hpg) { - this.gridPanel95 = hpg; - } - - private StaticText staticText98 = new StaticText(); - - public StaticText getStaticText98() { - return staticText98; - } - - public void setStaticText98(StaticText st) { - this.staticText98 = st; - } - - private HtmlPanelGrid gridPanel96 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel96() { - return gridPanel96; - } - - public void setGridPanel96(HtmlPanelGrid hpg) { - this.gridPanel96 = hpg; - } - - private PanelGroup groupPanel51 = new PanelGroup(); - - public PanelGroup getGroupPanel51() { - return groupPanel51; - } - - public void setGroupPanel51(PanelGroup pg) { - this.groupPanel51 = pg; - } - - private StaticText staticText101 = new StaticText(); - - public StaticText getStaticText101() { - return staticText101; - } - - public void setStaticText101(StaticText st) { - this.staticText101 = st; - } - - private TextField txtAssHS = new TextField(); - - public TextField getTxtAssHS() { - return txtAssHS; - } - - public void setTxtAssHS(TextField tf) { - this.txtAssHS = tf; - } - - private HtmlPanelGrid gridPanel97 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel97() { - return gridPanel97; - } - - public void setGridPanel97(HtmlPanelGrid hpg) { - this.gridPanel97 = hpg; - } - - private StaticText staticText104 = new StaticText(); - - public StaticText getStaticText104() { - return staticText104; - } - - public void setStaticText104(StaticText st) { - this.staticText104 = st; - } - - private HtmlPanelGrid gridPanel98 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel98() { - return gridPanel98; - } - - public void setGridPanel98(HtmlPanelGrid hpg) { - this.gridPanel98 = hpg; - } - - private HtmlPanelGrid gridPanel99 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel99() { - return gridPanel99; - } - - public void setGridPanel99(HtmlPanelGrid hpg) { - this.gridPanel99 = hpg; - } - - private StaticText staticText130 = new StaticText(); - - public StaticText getStaticText130() { - return staticText130; - } - - public void setStaticText130(StaticText st) { - this.staticText130 = st; - } - - private HtmlPanelGrid gridPanel100 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel100() { - return gridPanel100; - } - - public void setGridPanel100(HtmlPanelGrid hpg) { - this.gridPanel100 = hpg; - } - - private PanelGroup groupPanel52 = new PanelGroup(); - - public PanelGroup getGroupPanel52() { - return groupPanel52; - } - - public void setGroupPanel52(PanelGroup pg) { - this.groupPanel52 = pg; - } - - private StaticText staticText131 = new StaticText(); - - public StaticText getStaticText131() { - return staticText131; - } - - public void setStaticText131(StaticText st) { - this.staticText131 = st; - } - - private TextField txtAssMed = new TextField(); - - public TextField getTxtAssMed() { - return txtAssMed; - } - - public void setTxtAssMed(TextField tf) { - this.txtAssMed = tf; - } - - private HtmlPanelGrid gridPanel101 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel101() { - return gridPanel101; - } - - public void setGridPanel101(HtmlPanelGrid hpg) { - this.gridPanel101 = hpg; - } - - private StaticText staticText132 = new StaticText(); - - public StaticText getStaticText132() { - return staticText132; - } - - public void setStaticText132(StaticText st) { - this.staticText132 = st; - } - - private HtmlPanelGrid gridPanel102 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel102() { - return gridPanel102; - } - - public void setGridPanel102(HtmlPanelGrid hpg) { - this.gridPanel102 = hpg; - } - - private HtmlPanelGrid gridPanel103 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel103() { - return gridPanel103; - } - - public void setGridPanel103(HtmlPanelGrid hpg) { - this.gridPanel103 = hpg; - } - - private StaticText staticText133 = new StaticText(); - - public StaticText getStaticText133() { - return staticText133; - } - - public void setStaticText133(StaticText st) { - this.staticText133 = st; - } - - private HtmlPanelGrid gridPanel104 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel104() { - return gridPanel104; - } - - public void setGridPanel104(HtmlPanelGrid hpg) { - this.gridPanel104 = hpg; - } - - private PanelGroup groupPanel53 = new PanelGroup(); - - public PanelGroup getGroupPanel53() { - return groupPanel53; - } - - public void setGroupPanel53(PanelGroup pg) { - this.groupPanel53 = pg; - } - - private StaticText staticText134 = new StaticText(); - - public StaticText getStaticText134() { - return staticText134; - } - - public void setStaticText134(StaticText st) { - this.staticText134 = st; - } - - private HtmlPanelGrid gridPanel105 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel105() { - return gridPanel105; - } - - public void setGridPanel105(HtmlPanelGrid hpg) { - this.gridPanel105 = hpg; - } - - private StaticText staticText135 = new StaticText(); - - public StaticText getStaticText135() { - return staticText135; - } - - public void setStaticText135(StaticText st) { - this.staticText135 = st; - } - - private StaticText staticText156 = new StaticText(); - - public StaticText getStaticText156() { - return staticText156; - } - - public void setStaticText156(StaticText st) { - this.staticText156 = st; - } - - private HtmlPanelGrid gridPanel106 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel106() { - return gridPanel106; - } - - public void setGridPanel106(HtmlPanelGrid hpg) { - this.gridPanel106 = hpg; - } - - private HtmlPanelGrid gridPanel107 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel107() { - return gridPanel107; - } - - public void setGridPanel107(HtmlPanelGrid hpg) { - this.gridPanel107 = hpg; - } - - private StaticText staticText157 = new StaticText(); - - public StaticText getStaticText157() { - return staticText157; - } - - public void setStaticText157(StaticText st) { - this.staticText157 = st; - } - - private HtmlPanelGrid gridPanel108 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel108() { - return gridPanel108; - } - - public void setGridPanel108(HtmlPanelGrid hpg) { - this.gridPanel108 = hpg; - } - - private StaticText staticText158 = new StaticText(); - - public StaticText getStaticText158() { - return staticText158; - } - - public void setStaticText158(StaticText st) { - this.staticText158 = st; - } - - private PanelGroup groupPanel54 = new PanelGroup(); - - public PanelGroup getGroupPanel54() { - return groupPanel54; - } - - public void setGroupPanel54(PanelGroup pg) { - this.groupPanel54 = pg; - } - - private StaticText staticText159 = new StaticText(); - - public StaticText getStaticText159() { - return staticText159; - } - - public void setStaticText159(StaticText st) { - this.staticText159 = st; - } - - private TextField txtAssRespRh = new TextField(); - - public TextField getTxtAssRespRh() { - return txtAssRespRh; - } - - public void setTxtAssRespRh(TextField tf) { - this.txtAssRespRh = tf; - } - - private HtmlPanelGrid gridPanel109 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel109() { - return gridPanel109; - } - - public void setGridPanel109(HtmlPanelGrid hpg) { - this.gridPanel109 = hpg; - } - - private StaticText staticText160 = new StaticText(); - - public StaticText getStaticText160() { - return staticText160; - } - - public void setStaticText160(StaticText st) { - this.staticText160 = st; - } - - private HtmlPanelGrid gridPanel110 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel110() { - return gridPanel110; - } - - public void setGridPanel110(HtmlPanelGrid hpg) { - this.gridPanel110 = hpg; - } - - private HtmlPanelGrid gridPanel111 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel111() { - return gridPanel111; - } - - public void setGridPanel111(HtmlPanelGrid hpg) { - this.gridPanel111 = hpg; - } - - private StaticText staticText161 = new StaticText(); - - public StaticText getStaticText161() { - return staticText161; - } - - public void setStaticText161(StaticText st) { - this.staticText161 = st; - } - - private HtmlPanelGrid gridPanel112 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel112() { - return gridPanel112; - } - - public void setGridPanel112(HtmlPanelGrid hpg) { - this.gridPanel112 = hpg; - } - - private StaticText staticText162 = new StaticText(); - - public StaticText getStaticText162() { - return staticText162; - } - - public void setStaticText162(StaticText st) { - this.staticText162 = st; - } - - private PanelGroup groupPanel55 = new PanelGroup(); - - public PanelGroup getGroupPanel55() { - return groupPanel55; - } - - public void setGroupPanel55(PanelGroup pg) { - this.groupPanel55 = pg; - } - - private StaticText staticText163 = new StaticText(); - - public StaticText getStaticText163() { - return staticText163; - } - - public void setStaticText163(StaticText st) { - this.staticText163 = st; - } - - private TextField txtAssRespSeg = new TextField(); - - public TextField getTxtAssRespSeg() { - return txtAssRespSeg; - } - - public void setTxtAssRespSeg(TextField tf) { - this.txtAssRespSeg = tf; - } - - private HtmlPanelGrid gridPanel113 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel113() { - return gridPanel113; - } - - public void setGridPanel113(HtmlPanelGrid hpg) { - this.gridPanel113 = hpg; - } - - private StaticText stDtAssRespSeg = new StaticText(); - - public StaticText getStDtAssRespSeg() { - return stDtAssRespSeg; - } - - public void setStDtAssRespSeg(StaticText st) { - this.stDtAssRespSeg = st; - } - - private HtmlPanelGrid gridPanel22 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel22() { - return gridPanel22; - } - - public void setGridPanel22(HtmlPanelGrid hpg) { - this.gridPanel22 = hpg; - } - - private PanelGroup groupPanel5 = new PanelGroup(); - - public PanelGroup getGroupPanel5() { - return groupPanel5; - } - - public void setGroupPanel5(PanelGroup pg) { - this.groupPanel5 = pg; - } - - private Button butGravar = new Button(); - - public Button getButGravar() { - return butGravar; - } - - public void setButGravar(Button b) { - this.butGravar = b; - } - - private Button butEnviar = new Button(); - - public Button getButEnviar() { - return butEnviar; - } - - public void setButEnviar(Button b) { - this.butEnviar = b; - } - - private Button butCancelar = new Button(); - - public Button getButCancelar() { - return butCancelar; - } - - public void setButCancelar(Button b) { - this.butCancelar = b; - } - - private HtmlPanelGrid gridHeader1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridHeader1() { - return gridHeader1; - } - - public void setGridHeader1(HtmlPanelGrid hpg) { - this.gridHeader1 = hpg; - } - - private PanelGroup groupPanel56 = new PanelGroup(); - - public PanelGroup getGroupPanel56() { - return groupPanel56; - } - - public void setGroupPanel56(PanelGroup pg) { - this.groupPanel56 = pg; - } - - private StaticText lblUser = new StaticText(); - - public StaticText getLblUser() { - return lblUser; - } - - public void setLblUser(StaticText st) { - this.lblUser = st; - } - - private StaticText staticText165 = new StaticText(); - - public StaticText getStaticText165() { - return staticText165; - } - - public void setStaticText165(StaticText st) { - this.staticText165 = st; - } - - private Hyperlink lnkEditUser = new Hyperlink(); - - public Hyperlink getLnkEditUser() { - return lnkEditUser; - } - - public void setLnkEditUser(Hyperlink h) { - this.lnkEditUser = h; - } - - private StaticText staticText166 = new StaticText(); - - public StaticText getStaticText166() { - return staticText166; - } - - public void setStaticText166(StaticText st) { - this.staticText166 = st; - } - - private Hyperlink lnkLogout = new Hyperlink(); - - public Hyperlink getLnkLogout() { - return lnkLogout; - } - - public void setLnkLogout(Hyperlink h) { - this.lnkLogout = h; - } - - private HtmlPanelGrid gridPanel114 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel114() { - return gridPanel114; - } - - public void setGridPanel114(HtmlPanelGrid hpg) { - this.gridPanel114 = hpg; - } - - private PanelGroup groupPanel57 = new PanelGroup(); - - public PanelGroup getGroupPanel57() { - return groupPanel57; - } - - public void setGroupPanel57(PanelGroup pg) { - this.groupPanel57 = pg; - } - - private ImageComponent image27 = new ImageComponent(); - - public ImageComponent getImage27() { - return image27; - } - - public void setImage27(ImageComponent ic) { - this.image27 = ic; - } - - private HtmlPanelGrid gridPanel115 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel115() { - return gridPanel115; - } - - public void setGridPanel115(HtmlPanelGrid hpg) { - this.gridPanel115 = hpg; - } - - private StaticText staticText168 = new StaticText(); - - public StaticText getStaticText168() { - return staticText168; - } - - public void setStaticText168(StaticText st) { - this.staticText168 = st; - } - - private HtmlPanelGrid gridPanel116 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel116() { - return gridPanel116; - } - - public void setGridPanel116(HtmlPanelGrid hpg) { - this.gridPanel116 = hpg; - } - - private PanelGroup groupPanel58 = new PanelGroup(); - - public PanelGroup getGroupPanel58() { - return groupPanel58; - } - - public void setGroupPanel58(PanelGroup pg) { - this.groupPanel58 = pg; - } - - private StaticText staticText169 = new StaticText(); - - public StaticText getStaticText169() { - return staticText169; - } - - public void setStaticText169(StaticText st) { - this.staticText169 = st; - } - - private StaticText stHeaderNr = new StaticText(); - - public StaticText getStHeaderNr() { - return stHeaderNr; - } - - public void setStHeaderNr(StaticText st) { - this.stHeaderNr = st; - } - - private PanelGroup groupPanel59 = new PanelGroup(); - - public PanelGroup getGroupPanel59() { - return groupPanel59; - } - - public void setGroupPanel59(PanelGroup pg) { - this.groupPanel59 = pg; - } - - private StaticText staticText170 = new StaticText(); - - public StaticText getStaticText170() { - return staticText170; - } - - public void setStaticText170(StaticText st) { - this.staticText170 = st; - } - - private StaticText stHeaderDate = new StaticText(); - - public StaticText getStHeaderDate() { - return stHeaderDate; - } - - public void setStHeaderDate(StaticText st) { - this.stHeaderDate = st; - } - - private ImageComponent image28 = new ImageComponent(); - - public ImageComponent getImage28() { - return image28; - } - - public void setImage28(ImageComponent ic) { - this.image28 = ic; - } - - private PanelGroup groupPanel1 = new PanelGroup(); - - public PanelGroup getGroupPanel1() { - return groupPanel1; - } - - public void setGroupPanel1(PanelGroup pg) { - this.groupPanel1 = pg; - } - - private RadioButton rbTurnoManha = new RadioButton(); - - public RadioButton getRbTurnoManha() { - return rbTurnoManha; - } - - public void setRbTurnoManha(RadioButton rb) { - this.rbTurnoManha = rb; - } - - private StaticText staticText1 = new StaticText(); - - public StaticText getStaticText1() { - return staticText1; - } - - public void setStaticText1(StaticText st) { - this.staticText1 = st; - } - - private StaticText staticText2 = new StaticText(); - - public StaticText getStaticText2() { - return staticText2; - } - - public void setStaticText2(StaticText st) { - this.staticText2 = st; - } - - private RadioButton rbTurnoTarde = new RadioButton(); - - public RadioButton getRbTurnoTarde() { - return rbTurnoTarde; - } - - public void setRbTurnoTarde(RadioButton rb) { - this.rbTurnoTarde = rb; - } - - private StaticText staticText3 = new StaticText(); - - public StaticText getStaticText3() { - return staticText3; - } - - public void setStaticText3(StaticText st) { - this.staticText3 = st; - } - - private StaticText staticText41 = new StaticText(); - - public StaticText getStaticText41() { - return staticText41; - } - - public void setStaticText41(StaticText st) { - this.staticText41 = st; - } - - private RadioButton rbTurnoNoite = new RadioButton(); - - public RadioButton getRbTurnoNoite() { - return rbTurnoNoite; - } - - public void setRbTurnoNoite(RadioButton rb) { - this.rbTurnoNoite = rb; - } - - private StaticText staticText42 = new StaticText(); - - public StaticText getStaticText42() { - return staticText42; - } - - public void setStaticText42(StaticText st) { - this.staticText42 = st; - } - - private Button butImprimir = new Button(); - - public Button getButImprimir() { - return butImprimir; - } - - public void setButImprimir(Button b) { - this.butImprimir = b; - } - - private HiddenField hidPdf = new HiddenField(); - - public HiddenField getHidPdf() { - return hidPdf; - } - - public void setHidPdf(HiddenField hf) { - this.hidPdf = hf; - } - /** - *

Construct a new Page bean instance.

- */ - public AnaliseAcidenteTrabalho() { - } - - /** - *

Callback method that is called whenever a page is navigated to, - * either directly via a URL, or indirectly via page navigation. - * Customize this method to acquire resources that will be needed - * for event handlers and lifecycle methods, whether or not this - * page is performing post back processing.

- * - *

Note that, if the current request is a postback, the property - * values of the components do not represent any - * values submitted with this request. Instead, they represent the - * property values that were saved for this view when it was rendered.

- */ - public void init() { - // Perform initializations inherited from our superclass - super.init(); - // Perform application initialization that must complete - // *before* managed components are initialized - // TODO - add your own initialiation code here - - // - // Initialize automatically managed components - // *Note* - this logic should NOT be modified - try { - _init(); - } catch (Exception e) { - log("AnaliseAcidenteTrabalho Initialization Failure", e); - throw e instanceof FacesException ? (FacesException) e: new FacesException(e); - } - - // - // Perform application initialization that must complete - // *after* managed components are initialized - // TODO - add your own initialization code here - - if (!getSessionBean1().isLoggedIn()) { - try { - getExternalContext().redirect("Login.jsp"); - } catch(Exception e) { - // . . . handle exception . . . - } - } - - initCalendars(); - - HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest(); - String referer = request.getRequestURI(); - String pageFrom = Utils.getPageFrom(referer); - if(!pageFrom.matches("AnaliseAcidenteTrabalho.jsp")) - { - if(pageFrom.matches("LoadImage.jsp")) - { - restorePageState(); - fillImages(); - } - else - { - lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); - drpTecnicos.setSelected(new Integer(0)); - drpMedicos.setSelected(new Integer(0)); - if(getSessionBean1().getCurrentAnalise() == null) // new analise - { - getSessionBean1().setAcidentado(null); // Here ????? - lnkLblTrabalhador.setDisabled(true); - lnkLblTrabalhador.setStyleClass(""); - initializePage(); - } - else // edit analise - { - lnkLblTrabalhador.setDisabled(false); - lnkLblTrabalhador.setStyleClass("labelTrabalhador"); - gridTrabalhadores.setRendered(false); - - fillPage(); - } - - } - } - } - - /** - *

Callback method that is called after the component tree has been - * restored, but before any event processing takes place. This method - * will only be called on a postback request that - * is processing a form submit. Customize this method to allocate - * resources that will be required in your event handlers.

- */ - public void preprocess() { - } - - /** - *

Callback method that is called just before rendering takes place. - * This method will only be called for the page that - * will actually be rendered (and not, for example, on a page that - * handled a postback and then navigated to a different page). Customize - * this method to allocate resources that will be required for rendering - * this page.

- */ - public void prerender() { - txtMsg.setText(getSessionBean1().getMsg()); - getSessionBean1().setMsg(""); - - } - - /** - *

Callback method that is called after rendering is completed for - * this request, if init() was called (regardless of whether - * or not this was the page that was actually rendered). Customize this - * method to release resources acquired in the init(), - * preprocess(), or prerender() methods (or - * acquired during execution of an event handler).

- */ - public void destroy() { - - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected RequestBean1 getRequestBean1() { - return (RequestBean1)getBean("RequestBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected SessionBean1 getSessionBean1() { - return (SessionBean1)getBean("SessionBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected ApplicationBean1 getApplicationBean1() { - return (ApplicationBean1)getBean("ApplicationBean1"); - } - - public String lnkLogout_action() { - // TODO: Replace with your code - - javax.servlet.http.HttpSession session = - (javax.servlet.http.HttpSession) getExternalContext().getSession(true); - session.invalidate(); - return "login"; - } - - - private void initializePage() - { - butEnviar.setText("Enviar a RH"); - gridSiprpView.setRendered(false); - gridAcidentadoView.setRendered(false); - gridDadosAcidenteRh.setRendered(false); - gridDadosAcidenteRhView.setRendered(false); - gridRecomendacoesHS.setRendered(false); - gridRecomendacoesViewHS.setRendered(false); - gridMedidasRH.setRendered(false); - gridMedidasViewRH.setRendered(false); - gridMedico.setRendered(false); - gridMedicoView.setRendered(false); - gridAssinaturas.setRendered(false); - - AnalisesDataProvider adp = new AnalisesDataProvider(); - try - { - String nome_empresa = adp.getEmpresaNome(getSessionBean1().getCurrentUser().getEmpresa_id()); - txtEmpresa.setText(utils.Utils.unicodeToHTML(nome_empresa)); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - try - { - txtEstabelecimento.setText(adp.getEstabelecimentoNome(getSessionBean1().getCurrentUser().getEstabelecimento_id())); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - fillTrabalhadoresTable(); - - Calendar c = Calendar.getInstance(); - SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd"); - stDataAcidente.setText(dateFormat.format(c.getTime())); - - } - - private void fillTrabalhadoresTable() - { - AnalisesDataProvider adp = new AnalisesDataProvider(); - try - { - //lblActivos.setRendered(true); - table1.setRendered(true); - - ArrayList trabalhadoresList = adp.getTrabalhadoresListByEstabelecimento(getSessionBean1().getCurrentUser().getEstabelecimento_id()); - getSessionBean1().getTrabalhadoresListDataProvider().setList(trabalhadoresList); - } - catch(Exception ex) - { - //lblActivos.setRendered(false); - table1.setRendered(false); - ex.printStackTrace(); - } - } - - private String fillPage() - { - AnaliseAcidente a = getSessionBean1().getCurrentAnalise(); - stHeaderNr.setText(a.getAnalise_nr()); - try - { - java.util.Date ddate = new java.util.Date(a.getData_acidente().getTime()); - stHeaderDate.setText(utils.Utils.dateToYYYYMMDD(ddate)); - } - catch(Exception ex){}; - AnalisesDataProvider adp = new AnalisesDataProvider(); - try - { - String nome_empresa = adp.getEmpresaNome(a.getEmpresa_id()); - txtEmpresa.setText(utils.Utils.unicodeToHTML(nome_empresa)); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - try - { - txtEstabelecimento.setText(adp.getEstabelecimentoNome(a.getEstabelecimento_id())); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - Acidentado ac = null; - try - { - //Trabalhador t = adp.getTrabalhador(a.getTrabalhador_id()); - //txtDataNascimento.setText(t.getData_nascimento()); - ac = adp.getAcidentado(a.getAcidentado_id()); - txtTrabalhador.setText(ac.getNome()); - getSessionBean1().setAcidentado(ac); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - - int estado_documento = a.getEstado().intValue(); - if(estado_documento != ESTADO_IMPRESSAO) - { - butImprimir.setRendered(false); - } - else - { - butGravar.setRendered(false); - } - switch(estado_documento) - { - case ESTADO_SEG: - butEnviar.setText("Enviar a RH"); - gridSiprpView.setRendered(false); - gridAcidentadoView.setRendered(false); - gridDadosAcidenteRh.setRendered(false); - gridDadosAcidenteRhView.setRendered(false); - gridRecomendacoesHS.setRendered(false); - gridRecomendacoesViewHS.setRendered(false); - gridMedidasRH.setRendered(false); - gridMedidasViewRH.setRendered(false); - gridMedico.setRendered(false); - gridMedicoView.setRendered(false); - gridAssinaturas.setRendered(false); - fillSiprp(a); - fillAcidentado(ac); - fillDadosAcidenteSeg(a); - break; - case ESTADO_RH1: - butEnviar.setText("Enviar a HS"); - gridSiprpView.setRendered(false); - gridAcidentadoView.setRendered(false); - //gridDadosAcidenteSeg.setRendered(false); - gridDadosAcidenteRhView.setRendered(false); - gridRecomendacoesHS.setRendered(false); - gridRecomendacoesViewHS.setRendered(false); - gridMedidasRH.setRendered(false); - gridMedidasViewRH.setRendered(false); - gridMedico.setRendered(false); - gridMedicoView.setRendered(false); - gridAssinaturas.setRendered(false); - if(ac != null) - { - fillAcidentado(ac); - } - fillSiprp(a); - fillDadosAcidenteSeg(a); - fillDadosAcidenteRh(a); - break; - case ESTADO_HS: - butEnviar.setText("Enviar a RH"); - //gridSiprpView.setRendered(false); - gridSiprp.setRendered(false); - gridAcidentado.setRendered(false); - //gridAcidentadoView.setRendered(false); - gridDadosAcidenteSeg.setRendered(false); - gridDadosAcidenteRh.setRendered(false); - gridRecomendacoesViewHS.setRendered(false); - gridMedidasRH.setRendered(false); - gridMedidasViewRH.setRendered(false); - gridMedico.setRendered(false); - gridMedicoView.setRendered(false); - gridAssinaturas.setRendered(false); - fillSiprpView(a); - if(ac != null) - { - fillAcidentadoView(ac); - } - fillDadosAcidenteRhView(a); - fillRecomendacoesHs(a); - //gridDadosAcidenteRhView.setRendered(false); - //gridRecomendacoesHS.setRendered(false); - break; - case ESTADO_RH2: - butEnviar.setText("Enviar a Médico"); - - //gridSiprpView.setRendered(false); - gridSiprp.setRendered(false); - gridAcidentado.setRendered(false); - //gridAcidentadoView.setRendered(false); - gridDadosAcidenteSeg.setRendered(false); - gridDadosAcidenteRh.setRendered(false); - gridRecomendacoesHS.setRendered(false); - //gridRecomendacoesViewHS.setRendered(false); - gridMedidasViewRH.setRendered(false); - gridMedico.setRendered(false); - gridMedicoView.setRendered(false); - gridAssinaturas.setRendered(false); - fillSiprpView(a); - if(ac != null) - { - fillAcidentadoView(ac); - } - fillDadosAcidenteRhView(a); - fillRecomendacoesViewHs(a); - fillMedidasRh(a); - break; - case ESTADO_MEDICO: - butEnviar.setText("Enviar a Verificação"); - gridSiprp.setRendered(false); - gridAcidentado.setRendered(false); - gridDadosAcidenteSeg.setRendered(false); - gridDadosAcidenteRh.setRendered(false); - gridRecomendacoesHS.setRendered(false); - gridMedidasRH.setRendered(false); - gridMedicoView.setRendered(false); - gridAssinaturas.setRendered(false); - fillSiprpView(a); - if(ac != null) - { - fillAcidentadoView(ac); - } - fillDadosAcidenteRhView(a); - fillRecomendacoesViewHs(a); - fillMedidasViewRh(a); - fillMedico(a); - //fillMedicoView(a); - break; - case ESTADO_ASSINATURAS: - butEnviar.setText("Enviar a Impressão"); - if(a.getEstado_assinatura().intValue() < ESTADO_ASSINATURA_3) - { - butEnviar.setDisabled(true); - } - else - { - butEnviar.setDisabled(false); - } - - txtAssSeg.setDisabled(true); - txtAssHS.setDisabled(true); - txtAssMed.setDisabled(true); - txtAssRespRh.setDisabled(true); - txtAssRespSeg.setDisabled(true); - - int tipo_utilizador = getSessionBean1().getCurrentUser().getTipo().intValue(); - - switch(tipo_utilizador) - { - case 1: //seguranca - if(a.getEstado_assinatura().intValue() == 1) - { - txtAssRespSeg.setDisabled(false); - } - else - { - txtAssSeg.setDisabled(false); - } - - gridSiprp.setRendered(false); - gridAcidentado.setRendered(false); - gridDadosAcidenteSeg.setRendered(false); - gridDadosAcidenteRh.setRendered(false); - gridRecomendacoesHS.setRendered(false); - gridRecomendacoesViewHS.setRendered(false); - gridMedidasRH.setRendered(false); - gridMedidasViewRH.setRendered(false); - gridMedico.setRendered(false); - gridMedicoView.setRendered(false); - fillSiprpView(a); - if(ac != null) - { - fillAcidentadoView(ac); - } - fillDadosAcidenteRhView(a); - //fillAssinaturaSeg(a); - break; - - case 2: //rh - txtAssRespRh.setDisabled(false); - gridSiprp.setRendered(false); - gridAcidentado.setRendered(false); - gridDadosAcidenteSeg.setRendered(false); - gridDadosAcidenteRh.setRendered(false); - gridRecomendacoesHS.setRendered(false); - gridMedidasRH.setRendered(false); - gridMedico.setRendered(false); - gridMedicoView.setRendered(false); - fillSiprpView(a); - if(ac != null) - { - fillAcidentadoView(ac); - } - fillDadosAcidenteRhView(a); - fillRecomendacoesViewHs(a); - fillMedidasViewRh(a); - break; - - case 3: //hs - txtAssHS.setDisabled(false); - gridSiprp.setRendered(false); - gridAcidentado.setRendered(false); - gridDadosAcidenteSeg.setRendered(false); - gridDadosAcidenteRh.setRendered(false); - gridRecomendacoesHS.setRendered(false); - gridMedidasRH.setRendered(false); - gridMedidasViewRH.setRendered(false); - gridMedico.setRendered(false); - gridMedicoView.setRendered(false); - fillSiprpView(a); - if(ac != null) - { - fillAcidentadoView(ac); - } - fillDadosAcidenteRhView(a); - fillRecomendacoesViewHs(a); - break; - - case 5: //med - txtAssMed.setDisabled(false); - gridSiprp.setRendered(false); - gridAcidentado.setRendered(false); - gridDadosAcidenteSeg.setRendered(false); - gridDadosAcidenteRh.setRendered(false); - gridRecomendacoesHS.setRendered(false); - gridMedidasRH.setRendered(false); - gridMedico.setRendered(false); - fillSiprpView(a); - if(ac != null) - { - fillAcidentadoView(ac); - } - fillDadosAcidenteRhView(a); - fillRecomendacoesViewHs(a); - fillMedidasViewRh(a); - //fillMedico(a); - fillMedicoView(a); - break; - } - break; - case ESTADO_IMPRESSAO: - butEnviar.setText("Enviar para Fecho"); - gridSiprp.setRendered(false); - gridAcidentado.setRendered(false); - gridDadosAcidenteSeg.setRendered(false); - gridDadosAcidenteRh.setRendered(false); - gridRecomendacoesHS.setRendered(false); - gridMedidasRH.setRendered(false); - gridMedico.setRendered(false); - gridAssinaturas.setRendered(false); - fillSiprpView(a); - if(ac != null) - { - fillAcidentadoView(ac); - } - fillDadosAcidenteRhView(a); - fillRecomendacoesViewHs(a); - fillMedidasViewRh(a); - //fillMedico(a); - fillMedicoView(a); - - buildPdf(a); - - break; - case ESTADO_FECHAR: - butEnviar.setText("Fechar"); - gridSiprp.setRendered(false); - gridAcidentado.setRendered(false); - gridDadosAcidenteSeg.setRendered(false); - gridDadosAcidenteRh.setRendered(false); - gridRecomendacoesHS.setRendered(false); - gridMedidasRH.setRendered(false); - gridMedico.setRendered(false); - gridAssinaturas.setRendered(false); - fillSiprpView(a); - if(ac != null) - { - fillAcidentadoView(ac); - } - fillDadosAcidenteRhView(a); - fillRecomendacoesViewHs(a); - fillMedidasViewRh(a); - //fillMedico(a); - fillMedicoView(a); - break; - case ESTADO_CONCLUIDO: - } - - return null; - } - - private void fillSiprp(AnaliseAcidente a) - { - drpTecnicos.setSelected(a.getTecnico_saude_id()); - drpMedicos.setSelected(a.getMedico_id()); - UtilizadoresDataProvider udp = new UtilizadoresDataProvider(); - try - { - Utilizador u = udp.getUtilizador(a.getTecnico_saude_id()); - txtCap.setText(u.getCap()); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - try - { - Utilizador u = udp.getUtilizador(a.getMedico_id()); - txtCedula.setText(u.getNumero_cedula()); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - } - - private void fillSiprpView(AnaliseAcidente a) - { - UtilizadoresDataProvider udp = new UtilizadoresDataProvider(); - try - { - Utilizador u = udp.getUtilizador(a.getTecnico_saude_id()); - stTecnicoNome.setText(Utils.unicodeToHTML(u.getNome())); - txtCap1.setText(u.getCap()); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - try - { - Utilizador u = udp.getUtilizador(a.getMedico_id()); - stMedicoNome.setText(Utils.unicodeToHTML(u.getNome())); - txtCedula1.setText(u.getNumero_cedula()); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - } - - private void fillAcidentado(Acidentado a) - { - txtNomeAcidentado.setText(a.getNome()); - txtDataNascimento.setText(a.getData_nascimento()); - txtBI.setText(a.getBilhete_identidade()); - txtMorada.setText(a.getMorada()); - String cod_postal1 = ""; - String cod_postal2 = ""; - try - { - cod_postal1 = a.getCod_postal().substring(0, 4); - } - catch(Exception ex){} - try - { - cod_postal2 = a.getCod_postal().substring(5, 8); - } - catch(Exception ex){} - - - txtCodPostal1.setText(cod_postal1); - txtCodPostal2.setText(cod_postal2); - txtLocalidade.setText(a.getLocalidade()); - txtContactoTelefonico.setText(a.getContacto_telefonico()); - stDataAdmissao.setText(a.getData_admissao()); - - stFuncao.setText(a.getFuncao()); - if(a.getTurno().matches("m")) - { - rbTurnoManha.setSelected(new Boolean(true)); - } - else if(a.getTurno().matches("t")) - { - rbTurnoTarde.setSelected(new Boolean(true)); - } - else if(a.getTurno().matches("n")) - { - rbTurnoNoite.setSelected(new Boolean(true)); - } - } - - private void fillAcidentadoView(Acidentado a) - { - stNomeAcidentado.setText(a.getNome()); - //stDataNascimento.setText(a.getData_nascimento()); - try - { - java.util.Date ddate = new java.util.Date(a.getData_nascimento().getTime()); - stDataNascimento.setText(utils.Utils.dateToYYYYMMDD(ddate)); - } - catch(Exception ex){}; - stBI.setText(a.getBilhete_identidade()); - stMorada.setText(a.getMorada()); - String cod_postal1 = ""; - String cod_postal2 = ""; - try - { - cod_postal1 = a.getCod_postal().substring(0, 4); - } - catch(Exception ex){} - try - { - cod_postal2 = a.getCod_postal().substring(5, 8); - } - catch(Exception ex){} - - //String cod_postal1 = a.getCod_postal().substring(0, 4); - //String cod_postal2 = a.getCod_postal().substring(5, 8); - String cod_postal = cod_postal1 + "-" + cod_postal2 + " " + a.getLocalidade(); - stCodPostal.setText(cod_postal); - stContactoTelefonico.setText(a.getContacto_telefonico()); - //stDataAdmissao1.setText(a.getData_admissao()); - try - { - java.util.Date ddate = new java.util.Date(a.getData_admissao().getTime()); - stDataAdmissao1.setText(utils.Utils.dateToYYYYMMDD(ddate)); - } - catch(Exception ex){}; - stFuncao1.setText(a.getFuncao()); - String turno_str = ""; - if(a.getTurno().matches("m")) - { - turno_str = "manhã"; - } - else if(a.getTurno().matches("t")) - { - turno_str += "tarde "; - } - else if(a.getTurno().matches("n")) - { - turno_str += "noite"; - } - stTurno.setText(turno_str); - } - - private void fillDadosAcidenteSeg(AnaliseAcidente a) - { - stDataAcidente.setText(a.getData_acidente()); - Calendar cal = Calendar.getInstance(); - - // set the calendar to have your time - cal.setTimeInMillis(a.getHora_acidente().getTime()); - - int hour = cal.get(Calendar.HOUR); - int minutes = cal.get(Calendar.MINUTE); - drpHours.setSelected(new Integer(hour)); - drpMinutes.setSelected(new Integer(minutes)); - txtHorasTurno.setText(a.getHoras_turno().toString()); - txtSeccao.setText(a.getSeccao()); - txtLocal.setText(a.getLocal_trabalho()); - txtTarefa.setText(a.getTarefa()); - txtSubstancias.setText(a.getSubstancias()); - txtSuperior.setText(a.getSuperior_hierarquico()); - txtCondicoes.setText(a.getCondicoes()); - txtTestemunhas.setText(a.getTestemunhas()); - txtCausas.setText(a.getCausas()); - txtDescricao.setText(a.getDescricao()); - txtConclusoes.setText(a.getConclusoes()); - txtAccoes.setText(a.getAccoes()); - - //fill images - ServletContext theApplicationsServletContext = - (ServletContext) this.getExternalContext().getContext(); - String imageFileFolder = theApplicationsServletContext.getRealPath(IMAGE_URL + "/" + getSessionBean1().getCurrentAnalise().getId()); - try - { - File f = new File(imageFileFolder); - - if(f.exists()) - { - File images[] = f.listFiles(); - - for(int i=0;i 0) - { - s = new StaticText(); - s.setId("s103"); - s.setEscape(false); - s.setText(a.getNr_relatorio_acidente_colaborador1()); - pg.getChildren().add(s); - } - } - if(a.getNr_relatorio_acidente_colaborador2() != null) - { - if(a.getNr_relatorio_acidente_colaborador2().intValue() > 0) - { - s = new StaticText(); - s.setId("s104"); - s.setEscape(false); - s.setText("  " + a.getNr_relatorio_acidente_colaborador2()); - pg.getChildren().add(s); - } - - } - if(a.getNr_relatorio_acidente_colaborador3() != null) - { - if(a.getNr_relatorio_acidente_colaborador3().intValue() > 0) - { - s = new StaticText(); - s.setId("s105"); - s.setEscape(false); - s.setText("  " + a.getNr_relatorio_acidente_colaborador3()); - pg.getChildren().add(s); - } - } - if(a.getNr_relatorio_acidente_colaborador4() != null) - { - if(a.getNr_relatorio_acidente_colaborador4().intValue() > 0) - { - s = new StaticText(); - s.setId("s106"); - s.setEscape(false); - s.setText("  " + a.getNr_relatorio_acidente_colaborador4()); - pg.getChildren().add(s); - } - } - grd.getChildren().add(pg); - } - gridColaborador.getChildren().add(grd); - } - - } - else - { - st1.setText("Não se verificaram outras ocorrências/incidências no mesmo posto de trabalho com o colaborador acidentado."); - gridColaborador.getChildren().add(st1); - } - - if(a.getAcidentes_outros_colaboradores().matches("y")) - { - st2.setText("Verificaram-se ocorrências/incidentes semelhantes com outros colaboradores."); - gridColaboradores.getChildren().add(st2); - boolean booShow = false; - boolean booShow1 = false; - boolean booShow2 = false; - if(a.getNr_acidentes_outros_colaboradores() != null) - { - booShow = true; - booShow1 = true; - } - if(a.getNr_relatorio_acidente_outros_colaboradores1() != null || a.getNr_relatorio_acidente_outros_colaboradores2() != null || a.getNr_relatorio_acidente_outros_colaboradores3() != null || a.getNr_relatorio_acidente_outros_colaboradores4() != null) - { - booShow = true; - booShow2 = true; - } - - if(booShow) - { - HtmlPanelGrid grd = new HtmlPanelGrid(); - grd.setId("grdColaboradoresS"); - grd.setColumns(2); - grd.setColumnClasses("gridColLeft15, gridColLeft85"); - if(booShow1) - { - PanelGroup pg = new PanelGroup(); - StaticText s = new StaticText(); - s.setId("s200"); - s.setEscape(false); - s.setText("Total:  "); - pg.getChildren().add(s); - s = new StaticText(); - s.setId("s201"); - s.setEscape(false); - s.setText(a.getNr_acidentes_outros_colaboradores()); - pg.getChildren().add(s); - grd.getChildren().add(pg); - } - if(booShow2) - { - PanelGroup pg = new PanelGroup(); - StaticText s = new StaticText(); - s.setId("s202"); - s.setEscape(false); - s.setText("Relatórios de acidente nº:  "); - pg.getChildren().add(s); - if(a.getNr_relatorio_acidente_outros_colaboradores1() != null) - { - if(a.getNr_relatorio_acidente_outros_colaboradores1().intValue() > 0) - { - s = new StaticText(); - s.setId("s203"); - s.setEscape(false); - s.setText(a.getNr_relatorio_acidente_outros_colaboradores1()); - pg.getChildren().add(s); - } - } - if(a.getNr_relatorio_acidente_outros_colaboradores2() != null) - { - if(a.getNr_relatorio_acidente_outros_colaboradores2().intValue() > 0) - { - s = new StaticText(); - s.setId("s204"); - s.setEscape(false); - s.setText("  " + a.getNr_relatorio_acidente_outros_colaboradores2()); - pg.getChildren().add(s); - } - } - if(a.getNr_relatorio_acidente_outros_colaboradores3() != null) - { - if(a.getNr_relatorio_acidente_outros_colaboradores3().intValue() > 0) - { - s = new StaticText(); - s.setId("s205"); - s.setEscape(false); - s.setText("  " + a.getNr_relatorio_acidente_outros_colaboradores3()); - pg.getChildren().add(s); - } - } - if(a.getNr_relatorio_acidente_outros_colaboradores4() != null) - { - if(a.getNr_relatorio_acidente_outros_colaboradores4().intValue() > 0) - { - s = new StaticText(); - s.setId("s206"); - s.setEscape(false); - s.setText("  " + a.getNr_relatorio_acidente_outros_colaboradores4()); - pg.getChildren().add(s); - } - } - grd.getChildren().add(pg); - } - gridColaboradores.getChildren().add(grd); - } - } - else - { - st2.setText("Não se verificaram ocorrências/incidentes com outros colaboradores."); - gridColaboradores.getChildren().add(st1); - } - } - - private void fillRecomendacoesHs(AnaliseAcidente a) - { - AnalisesDataProvider adp = new AnalisesDataProvider(); - try - { - ArrayList list = adp.getRecomendacoesByAnalise(a.getId()); - ListIterator iter = list.listIterator(); - int seq = 1; - while(iter.hasNext()) - { - Recomendacao r = (Recomendacao) iter.next(); - if(seq==1) - { - txtRecomendacao1.setText(r.getRecomendacao()); - } - else - { - - //int seq = gridRecomendacoes.getChildren().size(); - //seq++; - HtmlPanelGrid grd = new HtmlPanelGrid(); - grd.setId("grd" + seq); - grd.setColumns(3); - grd.setColumnClasses("gridColLeft5, gridColLeft90,gridColLeft5"); - grd.setStyle("width: 100%"); - - StaticText st = new StaticText(); - st.setId("st" + seq); - st.setText(seq + " ."); - st.setStyle("width: 24px"); - grd.getChildren().add(st); - - TextArea ta = new TextArea(); - ta.setId("ta" + seq); - ta.setStyle("height: 24px; width: 98%"); - ta.setText(r.getRecomendacao()); - grd.getChildren().add(ta); - - ImageHyperlink ln = new ImageHyperlink(); - ln.setId("ln" + seq); - ln.setWidth(9); - ln.setHeight(9); - ln.setImageURL("/resources/plus_more.gif"); - MethodBinding mbAction = this.getApplication().createMethodBinding("#{AnaliseAcidenteTrabalho.lnkMoreRec1_action}", null); - ln.setAction(mbAction); - - grd.getChildren().add(ln); - - gridRecomendacoes.getChildren().add(grd); - - } - seq++; - } - } - catch(Exception ex) - { - ex.printStackTrace(); - } - } - - private void fillRecomendacoesViewHs(AnaliseAcidente a) - { - AnalisesDataProvider adp = new AnalisesDataProvider(); - try - { - ArrayList list = adp.getRecomendacoesByAnalise(a.getId()); - ListIterator iter = list.listIterator(); - int seq = 1; - while(iter.hasNext()) - { - Recomendacao r = (Recomendacao) iter.next(); - HtmlPanelGrid grd = new HtmlPanelGrid(); - grd.setId("grdRecomendacaoView" + seq); - grd.setColumns(2); - grd.setColumnClasses("gridColLeft5, gridColLeft95"); - grd.setStyle("width: 100%"); - - StaticText st = new StaticText(); - st.setId("stNrRecomendacaoView" + seq); - st.setText(seq + " ."); - st.setStyle("width: 24px"); - grd.getChildren().add(st); - - st = new StaticText(); - st.setId("stRecomendacaoView" + seq); - st.setText(r.getRecomendacao()); - st.setStyle("width: 24px"); - grd.getChildren().add(st); - - gridRecomendacoesView.getChildren().add(grd); - seq++; - } - } - catch(Exception ex) - { - ex.printStackTrace(); - } - } - - private void fillMedidasRh(AnaliseAcidente a) - { - AnalisesDataProvider adp = new AnalisesDataProvider(); - try - { - ArrayList list = adp.getMedidasByAnalise(a.getId()); - ListIterator iter = list.listIterator(); - int seq = 1; - while(iter.hasNext()) - { - Medida m = (Medida) iter.next(); - if(seq==1) - { - txtMedida1.setText(m.getMedida()); - } - else - { - HtmlPanelGrid grd = new HtmlPanelGrid(); - grd.setId("grdMedida" + seq); - grd.setColumns(3); - grd.setColumnClasses("gridColLeft5, gridColLeft90,gridColLeft5"); - grd.setStyle("width: 100%"); - - StaticText st = new StaticText(); - st.setId("stNrMedida" + seq); - st.setText(seq + " ."); - st.setStyle("width: 24px"); - grd.getChildren().add(st); - - TextArea ta = new TextArea(); - ta.setId("taMedida" + seq); - ta.setStyle("height: 24px; width: 98%"); - ta.setText(m.getMedida()); - grd.getChildren().add(ta); - - ImageHyperlink ln = new ImageHyperlink(); - ln.setId("lnMedidaMore" + seq); - ln.setWidth(9); - ln.setHeight(9); - ln.setImageURL("/resources/plus_more.gif"); - MethodBinding mbAction = this.getApplication().createMethodBinding("#{AnaliseAcidenteTrabalho.lnkMoreMed_action}", null); - ln.setAction(mbAction); - - grd.getChildren().add(ln); - - gridMedidas.getChildren().add(grd); - } - seq++; - } - } - catch(Exception ex) - { - ex.printStackTrace(); - } - } - - private void fillMedidasViewRh(AnaliseAcidente a) - { - AnalisesDataProvider adp = new AnalisesDataProvider(); - try - { - ArrayList list = adp.getMedidasByAnalise(a.getId()); - ListIterator iter = list.listIterator(); - int seq = 1; - while(iter.hasNext()) - { - Medida m = (Medida) iter.next(); - HtmlPanelGrid grd = new HtmlPanelGrid(); - grd.setId("grdMedidaView" + seq); - grd.setColumns(2); - grd.setColumnClasses("gridColLeft5, gridColLeft95"); - grd.setStyle("width: 100%"); - - StaticText st = new StaticText(); - st.setId("stNrMedidaView" + seq); - st.setText(seq + " ."); - st.setStyle("width: 24px"); - grd.getChildren().add(st); - - st = new StaticText(); - st.setId("stMedidaView" + seq); - st.setText(m.getMedida()); - st.setStyle("width: 24px"); - grd.getChildren().add(st); - - gridMedidasView.getChildren().add(grd); - seq++; - } - } - catch(Exception ex) - { - ex.printStackTrace(); - } - } - - private void fillMedico(AnaliseAcidente a) - { - - if(a.getLesao_cabeca().matches("y")) - { - chkCabeca.setSelected( new Boolean(true) ); - } - - if(a.getLesao_pescoco().matches("y")) - { - chkPescoco.setSelected(new Boolean(true)); - } - - if(a.getLesao_tronco().matches("y")) - { - chkTronco.setSelected(new Boolean(true)); - } - - if(a.getLesao_membro_sup_dir().matches("y")) - { - chkMembroSupDir.setSelected(new Boolean(true)); - lblEspecif1.setRendered(true); - txtEspecif1.setRendered(true); - txtEspecif1.setText(a.getEspecif1()); - } - else - { - lblEspecif1.setRendered(false); - txtEspecif1.setRendered(false); - } - - if(a.getLesao_membro_sup_esq().matches("y")) - { - chkMembroSupEsq.setSelected(new Boolean(true)); - lblEspecif2.setRendered(true); - txtEspecif2.setRendered(true); - txtEspecif2.setText(a.getEspecif2()); - } - else - { - lblEspecif2.setRendered(false); - txtEspecif2.setRendered(false); - } - - if(a.getLesao_membro_inf_dir().matches("y")) - { - chkMembroInfDir.setSelected(new Boolean(true)); - lblEspecif3.setRendered(true); - txtEspecif3.setRendered(true); - txtEspecif3.setText(a.getEspecif3()); - } - else - { - lblEspecif3.setRendered(false); - txtEspecif3.setRendered(false); - } - - if(a.getLesao_membro_inf_esq().matches("y")) - { - chkMembroInfEsq.setSelected(new Boolean(true)); - lblEspecif4.setRendered(true); - txtEspecif4.setRendered(true); - txtEspecif4.setText(a.getEspecif4()); - } - else - { - lblEspecif4.setRendered(false); - txtEspecif4.setRendered(false); - } - - txtTipoLesao.setText(a.getTipo_lesao()); - if(a.getTipo_incapacidade().matches("n")) - { - rbIncapacidadeNone.setSelected(new Boolean(true)); - } - else if(a.getTipo_incapacidade().matches("t")) - { - rbIncapacidadeTemp.setSelected(new Boolean(true)); - } - else if(a.getTipo_incapacidade().matches("p")) - { - rbIncapacidadePerm.setSelected(new Boolean(true)); - } - - txtCoefIncapacidade.setText(a.getCoef_incapacidade()); - - if(a.getData_aval_incapacidade() != null) - { - java.util.Date ddate = new java.util.Date(a.getData_aval_incapacidade().getTime()); - calAvaliacaoIncap.setValue(ddate); - } - - if(a.getData_rev_incapacidade() != null) - { - java.util.Date ddate = new java.util.Date(a.getData_rev_incapacidade().getTime()); - calRevisaoIncap.setValue(ddate); - } - - if(a.getPeriodo_incapacidade_de() != null) - { - java.util.Date ddate = new java.util.Date(a.getPeriodo_incapacidade_de().getTime()); - calPeridoIncapDe.setValue(ddate); - } - - if(a.getPeriodo_incapacidade_a() != null) - { - java.util.Date ddate = new java.util.Date(a.getPeriodo_incapacidade_a().getTime()); - calPeriodoIncapA.setValue(ddate); - } - - if(a.getImg_flexao().matches("y")) - { - chkImgFlexao.setSelected(new Boolean(true)); - } - - if(a.getImg_rot1().matches("y")) - { - chkImgRot1.setSelected(new Boolean(true)); - } - - if(a.getImg_rot2().matches("y")) - { - chkImgRot2.setSelected(new Boolean(true)); - } - - if(a.getImg_ext1().matches("y")) - { - chkImgExt1.setSelected(new Boolean(true)); - } - - if(a.getImg_ext2().matches("y")) - { - chkImgExt2.setSelected(new Boolean(true)); - } - - if(a.getImg_cab1().matches("y")) - { - chkImgCab1.setSelected(new Boolean(true)); - } - - if(a.getImg_cab2().matches("y")) - { - chkImgCab2.setSelected(new Boolean(true)); - } - - if(a.getImg_cab3().matches("y")) - { - chkImgCab3.setSelected(new Boolean(true)); - } - - if(a.getImg_cab4().matches("y")) - { - chkImgCab4.setSelected(new Boolean(true)); - } - - if(a.getImg_ma1().matches("y")) - { - chkImgMa1.setSelected(new Boolean(true)); - } - - if(a.getImg_ma2().matches("y")) - { - chkImgMa2.setSelected(new Boolean(true)); - } - - if(a.getImg_ma3().matches("y")) - { - chkImgMa3.setSelected(new Boolean(true)); - } - - if(a.getImg_ma4().matches("y")) - { - chkImgMa4.setSelected(new Boolean(true)); - } - - if(a.getImg_ma5().matches("y")) - { - chkImgMa5.setSelected(new Boolean(true)); - } - - if(a.getImg_ma6().matches("y")) - { - chkImgMa6.setSelected(new Boolean(true)); - } - - if(a.getImg_ma7().matches("y")) - { - chkImgMa7.setSelected(new Boolean(true)); - } - - if(a.getImg_ma8().matches("y")) - { - chkImgMa8.setSelected(new Boolean(true)); - } - - if(a.getImg_ma9().matches("y")) - { - chkImgMa9.setSelected(new Boolean(true)); - } - - if(a.getImg_ma10().matches("y")) - { - chkImgMa10.setSelected(new Boolean(true)); - } - - if(a.getRestricao_carga() != null) - { - if(a.getRestricao_carga().intValue() > 0) - { - chkRestricaoCargas.setSelected(new Boolean(true)); - rbKgs2.setRendered(true); - rbKgs5.setRendered(true); - rbKgs10.setRendered(true); - rbKgs15.setRendered(true); - rbKgsOutro.setRendered(true); - txtKgs.setRendered(true); - stKgs2.setRendered(true); - stKgs5.setRendered(true); - stKgs10.setRendered(true); - stKgs15.setRendered(true); - stKgsOutro.setRendered(true); - stKg.setRendered(true); - int carga = a.getRestricao_carga().intValue(); - switch(carga) - { - case 2: - rbKgs2.setSelected(new Boolean(true)); - break; - case 5: - rbKgs5.setSelected(new Boolean(true)); - break; - case 10: - rbKgs10.setSelected(new Boolean(true)); - break; - case 15: - rbKgs15.setSelected(new Boolean(true)); - break; - default: - rbKgsOutro.setSelected(new Boolean(true)); - txtKgs.setText(a.getRestricao_carga().toString()); - break; - } - } - else - { - chkRestricaoCargas.setSelected(new Boolean(false)); - rbKgs2.setRendered(false); - rbKgs5.setRendered(false); - rbKgs10.setRendered(false); - rbKgs15.setRendered(false); - rbKgsOutro.setRendered(false); - txtKgs.setRendered(false); - stKgs2.setRendered(false); - stKgs5.setRendered(false); - stKgs10.setRendered(false); - stKgs15.setRendered(false); - stKgsOutro.setRendered(false); - stKg.setRendered(false); - } - } - else - { - chkRestricaoCargas.setSelected(new Boolean(false)); - rbKgs2.setRendered(false); - rbKgs5.setRendered(false); - rbKgs10.setRendered(false); - rbKgs15.setRendered(false); - rbKgsOutro.setRendered(false); - txtKgs.setRendered(false); - stKgs2.setRendered(false); - stKgs5.setRendered(false); - stKgs10.setRendered(false); - stKgs15.setRendered(false); - stKgsOutro.setRendered(false); - stKg.setRendered(false); - } - - if(a.getRestricao_motricidade().matches("y")) - { - chkRestricaoMotricidade.setSelected(new Boolean(true)); - } - - if(a.getRestricao_conducao().matches("y")) - { - chkRestricaoConducao.setSelected(new Boolean(true)); - } - - if(a.getRestricao_vibracoes().matches("y")) - { - chkRestricaoVibracoes.setSelected(new Boolean(true)); - } - - if(a.getRestricao_outras() != null) - { - if(a.getRestricao_outras().trim().length() > 0) - { - chkRestricaoOutras.setSelected(new Boolean(true)); - txtRestricaoOutras.setText(a.getRestricao_outras()); - } - } - - txtObservacoes.setText(a.getMed_observ()); - - } - - private void fillMedicoView(AnaliseAcidente a) - { - PanelGroup pg = null; - StaticText st = null; - HtmlPanelGrid grd = null; - ImageComponent img = null; - //LESAO : - - if(a.getLesao_cabeca().matches("y")) - { - st = new StaticText(); - st.setId("stLesaoCabeca"); - st.setEscape(false); - st.setText("Cabeça"); - gridLesao.getChildren().add(st); - } - - if(a.getLesao_pescoco().matches("y")) - { - st = new StaticText(); - st.setId("stLesaoPescoco"); - st.setEscape(false); - st.setText("Pescoço"); - gridLesao.getChildren().add(st); - } - - if(a.getLesao_tronco().matches("y")) - { - st = new StaticText(); - st.setId("stLesaoTronco"); - st.setEscape(false); - st.setText("Tronco"); - gridLesao.getChildren().add(st); - } - - grd = new HtmlPanelGrid(); - grd.setId("gridLesaoMembros"); - grd.setColumns(2); - grd.setColumnClasses("gridColLeft"); - if(a.getLesao_membro_sup_dir().matches("y")) - { - st = new StaticText(); - st.setId("stLesaoMembroSupDir"); - st.setEscape(false); - st.setText("Membro Superior Direito"); - grd.getChildren().add(st); - st = new StaticText(); - st.setId("stEspecif1"); - st.setEscape(false); - st.setText(a.getEspecif1()); - grd.getChildren().add(st); - } - - if(a.getLesao_membro_sup_esq().matches("y")) - { - st = new StaticText(); - st.setId("stLesaoMembroSupEsq"); - st.setEscape(false); - st.setText("Membro Superior Esquerdo"); - grd.getChildren().add(st); - st = new StaticText(); - st.setId("stEspecif2"); - st.setEscape(false); - st.setText(a.getEspecif2()); - grd.getChildren().add(st); - } - - if(a.getLesao_membro_inf_dir().matches("y")) - { - st = new StaticText(); - st.setId("stLesaoMembroInfDir"); - st.setEscape(false); - st.setText("Membro Inferior Direito"); - grd.getChildren().add(st); - st = new StaticText(); - st.setId("stEspecif3"); - st.setEscape(false); - st.setText(a.getEspecif3()); - grd.getChildren().add(st); - } - - if(a.getLesao_membro_inf_esq().matches("y")) - { - st = new StaticText(); - st.setId("stLesaoMembroInfEsq"); - st.setEscape(false); - st.setText("Membro Inferior Esquerdo"); - grd.getChildren().add(st); - st = new StaticText(); - st.setId("stEspecif4"); - st.setEscape(false); - st.setText(a.getEspecif4()); - grd.getChildren().add(st); - } - if(grd.getChildren().size() > 0) - { - gridLesao.getChildren().add(grd); - } - - if(a.getTipo_lesao().trim().length() > 0 ) - { - pg = new PanelGroup(); - pg.setId("pgTipoLesao"); - st = new StaticText(); - st.setId("stTipoLesaoLbl"); - st.setEscape(false); - st.setText("Tipo de lesão:   "); - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stTipoLesao"); - st.setEscape(false); - st.setText(a.getTipo_lesao()); - pg.getChildren().add(st); - gridLesao.getChildren().add(pg); - } - - //INCAPACIDADE : - pg = new PanelGroup(); - pg.setId("pgTipoIncapacidade"); - st = new StaticText(); - st.setId("stTipoIncapacidadeLbl1"); - st.setEscape(false); - st.setText("Tipo de incapacidade:  "); - if(a.getTipo_incapacidade().matches("t")) - { - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stTipoIncapacidade"); - st.setEscape(false); - st.setText("Temporária  "); - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stTipoIncapacidadeLbl2"); - st.setEscape(false); - st.setText("Coeficiente de incapacidade:  "); - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stCoefIncapacidade"); - st.setEscape(false); - st.setText(a.getCoef_incapacidade().toString() + "%"); - pg.getChildren().add(st); - } - else if(a.getTipo_incapacidade().matches("p")) - { - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stTipoIncapacidade"); - st.setEscape(false); - st.setText("Permanente  "); - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stTipoIncapacidadeLbl2"); - st.setEscape(false); - st.setText("Coeficiente de incapacidade:  "); - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stCoefIncapacidade"); - st.setEscape(false); - st.setText(a.getCoef_incapacidade().toString() + "%"); - pg.getChildren().add(st); - } - - if(pg.getChildren().size() > 0) - { - gridIncapacidade2.getChildren().add(pg); - } - - pg = new PanelGroup(); - pg.setId("pgAvaliacaoIncapacidade"); - st = new StaticText(); - st.setId("stDataAvalIncapacidadeLbl1"); - st.setEscape(false); - st.setText("Avaliação de incapacidade realizada em  "); - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stDataAvalIncapacidade"); - st.setEscape(false); - //st.setText(a.getData_aval_incapacidade()); - try - { - java.util.Date ddate = new java.util.Date(a.getData_aval_incapacidade().getTime()); - st.setText(utils.Utils.dateToYYYYMMDD(ddate)); - } - catch(Exception ex){}; - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stDataRevIncapacidadeLbl1"); - st.setEscape(false); - st.setText("Revisão de incapacidade em  "); - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stDataRevIncapacidade"); - st.setEscape(false); - //st.setText(a.getData_rev_incapacidade()); - try - { - java.util.Date ddate = new java.util.Date(a.getData_rev_incapacidade().getTime()); - st.setText(utils.Utils.dateToYYYYMMDD(ddate)); - } - catch(Exception ex){}; - pg.getChildren().add(st); - gridIncapacidade2.getChildren().add(pg); - - pg = new PanelGroup(); - pg.setId("pgPeriodoIncapacidade"); - st = new StaticText(); - st.setId("stPeriodoIncapacidadeLbl1"); - st.setEscape(false); - st.setText("Período de incapacidade temporária de  "); - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stPeriodoIncapacidadeDe"); - st.setEscape(false); - //st.setText(a.getPeriodo_incapacidade_de()); - try - { - java.util.Date ddate = new java.util.Date(a.getPeriodo_incapacidade_de().getTime()); - st.setText(utils.Utils.dateToYYYYMMDD(ddate)); - } - catch(Exception ex){}; - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stPeriodoIncapacidadeLbl2"); - st.setEscape(false); - st.setText("  a  "); - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stPeriodoIncapacidadeA"); - st.setEscape(false); - //st.setText(a.getPeriodo_incapacidade_a()); - try - { - java.util.Date ddate = new java.util.Date(a.getPeriodo_incapacidade_a().getTime()); - st.setText(utils.Utils.dateToYYYYMMDD(ddate)); - } - catch(Exception ex){}; - pg.getChildren().add(st); - gridIncapacidade2.getChildren().add(pg); - - //RESTRICOES - - if(a.getImg_flexao().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgFlexao"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - pg = new PanelGroup(); - pg.setId("pgImgFlexao"); - img = new ImageComponent(); - img.setId("imgRestricoes1000"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/fle1.gif"); - pg.getChildren().add(img); - img = new ImageComponent(); - img.setId("imgRestricoes1001"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/fle2.gif"); - pg.getChildren().add(img); - img = new ImageComponent(); - img.setId("imgRestricoes1002"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/fle3.gif"); - pg.getChildren().add(img); - img = new ImageComponent(); - img.setId("imgRestricoes1003"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/fle4.gif"); - pg.getChildren().add(img); - grd.getChildren().add(pg); - st = new StaticText(); - st.setId("stImgRestricaoLbl1"); - st.setEscape(false); - st.setText("Flexão"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_rot1().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgRot1"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes1005"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/rot1.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl2"); - st.setEscape(false); - st.setText("Flexão Lateral"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_rot2().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgRot2"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes1006"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/rot2.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl3"); - st.setEscape(false); - st.setText("Rotação"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_ext1().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgExt1"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes1007"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ext1.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl4"); - st.setEscape(false); - st.setText("Extensão"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_ext2().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgExt2"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - pg = new PanelGroup(); - pg.setId("pgImgExt2"); - img = new ImageComponent(); - img.setId("imgRestricoes1008"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ext2.gif"); - pg.getChildren().add(img); - img = new ImageComponent(); - img.setId("imgRestricoes1009"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ext3.gif"); - pg.getChildren().add(img); - img = new ImageComponent(); - img.setId("imgRestricoes1010"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ext4.gif"); - pg.getChildren().add(img); - grd.getChildren().add(pg); - st = new StaticText(); - st.setId("stImgRestricaoLbl5"); - st.setEscape(false); - st.setText("Flexão/Extensão Lateral + Rotação"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_cab1().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgCab1"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10011"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ca1.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl6"); - st.setEscape(false); - st.setText("Flexão"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_cab2().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgCab2"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10012"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ca2.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl7"); - st.setEscape(false); - st.setText("Extensão"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_cab3().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgCab3"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10013"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ca3.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl8"); - st.setEscape(false); - st.setText("Flexão Lateral"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_cab4().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgCab4"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10014"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ca4.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl9"); - st.setEscape(false); - st.setText("Rotação"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_ma1().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgMa1"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10015"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ma1.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl10"); - st.setEscape(false); - st.setText("Poronação"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_ma2().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgMa2"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10016"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ma2.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl11"); - st.setEscape(false); - st.setText("Supinação"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_ma3().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgMa3"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10017"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ma3.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl12"); - st.setEscape(false); - st.setText("Flexão"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_ma4().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgMa4"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10018"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ma4.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl13"); - st.setEscape(false); - st.setText("Extensão"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_ma5().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgMa5"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10019"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ma5.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl14"); - st.setEscape(false); - st.setText("Desvio Ulnar"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_ma6().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgMa6"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10020"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ma6.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl15"); - st.setEscape(false); - st.setText("Desvio Radial"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_ma7().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgMa7"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10021"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ma7.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl16"); - st.setEscape(false); - st.setText("Pinça Digital"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_ma8().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgMa8"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10022"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ma8.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl17"); - st.setEscape(false); - st.setText("Segurar objectos entre os dedos"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_ma9().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgMa9"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10023"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ma9.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl18"); - st.setEscape(false); - st.setText("Dedos em extensão"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_ma10().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgMa10"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10024"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ma10.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl19"); - st.setEscape(false); - st.setText("Pega palmar"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getRestricao_carga() != null) - { - if(a.getRestricao_carga().intValue() > 0) - { - pg = new PanelGroup(); - st = new StaticText(); - st.setId("stRestricaoCargaLbl"); - st.setEscape(false); - st.setText("Movimentação e manipulação de cargas com mais de  "); - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stRestricaoCargaKgs"); - st.setEscape(false); - st.setText(a.getRestricao_carga().toString()); - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stRestricaoCargaLbl1"); - st.setEscape(false); - st.setText("Kg"); - pg.getChildren().add(st); - gridOutrasRestricoes.getChildren().add(pg); - } - - if(a.getRestricao_motricidade().matches("y")) - { - st = new StaticText(); - st.setId("stRestricaoMotricidadeLbl"); - st.setEscape(false); - st.setText("Operações que requeiram motricidade fina."); - gridOutrasRestricoes.getChildren().add(st); - } - - if(a.getRestricao_conducao().matches("y")) - { - st = new StaticText(); - st.setId("stRestricaoConducaoLbl"); - st.setEscape(false); - st.setText("Condução/interacção com veículos ou outros equipamentos."); - gridOutrasRestricoes.getChildren().add(st); - } - - if(a.getRestricao_vibracoes().matches("y")) - { - st = new StaticText(); - st.setId("stRestricaoVibracoesLbl"); - st.setEscape(false); - st.setText("Utilizaçõo de equipamentos/ferramentas que impliquem exposição a vibrações ou impactos."); - gridOutrasRestricoes.getChildren().add(st); - } - - if(a.getRestricao_outras().trim().length() > 0) - { - st = new StaticText(); - st.setId("stRestricaoOutras"); - st.setEscape(false); - st.setText(a.getRestricao_outras()); - gridOutrasRestricoes.getChildren().add(st); - } - - if(a.getMed_observ().trim().length() > 0) - { - stObservacoes.setText(a.getMed_observ()); - } - } - - } -// private String getPageFrom(String referer) -// { -// String pageFrom = referer.substring(referer.lastIndexOf("/")+1); -// return pageFrom; -// } - - public String lnkNome_action() { - // TODO: Replace with your code - RowKey rk = tableRowGroup1.getRowKey(); - int k = Integer.parseInt(rk.getRowId()); - TrabalhadoresListDataProvider provider = (TrabalhadoresListDataProvider) tableRowGroup1.getSourceData(); - ArrayList list = (ArrayList) provider.getList(); - Trabalhador t = (Trabalhador)list.get(k); - txtTrabalhador.setText(t.getNome()); - txtNomeAcidentado.setText(t.getNome()); - txtDataNascimento.setText(t.getData_nascimento()); - Acidentado a = new Acidentado(); - a.setTrabalhador_id(t.getId()); - a.setData_nascimento(t.getData_nascimento()); - a.setNome(t.getNome()); - a.setFuncao(utils.Utils.unicodeToHTML(t.getFuncao())); - a.setData_admissao(t.getData_admissao()); - getSessionBean1().setAcidentado(a); - if(getSessionBean1().getCurrentAnalise() != null) // new analise) - { - gridTrabalhadores.setRendered(false); - } - - return null; - } - - public String lnkDataNascimento_action() { - // TODO: Replace with your code - RowKey rk = tableRowGroup1.getRowKey(); - int k = Integer.parseInt(rk.getRowId()); - TrabalhadoresListDataProvider provider = (TrabalhadoresListDataProvider) tableRowGroup1.getSourceData(); - ArrayList list = (ArrayList) provider.getList(); - Trabalhador t = (Trabalhador)list.get(k); - txtTrabalhador.setText(t.getNome()); - txtNomeAcidentado.setText(t.getNome()); - txtDataNascimento.setText(t.getData_nascimento()); - Acidentado a = new Acidentado(); - a.setTrabalhador_id(t.getId()); - a.setData_nascimento(t.getData_nascimento()); - a.setNome(t.getNome()); - a.setFuncao(t.getFuncao()); - a.setData_admissao(t.getData_admissao()); - getSessionBean1().setAcidentado(a); - if(getSessionBean1().getCurrentAnalise() != null) // new analise) - { - gridTrabalhadores.setRendered(false); - } - return null; - } - - public String butImagem_action() { - // TODO: Process the button click action. Return value is a navigation - // case name where null will return to the same page. - - savePageState(); - return "load_image"; - } - - private void fillImages() - { -// String imageName = getSessionBean1().getImageName(); -// if(imageName != null) -// { -// ImageComponent newImg = new ImageComponent(); -// newImg.setUrl("/resources/imagens/" + imageName); -// System.out.println("IMAGE URL : " + "/resources/imagens/" + imageName); -// newImg.setRendered(true); -// gridImages.getChildren().add(newImg); -// System.out.println("HERE"); -// } - - ServletContext theApplicationsServletContext = - (ServletContext) this.getExternalContext().getContext(); - String imageFileFolder = theApplicationsServletContext.getRealPath(IMAGE_URL + "/tmp" + getSessionBean1().getCurrentUser().getLogin()); - try - { - File f = new File(imageFileFolder); - - if(f.exists()) - { - File files[] = f.listFiles(); - - for(int i=0;i 0) - { - a.setBilhete_identidade(bi); - } - } - - a.setMorada(""); - if(txtMorada.getText() != null) - { - String morada = (String) txtMorada.getText(); - if(morada.trim().length() > 0) - { - a.setMorada( morada ); - } - } - - a.setCod_postal(""); - String cod_postal = ""; - if(txtCodPostal1.getText() != null ) - { - String cod_postal1 = (String) txtCodPostal1.getText(); - String cod_postal2 = ""; - if(txtCodPostal2.getText() != null) - { - cod_postal2 = (String) txtCodPostal2.getText(); - } - if(cod_postal1.trim().length() > 0) - { - cod_postal =(String) txtCodPostal1.getText() + "-" + (String) txtCodPostal2.getText(); - a.setCod_postal( cod_postal); - } - - } - - a.setLocalidade(""); - if(txtLocalidade.getText() != null) - { - String localidade = (String) txtLocalidade.getText(); - if(localidade.trim().length() > 0) - { - a.setLocalidade( localidade); - } - } - - a.setContacto_telefonico(""); - if(txtContactoTelefonico.getText() != null) - { - String contacto_telefonico = (String) txtContactoTelefonico.getText(); - if(contacto_telefonico.trim().length() > 0) - { - a.setContacto_telefonico( contacto_telefonico ); - } - } - - - a.setTurno("m"); - if(rbTurnoManha.getSelected() != null ) - { - Boolean selected = (Boolean) rbTurnoManha.getSelected(); - if(selected.equals(new Boolean(true))) - { - a.setTurno("m"); - } - } - else if(rbTurnoTarde.getSelected() != null) - { - Boolean selected = (Boolean) rbTurnoTarde.getSelected(); - if(selected.equals(new Boolean(true))) - { - a.setTurno("t"); - } - } - else if(rbTurnoNoite.getSelected() != null) - { - Boolean selected = (Boolean) rbTurnoNoite.getSelected(); - if(selected.equals(new Boolean(true))) - { - a.setTurno("n"); - } - } - - return a; - } - - private AnaliseAcidente fillAnaliseFields() - { - int estado = 0; - AnaliseAcidente a = null; - //fill analise fields - if(getSessionBean1().getCurrentAnalise() == null) //null - { - a = new AnaliseAcidente(); - a.setEspecif1(""); - a.setEspecif2(""); - a.setEspecif3(""); - a.setEspecif4(""); - a.setRestricao_outras(""); - a.setTipo_lesao(""); - a.setMed_observ(""); - estado = ESTADO_SEG; - a.setEstado(new Integer(estado)); - } - else - { - a = getSessionBean1().getCurrentAnalise(); - estado = a.getEstado().intValue(); - } - - switch(estado) - { - case ESTADO_SEG: - a = fillAnaliseFieldsSeg(a); - break; - case ESTADO_RH1: - a = fillAnaliseFieldsSeg(a); - a = fillAnaliseFieldsRH1(a); - break; - case ESTADO_HS: - //a = fillAnaliseFieldsHS(a); - break; - case ESTADO_RH2: - //a = fillAnaliseFieldsRH2(a); - break; - case ESTADO_MEDICO: - a = fillAnaliseFieldsMedico(a); - break; - case ESTADO_ASSINATURAS: - a = fillAnaliseAssinaturas(a); - break; - } - - return a; - } - - private AnaliseAcidente fillAnaliseFieldsSeg(AnaliseAcidente a) - { - java.util.Date today = - new java.util.Date(); - java.sql.Date sqlToday = - new java.sql.Date(today.getTime()); - a.setData_acidente(sqlToday); - - String hh = drpHours.getSelected().toString(); - String mm = drpMinutes.getSelected().toString(); - SimpleDateFormat formatter = new SimpleDateFormat ( "hh:mm" ); - try - { - Time horaAcidente = new Time(formatter.parse( hh + ":" + mm ).getTime()); - a.setHora_acidente(horaAcidente); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - - - if(getSessionBean1().getCurrentAnalise() == null) // new - { - a.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id()); - a.setEstabelecimento_id(getSessionBean1().getCurrentUser().getEstabelecimento_id()); - } - - Integer medico_id = (Integer) drpMedicos.getSelected(); - Integer tecnico_id = (Integer) drpTecnicos.getSelected(); - if(medico_id.intValue() > 0) - { - a.setMedico_id(medico_id); - } - - if(tecnico_id.intValue() > 0) - { - a.setTecnico_saude_id(tecnico_id); - } - - //if(getSessionBean1().getCurrentAnalise() == null) // new - //{ - // a.setTrabalhador_id(getSessionBean1().getAcidentado().getId()); - //} - -// if(getSessionBean1().getCurrentAnalise() == null) // new -// { -// Integer horas_turno = null; -// try -// { -// String horas_turno_str = (String) txtHorasTurno.getText(); -// horas_turno = new Integer( Integer.parseInt(horas_turno_str) ); -// } -// catch(Exception ex) -// { -// ex.printStackTrace(); -// } -// a.setHoras_turno(horas_turno); -// } -// else // edit -// { -// a.setHoras_turno((Integer )txtHorasTurno.getText()); -// } - - Integer horas_turno = null; - try - { - String horas_turno_str = (String) txtHorasTurno.getText(); - horas_turno = new Integer( Integer.parseInt(horas_turno_str) ); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - a.setHoras_turno(horas_turno); - - try - { - if(txtSeccao.getText() != null) - { - a.setSeccao( (String) txtSeccao.getText() ); - } - else - { - a.setSeccao(""); - } - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - try - { - if(txtLocal.getText() != null) - { - a.setLocal_trabalho( (String) txtLocal.getText() ); - } - else - { - a.setLocal_trabalho(""); - } - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - try - { - if(txtTarefa.getText() != null) - { - a.setTarefa( (String) txtTarefa.getText() ); - } - else - { - a.setTarefa(""); - } - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - try - { - if(txtSubstancias.getText() != null) - { - a.setSubstancias( (String) txtSubstancias.getText() ); - } - else - { - a.setSubstancias(""); - } - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - try - { - if(txtSuperior.getText() != null) - { - a.setSuperior_hierarquico( (String) txtSuperior.getText() ); - } - else - { - a.setSuperior_hierarquico(""); - } - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - try - { - if(txtCondicoes.getText() != null) - { - a.setCondicoes( (String) txtCondicoes.getText() ); - } - else - { - a.setCondicoes(""); - } - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - try - { - if(txtTestemunhas.getText() != null) - { - a.setTestemunhas( (String) txtTestemunhas.getText() ); - } - else - { - a.setTestemunhas(""); - } - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - try - { - if(txtCausas.getText() != null) - { - a.setCausas( (String) txtCausas.getText() ); - } - else - { - a.setCausas(""); - } - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - try - { - if(txtDescricao.getText() != null) - { - a.setDescricao( (String) txtDescricao.getText() ); - } - else - { - a.setDescricao(""); - } - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - try - { - if(txtConclusoes.getText() != null) - { - a.setConclusoes( (String) txtConclusoes.getText() ); - } - else - { - a.setConclusoes(""); - } - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - try - { - if(txtAccoes.getText() != null) - { - a.setAccoes( (String) txtAccoes.getText() ); - } - else - { - a.setAccoes(""); - } - } - catch(Exception ex) - { - ex.printStackTrace(); - } - return a; - } - - private AnaliseAcidente fillAnaliseFieldsRH1(AnaliseAcidente a) - { - boolean booFormacaoSHST = false; - if(rbFormacaoSHSTY.getSelected() != null) - { - Boolean f = (Boolean) rbFormacaoSHSTY.getSelected(); - if(f.equals(new Boolean(true))) - { - a.setFormacao_shst("y"); - booFormacaoSHST = true; - } - } - if(!booFormacaoSHST) - { - if(rbFormacaoSHSTN.getSelected() != null) - { - Boolean f = (Boolean) rbFormacaoSHSTN.getSelected(); - if(f.equals(new Boolean(true))) - { - a.setFormacao_shst("n"); - a.setFormacao_shst_nao_porque(""); - if(txtFormacaoSHSTNWhy.getText() != null) - { - String s = (String) txtFormacaoSHSTNWhy.getText(); - if(s.trim().length() > 0 ) - { - a.setFormacao_shst_nao_porque( s ); - } - } - } - } - } - - boolean booAcidentesColaborador = false; - a.setOutros_acidentes_com_colaborador("n"); - if(rbAcidentesColaboradorY.getSelected() != null) - { - Boolean f = (Boolean) rbAcidentesColaboradorY.getSelected(); - if(f.equals(new Boolean(true))) - { - a.setOutros_acidentes_com_colaborador("y"); - booAcidentesColaborador = true; - if(txtNrAcidentesColaborador.getText() != null) - { - String nr_str = (String) txtNrAcidentesColaborador.getText(); - if(nr_str.trim().length() > 0) - { - try - { - Integer nr = new Integer(Integer.parseInt(nr_str)); - a.setNr_acidentes_com_colaborador(nr); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - } - } - - if(txtNrRelatorioAcidentesColaborador1.getText() != null) - { - String nr_str = (String) txtNrRelatorioAcidentesColaborador1.getText(); - if(nr_str.trim().length() > 0) - { - try - { - Integer nr = new Integer(Integer.parseInt(nr_str)); - a.setNr_relatorio_acidente_colaborador1(nr); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - } - } - if(txtNrRelatorioAcidentesColaborador2.getText() != null) - { - String nr_str = (String) txtNrRelatorioAcidentesColaborador2.getText(); - if(nr_str.trim().length() > 0) - { - try - { - Integer nr = new Integer(Integer.parseInt(nr_str)); - a.setNr_relatorio_acidente_colaborador2(nr); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - } - } - if(txtNrRelatorioAcidentesColaborador3.getText() != null) - { - String nr_str = (String) txtNrRelatorioAcidentesColaborador3.getText(); - if(nr_str.trim().length() > 0) - { - try - { - Integer nr = new Integer(Integer.parseInt(nr_str)); - a.setNr_relatorio_acidente_colaborador3(nr); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - } - } - if(txtNrRelatorioAcidentesColaborador4.getText() != null) - { - String nr_str = (String) txtNrRelatorioAcidentesColaborador4.getText(); - if(nr_str.trim().length() > 0) - { - try - { - Integer nr = new Integer(Integer.parseInt(nr_str)); - a.setNr_relatorio_acidente_colaborador4(nr); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - } - } - } - } - - if(!booAcidentesColaborador) - { - if(rbAcidentesColaboradorN.getSelected() != null) - { - Boolean f = (Boolean) rbAcidentesColaboradorN.getSelected(); - if(f.equals(new Boolean(true))) - { - a.setOutros_acidentes_com_colaborador("n"); - } - } - } - - boolean booAcidentesColaboradores = false; - if(rbAcidentesColaboradoresY.getSelected() != null) - { - Boolean f = (Boolean) rbAcidentesColaboradoresY.getSelected(); - if(f.equals(new Boolean(true))) - { - a.setAcidentes_outros_colaboradores("y"); - booAcidentesColaboradores = true; - if(txtNrAcidentesColaboradores.getText() != null) - { - String nr_str = (String) txtNrAcidentesColaboradores.getText(); - if(nr_str.trim().length() > 0) - { - try - { - Integer nr = new Integer(Integer.parseInt(nr_str)); - a.setNr_acidentes_outros_colaboradores(nr); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - } - } - - if(txtNrRelatorioAcidentesColaboradores1.getText() != null) - { - String nr_str = (String) txtNrRelatorioAcidentesColaboradores1.getText(); - if(nr_str.trim().length() > 0) - { - try - { - Integer nr = new Integer(Integer.parseInt(nr_str)); - a.setNr_relatorio_acidente_outros_colaboradores1(nr); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - } - } - if(txtNrRelatorioAcidentesColaboradores2.getText() != null) - { - String nr_str = (String) txtNrRelatorioAcidentesColaboradores2.getText(); - if(nr_str.trim().length() > 0) - { - try - { - Integer nr = new Integer(Integer.parseInt(nr_str)); - a.setNr_relatorio_acidente_outros_colaboradores2(nr); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - } - } - if(txtNrRelatorioAcidentesColaboradores3.getText() != null) - { - String nr_str = (String) txtNrRelatorioAcidentesColaboradores3.getText(); - if(nr_str.trim().length() > 0) - { - try - { - Integer nr = new Integer(Integer.parseInt(nr_str)); - a.setNr_relatorio_acidente_outros_colaboradores3(nr); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - } - } - if(txtNrRelatorioAcidentesColaboradores4.getText() != null) - { - String nr_str = (String) txtNrRelatorioAcidentesColaboradores4.getText(); - if(nr_str.trim().length() > 0) - { - try - { - Integer nr = new Integer(Integer.parseInt(nr_str)); - a.setNr_relatorio_acidente_outros_colaboradores4(nr); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - } - } - - } - } - - if(!booAcidentesColaboradores) - { - if(rbAcidentesColaboradoresN.getSelected() != null) - { - Boolean f = (Boolean) rbAcidentesColaboradoresN.getSelected(); - if(f.equals(new Boolean(true))) - { - a.setAcidentes_outros_colaboradores("y"); - } - } - } - - return a; - } - - private ArrayList fillAnaliseRecomendacoesHs(AnaliseAcidente a) - { - ArrayList list = new ArrayList(); - ListIterator iter = gridRecomendacoes.getChildren().listIterator(); - while(iter.hasNext()) - { - HtmlPanelGrid grd = (HtmlPanelGrid)iter.next(); - TextArea ta = (TextArea) grd.getChildren().get(1); - if(ta.getText() != null ) - { - String txt = (String) ta.getText(); - if(txt.trim().length() > 0) - { - Recomendacao r = new Recomendacao(); - r.setAnalise_id(a.getId()); - r.setRecomendacao(txt); - list.add(r); - } - } - } - return list; - } - - private ArrayList fillAnaliseMedidasRh(AnaliseAcidente a) - { - ArrayList list = new ArrayList(); - ListIterator iter = gridMedidas.getChildren().listIterator(); - while(iter.hasNext()) - { - HtmlPanelGrid grd = (HtmlPanelGrid)iter.next(); - TextArea ta = (TextArea) grd.getChildren().get(1); - if(ta.getText() != null ) - { - String txt = (String) ta.getText(); - if(txt.trim().length() > 0) - { - Medida m = new Medida(); - m.setAnalise_id(a.getId()); - m.setMedida(txt); - list.add(m); - } - } - } - return list; - } - - private AnaliseAcidente fillAnaliseFieldsRH2(AnaliseAcidente a) - { - return a; - } - - private AnaliseAcidente fillAnaliseFieldsMedico(AnaliseAcidente a) - { - a.setLesao_cabeca("n"); - if(chkCabeca.getSelected() != null) - { - if(chkCabeca.getSelected().equals(new Boolean(true))) - { - a.setLesao_cabeca("y"); - } - } - - a.setLesao_pescoco("n"); - if(chkPescoco.getSelected() != null) - { - if(chkPescoco.getSelected().equals(new Boolean(true))) - { - a.setLesao_pescoco("y"); - } - } - - a.setLesao_tronco("n"); - if(chkTronco.getSelected() != null) - { - if(chkTronco.getSelected().equals(new Boolean(true))) - { - a.setLesao_tronco("y"); - } - } - - a.setEspecif1(""); - a.setEspecif2(""); - a.setEspecif3(""); - a.setEspecif4(""); - - a.setLesao_membro_sup_dir("n"); - if(chkMembroSupDir.getSelected() != null) - { - if(chkMembroSupDir.getSelected().equals(new Boolean(true))) - { - a.setLesao_membro_sup_dir("y"); - if(txtEspecif1.getText() != null) - { - a.setEspecif1((String) txtEspecif1.getText()); - } - } - } - - a.setLesao_membro_sup_esq("n"); - if(chkMembroSupEsq.getSelected() != null) - { - if(chkMembroSupEsq.getSelected().equals(new Boolean(true))) - { - a.setLesao_membro_sup_esq("y"); - if(txtEspecif2.getText() != null) - { - a.setEspecif2((String) txtEspecif2.getText()); - } - } - } - - a.setLesao_membro_inf_dir("n"); - if(chkMembroInfDir.getSelected() != null) - { - if(chkMembroInfDir.getSelected().equals(new Boolean(true))) - { - a.setLesao_membro_inf_dir("y"); - if(txtEspecif3.getText() != null) - { - a.setEspecif3((String) txtEspecif3.getText()); - } - } - } - - a.setLesao_membro_inf_esq("n"); - if(chkMembroInfEsq.getSelected() != null) - { - if(chkMembroInfEsq.getSelected().equals(new Boolean(true))) - { - a.setLesao_membro_inf_esq("y"); - if(txtEspecif4.getText() != null) - { - a.setEspecif4((String) txtEspecif4.getText()); - } - } - } - - a.setTipo_lesao(""); - if(txtTipoLesao.getText() != null) - { - a.setTipo_lesao((String) txtTipoLesao.getText()); - } - - a.setTipo_incapacidade("n"); - if(rbIncapacidadeNone.getSelected() != null) - { - if(rbIncapacidadeNone.getSelected().equals(new Boolean(true))) - { - a.setTipo_incapacidade("n"); - } - } - if(rbIncapacidadeTemp.getSelected() != null) - { - if(rbIncapacidadeTemp.getSelected().equals(new Boolean(true))) - { - a.setTipo_incapacidade("t"); - } - } - if(rbIncapacidadePerm.getSelected() != null) - { - if(rbIncapacidadePerm.getSelected().equals(new Boolean(true))) - { - a.setTipo_incapacidade("p"); - } - } - - if(txtCoefIncapacidade.getText() != null) - { - String coef_str = txtCoefIncapacidade.getText().toString(); - int coef = Integer.parseInt(coef_str); - a.setCoef_incapacidade(new Integer(coef)); - } - - DateFormat formatador = new SimpleDateFormat("yyyy-MM-dd"); - - java.util.Date ddate = (java.util.Date) calAvaliacaoIncap.getValue(); - try - { - String ddate_str = formatador.format(ddate); - java.sql.Date ddate_sql = new java.sql.Date(formatador.parse(ddate_str).getTime()); - a.setData_aval_incapacidade(ddate_sql); - } - catch(Exception ex) - { - a.setData_aval_incapacidade(null); - } - - ddate = (java.util.Date) calRevisaoIncap.getValue(); - - try - { - String ddate_str = formatador.format(ddate); - java.sql.Date ddate_sql = new java.sql.Date(formatador.parse(ddate_str).getTime()); - a.setData_rev_incapacidade(ddate_sql); - } - catch(Exception ex) - { - a.setData_rev_incapacidade(null); - } - - ddate = (java.util.Date) calPeridoIncapDe.getValue(); - try - { - String ddate_str = formatador.format(ddate); - java.sql.Date ddate_sql = new java.sql.Date(formatador.parse(ddate_str).getTime()); - a.setPeriodo_incapacidade_de(ddate_sql); - } - catch(Exception ex) - { - a.setPeriodo_incapacidade_de(null); - } - - ddate = (java.util.Date) calPeriodoIncapA.getValue(); - try - { - String ddate_str = formatador.format(ddate); - java.sql.Date ddate_sql = new java.sql.Date(formatador.parse(ddate_str).getTime()); - a.setPeriodo_incapacidade_a(ddate_sql); - } - catch(Exception ex) - { - a.setPeriodo_incapacidade_a(null); - } - - a.setImg_flexao("n"); - if(chkImgFlexao.getSelected() != null) - { - if(chkImgFlexao.getSelected().equals(new Boolean(true))) - { - a.setImg_flexao("y"); - } - } - - a.setImg_rot1("n"); - if(chkImgRot1.getSelected() != null) - { - if(chkImgRot1.getSelected().equals(new Boolean(true))) - { - a.setImg_rot1("y"); - } - } - - a.setImg_rot2("n"); - if(chkImgRot2.getSelected() != null) - { - if(chkImgRot2.getSelected().equals(new Boolean(true))) - { - a.setImg_rot2("y"); - } - } - - a.setImg_ext1("n"); - if(chkImgExt1.getSelected() != null) - { - if(chkImgExt1.getSelected().equals(new Boolean(true))) - { - a.setImg_ext1("y"); - } - } - - a.setImg_ext2("n"); - if(chkImgExt2.getSelected() != null) - { - if(chkImgExt2.getSelected().equals(new Boolean(true))) - { - a.setImg_ext2("y"); - } - } - - a.setImg_cab1("n"); - if(chkImgCab1.getSelected() != null) - { - if(chkImgCab1.getSelected().equals(new Boolean(true))) - { - a.setImg_cab1("y"); - } - } - - a.setImg_cab2("n"); - if(chkImgCab2.getSelected() != null) - { - if(chkImgCab2.getSelected().equals(new Boolean(true))) - { - a.setImg_cab2("y"); - } - } - - a.setImg_cab3("n"); - if(chkImgCab3.getSelected() != null) - { - if(chkImgCab3.getSelected().equals(new Boolean(true))) - { - a.setImg_cab3("y"); - } - } - - a.setImg_cab4("n"); - if(chkImgCab4.getSelected() != null) - { - if(chkImgCab4.getSelected().equals(new Boolean(true))) - { - a.setImg_cab4("y"); - } - } - - a.setImg_ma1("n"); - if(chkImgMa1.getSelected() != null) - { - if(chkImgMa1.getSelected().equals(new Boolean(true))) - { - a.setImg_ma1("y"); - } - } - - a.setImg_ma2("n"); - if(chkImgMa2.getSelected() != null) - { - if(chkImgMa2.getSelected().equals(new Boolean(true))) - { - a.setImg_ma2("y"); - } - } - - a.setImg_ma3("n"); - if(chkImgMa3.getSelected() != null) - { - if(chkImgMa3.getSelected().equals(new Boolean(true))) - { - a.setImg_ma3("y"); - } - } - - a.setImg_ma4("n"); - if(chkImgMa4.getSelected() != null) - { - if(chkImgMa4.getSelected().equals(new Boolean(true))) - { - a.setImg_ma4("y"); - } - } - - a.setImg_ma5("n"); - if(chkImgMa5.getSelected() != null) - { - if(chkImgMa5.getSelected().equals(new Boolean(true))) - { - a.setImg_ma5("y"); - } - } - - a.setImg_ma6("n"); - if(chkImgMa6.getSelected() != null) - { - if(chkImgMa6.getSelected().equals(new Boolean(true))) - { - a.setImg_ma6("y"); - } - } - - a.setImg_ma7("n"); - if(chkImgMa7.getSelected() != null) - { - if(chkImgMa7.getSelected().equals(new Boolean(true))) - { - a.setImg_ma7("y"); - } - } - - a.setImg_ma8("n"); - if(chkImgMa8.getSelected() != null) - { - if(chkImgMa8.getSelected().equals(new Boolean(true))) - { - a.setImg_ma8("y"); - } - } - - a.setImg_ma9("n"); - if(chkImgMa9.getSelected() != null) - { - if(chkImgMa9.getSelected().equals(new Boolean(true))) - { - a.setImg_ma9("y"); - } - } - - a.setImg_ma10("n"); - if(chkImgMa10.getSelected() != null) - { - if(chkImgMa10.getSelected().equals(new Boolean(true))) - { - a.setImg_ma10("y"); - } - } - - a.setRestricao_carga(new Integer(0)); - if(chkRestricaoCargas.getSelected()!= null) - { - if(chkRestricaoCargas.getSelected().equals(new Boolean(true))) - { - if(rbKgs2.getSelected() != null) - { - if(rbKgs2.getSelected().equals(new Boolean(true))) - { - a.setRestricao_carga(new Integer(2)); - } - } - if(rbKgs5.getSelected() != null) - { - if(rbKgs5.getSelected().equals(new Boolean(true))) - { - a.setRestricao_carga(new Integer(5)); - } - } - if(rbKgs10.getSelected() != null) - { - if(rbKgs10.getSelected().equals(new Boolean(true))) - { - a.setRestricao_carga(new Integer(10)); - } - } - if(rbKgs15.getSelected() != null) - { - if(rbKgs15.getSelected().equals(new Boolean(true))) - { - a.setRestricao_carga(new Integer(15)); - } - } - - if(rbKgsOutro.getSelected() != null) - { - if(rbKgsOutro.getSelected().equals(new Boolean(true))) - { - if(txtKgs.getText() != null) - { - String kgs_str = txtKgs.getText().toString(); - int kgs = Integer.parseInt(kgs_str); - a.setRestricao_carga(new Integer(kgs)); - } - } - } - } - } - - a.setRestricao_motricidade("n"); - if(chkRestricaoMotricidade.getSelected() != null) - { - if(chkRestricaoMotricidade.getSelected().equals(new Boolean(true))) - { - a.setRestricao_motricidade("y"); - } - } - - a.setRestricao_conducao("n"); - if(chkRestricaoConducao.getSelected() != null) - { - if(chkRestricaoConducao.getSelected().equals(new Boolean(true))) - { - a.setRestricao_conducao("y"); - } - } - - a.setRestricao_vibracoes("n"); - if(chkRestricaoVibracoes.getSelected() != null) - { - if(chkRestricaoVibracoes.getSelected().equals(new Boolean(true))) - { - a.setRestricao_vibracoes("y"); - } - } - - a.setRestricao_outras(""); - if(chkRestricaoOutras.getSelected() != null) - { - if(chkRestricaoOutras.getSelected().equals(new Boolean(true))) - { - if(txtRestricaoOutras.getText() != null) - { - a.setRestricao_outras((String)txtRestricaoOutras.getText()); - } - } - } - - a.setMed_observ(""); - if(txtObservacoes.getText() != null) - { - a.setMed_observ( (String) txtObservacoes.getText() ); - } - - return a; - } - - private AnaliseAcidente fillAnaliseAssinaturas(AnaliseAcidente a) - { - int tipo_utilizador = getSessionBean1().getCurrentUser().getTipo().intValue(); - a.setEstado(new Integer(ESTADO_ASSINATURAS)); -// if(a.getEstado_assinatura().intValue() == 0) -// { -// a.setEstado_assinatura(new Integer( ESTADO_ASSINATURA_1 )); -// } - if(a.getEstado_assinatura().intValue() == ESTADO_ASSINATURA_1) - { - a.setEstado_assinatura( new Integer(ESTADO_ASSINATURA_2) ); - notifyNextSignature(new Integer(ESTADO_ASSINATURA_2)); -// switch(tipo_utilizador) -// { -// case 1: //seguranca -// a.setAss_seg("y"); -// break; -// case 3: //hs -// a.setAss_hs("y"); -// break; -// case 5: //medico -// a.setAss_med("y"); -// break; -// } - } - else if(a.getEstado_assinatura().intValue() == ESTADO_ASSINATURA_2) - { - switch(tipo_utilizador) - { - case 1: //seguranca - a.setAss_seg("y"); - break; - case 3: //hs - a.setAss_hs("y"); - break; - case 5: //medico - a.setAss_med("y"); - break; - } - if(a.getAss_seg().matches("y") && a.getAss_hs().matches("y") && a.getAss_med().matches("y")) - { - a.setEstado_assinatura(new Integer( ESTADO_ASSINATURA_3 )); - notifyNextSignature(new Integer(ESTADO_ASSINATURA_3)); - //a.setAss_resp_rh("y"); - //butEnviar.setDisabled(false); - } - } - return a; - } - - private boolean validationOk() - { - if(getSessionBean1().getAcidentado() == null) - { - getSessionBean1().setMsg("Não seleccionou trabalhador acidentado !"); - return false; - } - - int estado = 0; - int estado_assinatura = 0; - if(getSessionBean1().getCurrentAnalise() == null) //null - { - estado = ESTADO_SEG; - } - else - { - AnaliseAcidente a = getSessionBean1().getCurrentAnalise(); - estado = a.getEstado().intValue(); - estado_assinatura = a.getEstado_assinatura().intValue(); - } - - - if(estado == ESTADO_SEG || estado == ESTADO_RH1) - { - String cod_postal1 = ""; - String cod_postal2 = ""; - if(txtCodPostal1.getText() != null) - { - cod_postal1 = (String) txtCodPostal1.getText(); - if(cod_postal1.trim().length() > 0) - { - try - { - int nr = Integer.parseInt(cod_postal1); - if(nr < 1000 || nr > 9999) - { - getSessionBean1().setMsg("O formato do código postal é : '9999-999'"); - return false; - } - } - catch(Exception ex) - { - getSessionBean1().setMsg("O código postal tem de ser um valor numérico !"); - return false; - } - } - } - - if(txtCodPostal2.getText() != null) - { - cod_postal2 = (String) txtCodPostal2.getText(); - if(cod_postal2.trim().length() > 0) - { - if(cod_postal1.trim().length() == 0) - { - getSessionBean1().setMsg("O formato do código postal é : '9999-999'"); - return false; - } - try - { - int nr = Integer.parseInt(cod_postal2); - if(cod_postal2.length() > 3 ) - { - getSessionBean1().setMsg("O formato do código postal é : '9999-999'"); - return false; - } - } - catch(Exception ex) - { - getSessionBean1().setMsg("O código postal de ser um valor numérico !"); - return false; - } - } - } - - if(txtHorasTurno.getText() != null) - { - String horas_turno = txtHorasTurno.getText().toString(); - // if(getSessionBean1().getCurrentAnalise() == null) // null - // { - // horas_turno = (String) txtHorasTurno.getText(); - // } - // else - // { - // System.out.println("HORAS TURNO A "); - // horas_turno = ( (String) txtHorasTurno.getText() ); - // System.out.println("HORAS TURNO : " + horas_turno); - // } - - try - { - int nr = Integer.parseInt(horas_turno); - if(nr > 9) - { - getSessionBean1().setMsg("As horas turno devem ser entre 0 e 9 !"); - return false; - } - } - catch(Exception ex) - { - getSessionBean1().setMsg("As horas turno devem ser um valor numérico !"); - return false; - } - } - - - if(estado == ESTADO_RH1) - { - if(txtNrAcidentesColaborador.getText() != null) - { - String nr_str = txtNrAcidentesColaborador.getText().toString(); - try - { - int nr = Integer.parseInt(nr_str); - } - catch(Exception ex) - { - getSessionBean1().setMsg("O nr de acidentes do colaborador deve ser um valor numérico !"); - return false; - } - } - - if(txtNrAcidentesColaboradores.getText() != null) - { - String nr_str = txtNrAcidentesColaboradores.getText().toString(); - try - { - int nr = Integer.parseInt(nr_str); - } - catch(Exception ex) - { - getSessionBean1().setMsg("O nr de acidentes dos colaboradores deve ser um valor numérico !"); - return false; - } - } - } - - } - else if(estado == ESTADO_MEDICO) - { - if(txtCoefIncapacidade.getText() != null) - { - String coef_str = txtCoefIncapacidade.getText().toString(); - try - { - int nr = Integer.parseInt(coef_str); - } - catch(Exception ex) - { - getSessionBean1().setMsg("O coeficiente de incapacidade deve ser um valor numérico !"); - return false; - } - } - - if(chkRestricaoCargas.getSelected() != null) - { - Boolean b = (Boolean) chkRestricaoCargas.getSelected(); - if(b.equals(new Boolean(true))) - { - if(txtKgs.getText() != null) - { - String kgs_str = txtKgs.getText().toString(); - try - { - int nr = Integer.parseInt(kgs_str); - } - catch(Exception ex) - { - getSessionBean1().setMsg("O valor de kgs deve ser um valor numérico !"); - return false; - } - } - } - } - } - else if(estado == ESTADO_ASSINATURAS) - { - int tipo_utilizador = getSessionBean1().getCurrentUser().getTipo().intValue(); - - switch(tipo_utilizador) - { - case 1: //SEGURANCA - if(estado_assinatura == 1) - { - if(txtAssRespSeg.getText() != null) - { - String ass_resp_seg = txtAssRespSeg.getText().toString(); - if(ass_resp_seg.trim().length() == 0) - { - getSessionBean1().setMsg("Falta assinatura !"); - return false; - } - } - else - { - getSessionBean1().setMsg("Falta assinatura !"); - return false; - } - } - else - { - - if(txtAssSeg.getText() != null) - { - String ass_seg = txtAssSeg.getText().toString(); - if(ass_seg.trim().length() == 0) - { - getSessionBean1().setMsg("Falta assinatura !"); - return false; - } - } - else - { - getSessionBean1().setMsg("Falta assinatura !"); - return false; - } - - } - - break; - - case 2: //RH - if(txtAssRespRh.getText() != null) - { - String ass_resp_rh = txtAssRespRh.getText().toString(); - if(ass_resp_rh.trim().length() == 0) - { - getSessionBean1().setMsg("Falta assinatura !"); - return false; - } - } - else - { - getSessionBean1().setMsg("Falta assinatura !"); - return false; - } - break; - - case 3: //HS - if(txtAssHS.getText() != null) - { - String ass_hs = txtAssHS.getText().toString(); - if(ass_hs.trim().length() == 0) - { - getSessionBean1().setMsg("Falta assinatura !"); - return false; - } - } - else - { - getSessionBean1().setMsg("Falta assinatura !"); - return false; - } - break; - - case 5: //Medico - if(txtAssMed.getText() != null) - { - String ass_med = txtAssMed.getText().toString(); - if(ass_med.trim().length() == 0) - { - getSessionBean1().setMsg("Falta assinatura !"); - return false; - } - } - else - { - getSessionBean1().setMsg("Falta assinatura !"); - return false; - } - break; - } - } - - - return true; - } - - private void createImagesFolder(String folderName) - { - ServletContext theApplicationsServletContext = - (ServletContext) this.getExternalContext().getContext(); - String imageFileFolder = theApplicationsServletContext.getRealPath(IMAGE_URL + "/" + folderName); - try - { - String imageFileFolderTmp = theApplicationsServletContext.getRealPath(IMAGE_URL + "/tmp" + getSessionBean1().getCurrentUser().getLogin()); - File f = new File(imageFileFolderTmp); - if( f.exists() ) - { - File folder = new File(imageFileFolder); - folder.mkdir(); - - File files[] = f.listFiles(); - - for(int i=0;iApplication scope data bean for your application. Create properties - * here to represent cached data that should be made available to all users - * and pages in the application.

- * - *

An instance of this class will be created for you automatically, - * the first time your application evaluates a value binding expression - * or method binding expression that references a managed bean using - * this class.

- */ -public class ApplicationBean1 extends AbstractApplicationBean { - // - private int __placeholder; - - /** - *

Automatically managed component initialization. WARNING: - * This method is automatically generated, so any user-specified code inserted - * here is subject to being replaced.

- */ - private void _init() throws Exception { - } - //
- - /** - *

Construct a new application data bean instance.

- */ - public ApplicationBean1() { - } - - /** - *

This method is called when this bean is initially added to - * application scope. Typically, this occurs as a result of evaluating - * a value binding or method binding expression, which utilizes the - * managed bean facility to instantiate this bean and store it into - * application scope.

- * - *

You may customize this method to initialize and cache application wide - * data values (such as the lists of valid options for dropdown list - * components), or to allocate resources that are required for the - * lifetime of the application.

- */ - public void init() { - // Perform initializations inherited from our superclass - super.init(); - // Perform application initialization that must complete - // *before* managed components are initialized - // TODO - add your own initialiation code here - - // - // Initialize automatically managed components - // *Note* - this logic should NOT be modified - try { - _init(); - } catch (Exception e) { - log("ApplicationBean1 Initialization Failure", e); - throw e instanceof FacesException ? (FacesException) e: new FacesException(e); - } - - // - // Perform application initialization that must complete - // *after* managed components are initialized - // TODO - add your own initialization code here - } - - /** - *

This method is called when this bean is removed from - * application scope. Typically, this occurs as a result of - * the application being shut down by its owning container.

- * - *

You may customize this method to clean up resources allocated - * during the execution of the init() method, or - * at any later time during the lifetime of the application.

- */ - public void destroy() { - } - - /** - *

Return an appropriate character encoding based on the - * Locale defined for the current JavaServer Faces - * view. If no more suitable encoding can be found, return - * "UTF-8" as a general purpose default.

- * - *

The default implementation uses the implementation from - * our superclass, AbstractApplicationBean.

- */ - public String getLocaleCharacterEncoding() { - return super.getLocaleCharacterEncoding(); - } -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Bundle.properties b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Bundle.properties deleted file mode 100644 index 13e936fe..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Bundle.properties +++ /dev/null @@ -1 +0,0 @@ -# Sample ResourceBundle properties file diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Dummy.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Dummy.java deleted file mode 100644 index 8fd59384..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Dummy.java +++ /dev/null @@ -1,730 +0,0 @@ -/* - * Dummy.java - * - * - * Created on September 19, 2007, 10:56 AM - * Copyright lluis - */ -package analiseacidentestrabalho; - -import com.sun.rave.web.ui.appbase.AbstractPageBean; -import com.sun.rave.web.ui.component.Body; -import com.sun.rave.web.ui.component.Button; -import com.sun.rave.web.ui.component.Calendar; -import com.sun.rave.web.ui.component.Checkbox; -import com.sun.rave.web.ui.component.DropDown; -import com.sun.rave.web.ui.component.Form; -import com.sun.rave.web.ui.component.Head; -import com.sun.rave.web.ui.component.HiddenField; -import com.sun.rave.web.ui.component.Html; -import com.sun.rave.web.ui.component.Hyperlink; -import com.sun.rave.web.ui.component.ImageComponent; -import com.sun.rave.web.ui.component.ImageHyperlink; -import com.sun.rave.web.ui.component.Link; -import com.sun.rave.web.ui.component.Page; -import com.sun.rave.web.ui.component.PanelGroup; -import com.sun.rave.web.ui.component.PasswordField; -import com.sun.rave.web.ui.component.RadioButton; -import com.sun.rave.web.ui.component.StaticText; -import com.sun.rave.web.ui.component.Table; -import com.sun.rave.web.ui.component.TableColumn; -import com.sun.rave.web.ui.component.TableRowGroup; -import com.sun.rave.web.ui.component.TextArea; -import com.sun.rave.web.ui.component.TextField; -import com.sun.rave.web.ui.component.Upload; -import com.sun.rave.web.ui.model.SingleSelectOptionsList; -import javax.faces.FacesException; -import javax.faces.component.html.HtmlPanelGrid; - -/** - *

Page bean that corresponds to a similarly named JSP page. This - * class contains component definitions (and initialization code) for - * all components that you have defined on this page, as well as - * lifecycle methods and event handlers where you may add behavior - * to respond to incoming events.

- */ -public class Dummy extends AbstractPageBean { - // - private int __placeholder; - - /** - *

Automatically managed component initialization. WARNING: - * This method is automatically generated, so any user-specified code inserted - * here is subject to being replaced.

- */ - private void _init() throws Exception { - } - - private Page page1 = new Page(); - - public Page getPage1() { - return page1; - } - - public void setPage1(Page p) { - this.page1 = p; - } - - private Html html1 = new Html(); - - public Html getHtml1() { - return html1; - } - - public void setHtml1(Html h) { - this.html1 = h; - } - - private Head head1 = new Head(); - - public Head getHead1() { - return head1; - } - - public void setHead1(Head h) { - this.head1 = h; - } - - private Link link1 = new Link(); - - public Link getLink1() { - return link1; - } - - public void setLink1(Link l) { - this.link1 = l; - } - - private Body body1 = new Body(); - - public Body getBody1() { - return body1; - } - - public void setBody1(Body b) { - this.body1 = b; - } - - private Form form1 = new Form(); - - public Form getForm1() { - return form1; - } - - public void setForm1(Form f) { - this.form1 = f; - } - - private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel1() { - return gridPanel1; - } - - public void setGridPanel1(HtmlPanelGrid hpg) { - this.gridPanel1 = hpg; - } - - private PanelGroup groupPanel1 = new PanelGroup(); - - public PanelGroup getGroupPanel1() { - return groupPanel1; - } - - public void setGroupPanel1(PanelGroup pg) { - this.groupPanel1 = pg; - } - - private ImageComponent image1 = new ImageComponent(); - - public ImageComponent getImage1() { - return image1; - } - - public void setImage1(ImageComponent ic) { - this.image1 = ic; - } - - private ImageComponent image2 = new ImageComponent(); - - public ImageComponent getImage2() { - return image2; - } - - public void setImage2(ImageComponent ic) { - this.image2 = ic; - } - - private PanelGroup groupPanel2 = new PanelGroup(); - - public PanelGroup getGroupPanel2() { - return groupPanel2; - } - - public void setGroupPanel2(PanelGroup pg) { - this.groupPanel2 = pg; - } - - private StaticText lblUser1 = new StaticText(); - - public StaticText getLblUser1() { - return lblUser1; - } - - public void setLblUser1(StaticText st) { - this.lblUser1 = st; - } - - private StaticText staticText1 = new StaticText(); - - public StaticText getStaticText1() { - return staticText1; - } - - public void setStaticText1(StaticText st) { - this.staticText1 = st; - } - - private Hyperlink lnkEditUser1 = new Hyperlink(); - - public Hyperlink getLnkEditUser1() { - return lnkEditUser1; - } - - public void setLnkEditUser1(Hyperlink h) { - this.lnkEditUser1 = h; - } - - private StaticText staticText2 = new StaticText(); - - public StaticText getStaticText2() { - return staticText2; - } - - public void setStaticText2(StaticText st) { - this.staticText2 = st; - } - - private Hyperlink lnkLogout1 = new Hyperlink(); - - public Hyperlink getLnkLogout1() { - return lnkLogout1; - } - - public void setLnkLogout1(Hyperlink h) { - this.lnkLogout1 = h; - } - - private StaticText staticText3 = new StaticText(); - - public StaticText getStaticText3() { - return staticText3; - } - - public void setStaticText3(StaticText st) { - this.staticText3 = st; - } - - private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel4() { - return gridPanel4; - } - - public void setGridPanel4(HtmlPanelGrid hpg) { - this.gridPanel4 = hpg; - } - - private HtmlPanelGrid gridHeader = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridHeader() { - return gridHeader; - } - - public void setGridHeader(HtmlPanelGrid hpg) { - this.gridHeader = hpg; - } - - private PanelGroup groupPanel5 = new PanelGroup(); - - public PanelGroup getGroupPanel5() { - return groupPanel5; - } - - public void setGroupPanel5(PanelGroup pg) { - this.groupPanel5 = pg; - } - - private StaticText lblUser2 = new StaticText(); - - public StaticText getLblUser2() { - return lblUser2; - } - - public void setLblUser2(StaticText st) { - this.lblUser2 = st; - } - - private StaticText staticText7 = new StaticText(); - - public StaticText getStaticText7() { - return staticText7; - } - - public void setStaticText7(StaticText st) { - this.staticText7 = st; - } - - private Hyperlink lnkEditUser2 = new Hyperlink(); - - public Hyperlink getLnkEditUser2() { - return lnkEditUser2; - } - - public void setLnkEditUser2(Hyperlink h) { - this.lnkEditUser2 = h; - } - - private StaticText staticText8 = new StaticText(); - - public StaticText getStaticText8() { - return staticText8; - } - - public void setStaticText8(StaticText st) { - this.staticText8 = st; - } - - private Hyperlink lnkLogout2 = new Hyperlink(); - - public Hyperlink getLnkLogout2() { - return lnkLogout2; - } - - public void setLnkLogout2(Hyperlink h) { - this.lnkLogout2 = h; - } - - private StaticText staticText9 = new StaticText(); - - public StaticText getStaticText9() { - return staticText9; - } - - public void setStaticText9(StaticText st) { - this.staticText9 = st; - } - - private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel2() { - return gridPanel2; - } - - public void setGridPanel2(HtmlPanelGrid hpg) { - this.gridPanel2 = hpg; - } - - private PanelGroup groupPanel3 = new PanelGroup(); - - public PanelGroup getGroupPanel3() { - return groupPanel3; - } - - public void setGroupPanel3(PanelGroup pg) { - this.groupPanel3 = pg; - } - - private ImageComponent image3 = new ImageComponent(); - - public ImageComponent getImage3() { - return image3; - } - - public void setImage3(ImageComponent ic) { - this.image3 = ic; - } - - private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel5() { - return gridPanel5; - } - - public void setGridPanel5(HtmlPanelGrid hpg) { - this.gridPanel5 = hpg; - } - - private StaticText staticText4 = new StaticText(); - - public StaticText getStaticText4() { - return staticText4; - } - - public void setStaticText4(StaticText st) { - this.staticText4 = st; - } - - private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel6() { - return gridPanel6; - } - - public void setGridPanel6(HtmlPanelGrid hpg) { - this.gridPanel6 = hpg; - } - - private PanelGroup groupPanel4 = new PanelGroup(); - - public PanelGroup getGroupPanel4() { - return groupPanel4; - } - - public void setGroupPanel4(PanelGroup pg) { - this.groupPanel4 = pg; - } - - private StaticText staticText5 = new StaticText(); - - public StaticText getStaticText5() { - return staticText5; - } - - public void setStaticText5(StaticText st) { - this.staticText5 = st; - } - - private StaticText stHeaderNr1 = new StaticText(); - - public StaticText getStHeaderNr1() { - return stHeaderNr1; - } - - public void setStHeaderNr1(StaticText st) { - this.stHeaderNr1 = st; - } - - private PanelGroup groupPanel6 = new PanelGroup(); - - public PanelGroup getGroupPanel6() { - return groupPanel6; - } - - public void setGroupPanel6(PanelGroup pg) { - this.groupPanel6 = pg; - } - - private StaticText staticText6 = new StaticText(); - - public StaticText getStaticText6() { - return staticText6; - } - - public void setStaticText6(StaticText st) { - this.staticText6 = st; - } - - private StaticText stHeaderDate1 = new StaticText(); - - public StaticText getStHeaderDate1() { - return stHeaderDate1; - } - - public void setStHeaderDate1(StaticText st) { - this.stHeaderDate1 = st; - } - - private ImageComponent image4 = new ImageComponent(); - - public ImageComponent getImage4() { - return image4; - } - - public void setImage4(ImageComponent ic) { - this.image4 = ic; - } - - private RadioButton radioButton1 = new RadioButton(); - - public RadioButton getRadioButton1() { - return radioButton1; - } - - public void setRadioButton1(RadioButton rb) { - this.radioButton1 = rb; - } - - private PanelGroup groupPanel7 = new PanelGroup(); - - public PanelGroup getGroupPanel7() { - return groupPanel7; - } - - public void setGroupPanel7(PanelGroup pg) { - this.groupPanel7 = pg; - } - - private StaticText staticText10 = new StaticText(); - - public StaticText getStaticText10() { - return staticText10; - } - - public void setStaticText10(StaticText st) { - this.staticText10 = st; - } - - private StaticText staticText11 = new StaticText(); - - public StaticText getStaticText11() { - return staticText11; - } - - public void setStaticText11(StaticText st) { - this.staticText11 = st; - } - - private StaticText staticText12 = new StaticText(); - - public StaticText getStaticText12() { - return staticText12; - } - - public void setStaticText12(StaticText st) { - this.staticText12 = st; - } - - private StaticText staticText13 = new StaticText(); - - public StaticText getStaticText13() { - return staticText13; - } - - public void setStaticText13(StaticText st) { - this.staticText13 = st; - } - - private StaticText staticText14 = new StaticText(); - - public StaticText getStaticText14() { - return staticText14; - } - - public void setStaticText14(StaticText st) { - this.staticText14 = st; - } - - private RadioButton rbTurnoManha = new RadioButton(); - - public RadioButton getRbTurnoManha() { - return rbTurnoManha; - } - - public void setRbTurnoManha(RadioButton rb) { - this.rbTurnoManha = rb; - } - - private RadioButton rbTurnoTarde = new RadioButton(); - - public RadioButton getRbTurnoTarde() { - return rbTurnoTarde; - } - - public void setRbTurnoTarde(RadioButton rb) { - this.rbTurnoTarde = rb; - } - - private RadioButton rbTurnoNoite = new RadioButton(); - - public RadioButton getRbTurnoNoite() { - return rbTurnoNoite; - } - - public void setRbTurnoNoite(RadioButton rb) { - this.rbTurnoNoite = rb; - } - - private Button button1 = new Button(); - - public Button getButton1() { - return button1; - } - - public void setButton1(Button b) { - this.button1 = b; - } - - private HiddenField hiddenField1 = new HiddenField(); - - public HiddenField getHiddenField1() { - return hiddenField1; - } - - public void setHiddenField1(HiddenField hf) { - this.hiddenField1 = hf; - } - - //
- - /** - *

Construct a new Page bean instance.

- */ - public Dummy() { - } - - /** - *

Callback method that is called whenever a page is navigated to, - * either directly via a URL, or indirectly via page navigation. - * Customize this method to acquire resources that will be needed - * for event handlers and lifecycle methods, whether or not this - * page is performing post back processing.

- * - *

Note that, if the current request is a postback, the property - * values of the components do not represent any - * values submitted with this request. Instead, they represent the - * property values that were saved for this view when it was rendered.

- */ - public void init() { - // Perform initializations inherited from our superclass - super.init(); - // Perform application initialization that must complete - // *before* managed components are initialized - // TODO - add your own initialiation code here - - // - // Initialize automatically managed components - // *Note* - this logic should NOT be modified - try { - _init(); - } catch (Exception e) { - log("Dummy Initialization Failure", e); - throw e instanceof FacesException ? (FacesException) e: new FacesException(e); - } - - // - // Perform application initialization that must complete - // *after* managed components are initialized - // TODO - add your own initialization code here - } - - /** - *

Callback method that is called after the component tree has been - * restored, but before any event processing takes place. This method - * will only be called on a postback request that - * is processing a form submit. Customize this method to allocate - * resources that will be required in your event handlers.

- */ - public void preprocess() { - } - - /** - *

Callback method that is called just before rendering takes place. - * This method will only be called for the page that - * will actually be rendered (and not, for example, on a page that - * handled a postback and then navigated to a different page). Customize - * this method to allocate resources that will be required for rendering - * this page.

- */ - public void prerender() { - //txtIn.setText("OLA"); - } - - /** - *

Callback method that is called after rendering is completed for - * this request, if init() was called (regardless of whether - * or not this was the page that was actually rendered). Customize this - * method to release resources acquired in the init(), - * preprocess(), or prerender() methods (or - * acquired during execution of an event handler).

- */ - public void destroy() { - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected RequestBean1 getRequestBean1() { - return (RequestBean1)getBean("RequestBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected SessionBean1 getSessionBean1() { - return (SessionBean1)getBean("SessionBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected ApplicationBean1 getApplicationBean1() { - return (ApplicationBean1)getBean("ApplicationBean1"); - } - - public String button1_action() { - // TODO: Process the button click action. Return value is a navigation - // case name where null will return to the same page. - //System.out.println("TEXT : " + txtIn.getText().toString()); - return null; - } - - public String butCancelar_action() { - // TODO: Process the button click action. Return value is a navigation - // case name where null will return to the same page. - - return null; - } - - public String butGravar_action() { - // TODO: Process the button click action. Return value is a navigation - // case name where null will return to the same page. - - return null; - } - - public String butEnviar_action() { - // TODO: Process the button click action. Return value is a navigation - // case name where null will return to the same page. - - return null; - } - - public String butImagem_action() { - // TODO: Process the button click action. Return value is a navigation - // case name where null will return to the same page. - - return null; - } - - public String lnkMoreMed1_action() { - // TODO: Replace with your code - - return null; - } - - public String lnkNome_action() { - // TODO: Replace with your code - - return null; - } - - public String lnkDataNascimento_action() { - // TODO: Replace with your code - - return null; - } - - public String lnkEditUser_action() { - // TODO: Replace with your code - - return null; - } - - public String lnkLogout_action() { - // TODO: Replace with your code - - return null; - } -} - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Erro.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Erro.java deleted file mode 100644 index 66aa2dc1..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Erro.java +++ /dev/null @@ -1,239 +0,0 @@ -/* - * Error.java - * - * Created on September 19, 2007, 5:21 PM - * Copyright lluis - */ -package analiseacidentestrabalho; - -import com.sun.rave.web.ui.appbase.AbstractPageBean; -import com.sun.rave.web.ui.component.Body; -import com.sun.rave.web.ui.component.Form; -import com.sun.rave.web.ui.component.Head; -import com.sun.rave.web.ui.component.Html; -import com.sun.rave.web.ui.component.Link; -import com.sun.rave.web.ui.component.Page; -import com.sun.rave.web.ui.component.StaticText; -import com.sun.rave.web.ui.component.TextField; -import javax.faces.FacesException; -import javax.faces.component.html.HtmlPanelGrid; - -/** - *

Page bean that corresponds to a similarly named JSP page. This - * class contains component definitions (and initialization code) for - * all components that you have defined on this page, as well as - * lifecycle methods and event handlers where you may add behavior - * to respond to incoming events.

- */ -public class Erro extends AbstractPageBean { - // - private int __placeholder; - - /** - *

Automatically managed component initialization. WARNING: - * This method is automatically generated, so any user-specified code inserted - * here is subject to being replaced.

- */ - private void _init() throws Exception { - } - - private Page page1 = new Page(); - - public Page getPage1() { - return page1; - } - - public void setPage1(Page p) { - this.page1 = p; - } - - private Html html1 = new Html(); - - public Html getHtml1() { - return html1; - } - - public void setHtml1(Html h) { - this.html1 = h; - } - - private Head head1 = new Head(); - - public Head getHead1() { - return head1; - } - - public void setHead1(Head h) { - this.head1 = h; - } - - private Link link1 = new Link(); - - public Link getLink1() { - return link1; - } - - public void setLink1(Link l) { - this.link1 = l; - } - - private Body body1 = new Body(); - - public Body getBody1() { - return body1; - } - - public void setBody1(Body b) { - this.body1 = b; - } - - private Form form1 = new Form(); - - public Form getForm1() { - return form1; - } - - public void setForm1(Form f) { - this.form1 = f; - } - - private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel1() { - return gridPanel1; - } - - public void setGridPanel1(HtmlPanelGrid hpg) { - this.gridPanel1 = hpg; - } - - private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel2() { - return gridPanel2; - } - - public void setGridPanel2(HtmlPanelGrid hpg) { - this.gridPanel2 = hpg; - } - - private StaticText txtCab = new StaticText(); - - public StaticText getTxtCab() { - return txtCab; - } - - public void setTxtCab(StaticText st) { - this.txtCab = st; - } - - private StaticText txtMsg = new StaticText(); - - public StaticText getTxtMsg() { - return txtMsg; - } - - public void setTxtMsg(StaticText st) { - this.txtMsg = st; - } - - //
- - /** - *

Construct a new Page bean instance.

- */ - public Erro() { - } - - /** - *

Callback method that is called whenever a page is navigated to, - * either directly via a URL, or indirectly via page navigation. - * Customize this method to acquire resources that will be needed - * for event handlers and lifecycle methods, whether or not this - * page is performing post back processing.

- * - *

Note that, if the current request is a postback, the property - * values of the components do not represent any - * values submitted with this request. Instead, they represent the - * property values that were saved for this view when it was rendered.

- */ - public void init() { - // Perform initializations inherited from our superclass - super.init(); - // Perform application initialization that must complete - // *before* managed components are initialized - // TODO - add your own initialiation code here - - // - // Initialize automatically managed components - // *Note* - this logic should NOT be modified - try { - _init(); - } catch (Exception e) { - log("Error Initialization Failure", e); - throw e instanceof FacesException ? (FacesException) e: new FacesException(e); - } - - // - // Perform application initialization that must complete - // *after* managed components are initialized - // TODO - add your own initialization code here - } - - /** - *

Callback method that is called after the component tree has been - * restored, but before any event processing takes place. This method - * will only be called on a postback request that - * is processing a form submit. Customize this method to allocate - * resources that will be required in your event handlers.

- */ - public void preprocess() { - } - - /** - *

Callback method that is called just before rendering takes place. - * This method will only be called for the page that - * will actually be rendered (and not, for example, on a page that - * handled a postback and then navigated to a different page). Customize - * this method to allocate resources that will be required for rendering - * this page.

- */ - public void prerender() { - txtMsg.setText( getSessionBean1().getMsg() ); - getSessionBean1().setMsg(""); - System.out.println("ERROR PAGE"); - } - - /** - *

Callback method that is called after rendering is completed for - * this request, if init() was called (regardless of whether - * or not this was the page that was actually rendered). Customize this - * method to release resources acquired in the init(), - * preprocess(), or prerender() methods (or - * acquired during execution of an event handler).

- */ - public void destroy() { - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected ApplicationBean1 getApplicationBean1() { - return (ApplicationBean1)getBean("ApplicationBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected RequestBean1 getRequestBean1() { - return (RequestBean1)getBean("RequestBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected SessionBean1 getSessionBean1() { - return (SessionBean1)getBean("SessionBean1"); - } -} - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Estabelecimento.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Estabelecimento.java deleted file mode 100644 index 39defa9c..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Estabelecimento.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Empresa.java - * - * Created on October 11, 2007, 5:19 PM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package analiseacidentestrabalho; - -/** - * - * @author lluis - */ -public class Estabelecimento { - private Integer id; - private String nome_plain; - - /** Creates a new instance of Empresa */ - public Estabelecimento() { - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getNome_plain() { - return nome_plain; - } - - public void setNome_plain(String nome_plain) { - this.nome_plain = nome_plain; - } - -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FichaUtilizador.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FichaUtilizador.java deleted file mode 100644 index eeefde7c..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FichaUtilizador.java +++ /dev/null @@ -1,1209 +0,0 @@ -/* - * FichaUtilizador.java - * - * Created on October 11, 2007, 9:49 AM - * Copyright lluis - */ -package analiseacidentestrabalho; - -import com.sun.corba.se.impl.logging.UtilSystemException; -import com.sun.rave.web.ui.appbase.AbstractPageBean; -import com.sun.rave.web.ui.component.Body; -import com.sun.rave.web.ui.component.Button; -import com.sun.rave.web.ui.component.DropDown; -import com.sun.rave.web.ui.component.Form; -import com.sun.rave.web.ui.component.Head; -import com.sun.rave.web.ui.component.HiddenField; -import com.sun.rave.web.ui.component.Html; -import com.sun.rave.web.ui.component.Hyperlink; -import com.sun.rave.web.ui.component.ImageComponent; -import com.sun.rave.web.ui.component.Link; -import com.sun.rave.web.ui.component.Page; -import com.sun.rave.web.ui.component.PanelGroup; -import com.sun.rave.web.ui.component.PasswordField; -import com.sun.rave.web.ui.component.StaticText; -import com.sun.rave.web.ui.component.TextField; -import com.sun.rave.web.ui.model.SingleSelectOptionsList; -import db.AnalisesDataProvider; -import db.UtilizadoresDataProvider; -import javax.faces.FacesException; -import javax.faces.component.html.HtmlPanelGrid; -import javax.faces.event.ValueChangeEvent; -import javax.servlet.http.HttpServletRequest; -import utils.Utils; - -/** - *

Page bean that corresponds to a similarly named JSP page. This - * class contains component definitions (and initialization code) for - * all components that you have defined on this page, as well as - * lifecycle methods and event handlers where you may add behavior - * to respond to incoming events.

- */ -public class FichaUtilizador extends AbstractPageBean { - // - private int __placeholder; - - /** - *

Automatically managed component initialization. WARNING: - * This method is automatically generated, so any user-specified code inserted - * here is subject to being replaced.

- */ - private void _init() throws Exception { - } - - private Page page1 = new Page(); - - public Page getPage1() { - return page1; - } - - public void setPage1(Page p) { - this.page1 = p; - } - - private Html html1 = new Html(); - - public Html getHtml1() { - return html1; - } - - public void setHtml1(Html h) { - this.html1 = h; - } - - private Head head1 = new Head(); - - public Head getHead1() { - return head1; - } - - public void setHead1(Head h) { - this.head1 = h; - } - - private Link link1 = new Link(); - - public Link getLink1() { - return link1; - } - - public void setLink1(Link l) { - this.link1 = l; - } - - private Body body1 = new Body(); - - public Body getBody1() { - return body1; - } - - public void setBody1(Body b) { - this.body1 = b; - } - - private Form form1 = new Form(); - - public Form getForm1() { - return form1; - } - - public void setForm1(Form f) { - this.form1 = f; - } - - private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridBase1() { - return gridBase1; - } - - public void setGridBase1(HtmlPanelGrid hpg) { - this.gridBase1 = hpg; - } - - private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridLayout1() { - return gridLayout1; - } - - public void setGridLayout1(HtmlPanelGrid hpg) { - this.gridLayout1 = hpg; - } - - private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel1() { - return gridPanel1; - } - - public void setGridPanel1(HtmlPanelGrid hpg) { - this.gridPanel1 = hpg; - } - - private PanelGroup groupPanel1 = new PanelGroup(); - - public PanelGroup getGroupPanel1() { - return groupPanel1; - } - - public void setGroupPanel1(PanelGroup pg) { - this.groupPanel1 = pg; - } - - private ImageComponent image1 = new ImageComponent(); - - public ImageComponent getImage1() { - return image1; - } - - public void setImage1(ImageComponent ic) { - this.image1 = ic; - } - - private ImageComponent image2 = new ImageComponent(); - - public ImageComponent getImage2() { - return image2; - } - - public void setImage2(ImageComponent ic) { - this.image2 = ic; - } - - private PanelGroup groupPanel2 = new PanelGroup(); - - public PanelGroup getGroupPanel2() { - return groupPanel2; - } - - public void setGroupPanel2(PanelGroup pg) { - this.groupPanel2 = pg; - } - - private StaticText lblUser = new StaticText(); - - public StaticText getLblUser() { - return lblUser; - } - - public void setLblUser(StaticText st) { - this.lblUser = st; - } - - private StaticText staticText1 = new StaticText(); - - public StaticText getStaticText1() { - return staticText1; - } - - public void setStaticText1(StaticText st) { - this.staticText1 = st; - } - - private Hyperlink lnkEditUser = new Hyperlink(); - - public Hyperlink getLnkEditUser() { - return lnkEditUser; - } - - public void setLnkEditUser(Hyperlink h) { - this.lnkEditUser = h; - } - - private StaticText staticText2 = new StaticText(); - - public StaticText getStaticText2() { - return staticText2; - } - - public void setStaticText2(StaticText st) { - this.staticText2 = st; - } - - private Hyperlink lnkLogout = new Hyperlink(); - - public Hyperlink getLnkLogout() { - return lnkLogout; - } - - public void setLnkLogout(Hyperlink h) { - this.lnkLogout = h; - } - - private HtmlPanelGrid gridMsg1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridMsg1() { - return gridMsg1; - } - - public void setGridMsg1(HtmlPanelGrid hpg) { - this.gridMsg1 = hpg; - } - - private StaticText txtMsg = new StaticText(); - - public StaticText getTxtMsg() { - return txtMsg; - } - - public void setTxtMsg(StaticText st) { - this.txtMsg = st; - } - - private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel2() { - return gridPanel2; - } - - public void setGridPanel2(HtmlPanelGrid hpg) { - this.gridPanel2 = hpg; - } - - private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel3() { - return gridPanel3; - } - - public void setGridPanel3(HtmlPanelGrid hpg) { - this.gridPanel3 = hpg; - } - - private PanelGroup groupPanel3 = new PanelGroup(); - - public PanelGroup getGroupPanel3() { - return groupPanel3; - } - - public void setGroupPanel3(PanelGroup pg) { - this.groupPanel3 = pg; - } - - private StaticText stCriarEditar = new StaticText(); - - public StaticText getStCriarEditar() { - return stCriarEditar; - } - - public void setStCriarEditar(StaticText st) { - this.stCriarEditar = st; - } - - private StaticText staticText4 = new StaticText(); - - public StaticText getStaticText4() { - return staticText4; - } - - public void setStaticText4(StaticText st) { - this.staticText4 = st; - } - - private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel4() { - return gridPanel4; - } - - public void setGridPanel4(HtmlPanelGrid hpg) { - this.gridPanel4 = hpg; - } - - private StaticText staticText5 = new StaticText(); - - public StaticText getStaticText5() { - return staticText5; - } - - public void setStaticText5(StaticText st) { - this.staticText5 = st; - } - - private DropDown drpTipo = new DropDown(); - - public DropDown getDrpTipo() { - return drpTipo; - } - - public void setDrpTipo(DropDown dd) { - this.drpTipo = dd; - } - - private StaticText staticText6 = new StaticText(); - - public StaticText getStaticText6() { - return staticText6; - } - - public void setStaticText6(StaticText st) { - this.staticText6 = st; - } - - private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel5() { - return gridPanel5; - } - - public void setGridPanel5(HtmlPanelGrid hpg) { - this.gridPanel5 = hpg; - } - - private DropDown drpNome = new DropDown(); - - public DropDown getDrpNome() { - return drpNome; - } - - public void setDrpNome(DropDown dd) { - this.drpNome = dd; - } - - private TextField txtNome = new TextField(); - - public TextField getTxtNome() { - return txtNome; - } - - public void setTxtNome(TextField tf) { - this.txtNome = tf; - } - - private StaticText staticText7 = new StaticText(); - - public StaticText getStaticText7() { - return staticText7; - } - - public void setStaticText7(StaticText st) { - this.staticText7 = st; - } - - private TextField txtLogin = new TextField(); - - public TextField getTxtLogin() { - return txtLogin; - } - - public void setTxtLogin(TextField tf) { - this.txtLogin = tf; - } - - private StaticText staticText8 = new StaticText(); - - public StaticText getStaticText8() { - return staticText8; - } - - public void setStaticText8(StaticText st) { - this.staticText8 = st; - } - - private PasswordField txtPassword = new PasswordField(); - - public PasswordField getTxtPassword() { - return txtPassword; - } - - public void setTxtPassword(PasswordField pf) { - this.txtPassword = pf; - } - - private StaticText staticText9 = new StaticText(); - - public StaticText getStaticText9() { - return staticText9; - } - - public void setStaticText9(StaticText st) { - this.staticText9 = st; - } - - private TextField txtEmail = new TextField(); - - public TextField getTxtEmail() { - return txtEmail; - } - - public void setTxtEmail(TextField tf) { - this.txtEmail = tf; - } - - private StaticText lblCap = new StaticText(); - - public StaticText getLblCap() { - return lblCap; - } - - public void setLblCap(StaticText st) { - this.lblCap = st; - } - - private TextField txtCap = new TextField(); - - public TextField getTxtCap() { - return txtCap; - } - - public void setTxtCap(TextField tf) { - this.txtCap = tf; - } - - private StaticText lblCedula = new StaticText(); - - public StaticText getLblCedula() { - return lblCedula; - } - - public void setLblCedula(StaticText st) { - this.lblCedula = st; - } - - private StaticText stCedula = new StaticText(); - - public StaticText getStCedula() { - return stCedula; - } - - public void setStCedula(StaticText st) { - this.stCedula = st; - } - - private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel6() { - return gridPanel6; - } - - public void setGridPanel6(HtmlPanelGrid hpg) { - this.gridPanel6 = hpg; - } - - private PanelGroup groupPanel4 = new PanelGroup(); - - public PanelGroup getGroupPanel4() { - return groupPanel4; - } - - public void setGroupPanel4(PanelGroup pg) { - this.groupPanel4 = pg; - } - - private StaticText staticText13 = new StaticText(); - - public StaticText getStaticText13() { - return staticText13; - } - - public void setStaticText13(StaticText st) { - this.staticText13 = st; - } - - private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel7() { - return gridPanel7; - } - - public void setGridPanel7(HtmlPanelGrid hpg) { - this.gridPanel7 = hpg; - } - - private Button butCancelar = new Button(); - - public Button getButCancelar() { - return butCancelar; - } - - public void setButCancelar(Button b) { - this.butCancelar = b; - } - - private PanelGroup groupPanel5 = new PanelGroup(); - - public PanelGroup getGroupPanel5() { - return groupPanel5; - } - - public void setGroupPanel5(PanelGroup pg) { - this.groupPanel5 = pg; - } - - private Button butApagar = new Button(); - - public Button getButApagar() { - return butApagar; - } - - public void setButApagar(Button b) { - this.butApagar = b; - } - - private Button butGravar = new Button(); - - public Button getButGravar() { - return butGravar; - } - - public void setButGravar(Button b) { - this.butGravar = b; - } - - private HiddenField hidConfDelUser = new HiddenField(); - - public HiddenField getHidConfDelUser() { - return hidConfDelUser; - } - - public void setHidConfDelUser(HiddenField hf) { - this.hidConfDelUser = hf; - } - - //
- private boolean isPostData = false; - - private final static int SEG = 1; - private final static int RH = 2; - private final static int HS = 3; - private final static int MEDICO = 5; - private final static int ADMIN_LOJA = 6; - - private StaticText staticText12 = new StaticText(); - - public StaticText getStaticText12() { - return staticText12; - } - - public void setStaticText12(StaticText st) { - this.staticText12 = st; - } - - private DropDown drpEstabelecimentos = new DropDown(); - - public DropDown getDrpEstabelecimentos() { - return drpEstabelecimentos; - } - - public void setDrpEstabelecimentos(DropDown dd) { - this.drpEstabelecimentos = dd; - } - - private SingleSelectOptionsList drpEstabelecimentosDefaultOptions = new SingleSelectOptionsList(); - - public SingleSelectOptionsList getDrpEstabelecimentosDefaultOptions() { - return drpEstabelecimentosDefaultOptions; - } - - public void setDrpEstabelecimentosDefaultOptions(SingleSelectOptionsList ssol) { - this.drpEstabelecimentosDefaultOptions = ssol; - } - - /** - *

Construct a new Page bean instance.

- */ - public FichaUtilizador() { - } - - /** - *

Callback method that is called whenever a page is navigated to, - * either directly via a URL, or indirectly via page navigation. - * Customize this method to acquire resources that will be needed - * for event handlers and lifecycle methods, whether or not this - * page is performing post back processing.

- * - *

Note that, if the current request is a postback, the property - * values of the components do not represent any - * values submitted with this request. Instead, they represent the - * property values that were saved for this view when it was rendered.

- */ - public void init() { - // Perform initializations inherited from our superclass - super.init(); - // Perform application initialization that must complete - // *before* managed components are initialized - // TODO - add your own initialiation code here - - // - // Initialize automatically managed components - // *Note* - this logic should NOT be modified - try { - _init(); - } catch (Exception e) { - log("FichaUtilizador Initialization Failure", e); - throw e instanceof FacesException ? (FacesException) e: new FacesException(e); - } - - // - // Perform application initialization that must complete - // *after* managed components are initialized - // TODO - add your own initialization code here - if (!getSessionBean1().isLoggedIn()) { - try { - getExternalContext().redirect("Login.jsp"); - } catch(Exception e) { - // . . . handle exception . . . - } - } - - - - - HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest(); - String referer = request.getRequestURI(); - String pageFrom = Utils.getPageFrom(referer); - if(pageFrom.matches("FichaUtilizador.jsp")) - { - isPostData = true; - } - if(!isPostData) - { - lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); - AnalisesDataProvider adp = new AnalisesDataProvider(); - try - { - getSessionBean1().setTiposOptions(adp.getTiposList()); - drpTipo.setSelected(new Integer(0)); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - try - { - getSessionBean1().setEstabelecimentosOptions(adp.getEstabelecimentosList( getSessionBean1().getCurrentUser().getEmpresa_id() )); - drpEstabelecimentos.setSelected(new Integer(0)); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - } - else //postData - { - String del_user = (String)getExternalContext().getRequestParameterMap().get("del_user"); - if(del_user != null) - { - if(del_user.matches("yes")) - { - hidConfDelUser.setValue(""); - try - { - deleteUser(); - } - catch(Exception ex) - { - ex.printStackTrace(); - getSessionBean1().setMsg("Erro na eliminação do utilizador !"); - } - - //force a page reload -// try -// { -// getExternalContext().redirect("FichaUtilizador.jsp"); -// System.out.println("REDIRECT"); -// } -// catch(Exception ex) -// { -// ex.printStackTrace(); -// } - - } - else if(del_user.matches("no")) - { - hidConfDelUser.setValue(""); - showUser(); - } - } - - } - - } - - /** - *

Callback method that is called after the component tree has been - * restored, but before any event processing takes place. This method - * will only be called on a postback request that - * is processing a form submit. Customize this method to allocate - * resources that will be required in your event handlers.

- */ - public void preprocess() { - } - - /** - *

Callback method that is called just before rendering takes place. - * This method will only be called for the page that - * will actually be rendered (and not, for example, on a page that - * handled a postback and then navigated to a different page). Customize - * this method to allocate resources that will be required for rendering - * this page.

- */ - public void prerender() { - stCriarEditar.setText("EDITAR"); - butApagar.setRendered(true); - if(getSessionBean1().getModoEdicaoUtilizador().matches("new")) - { - if(!isPostData) - { - txtNome.setStyleClass("hide"); - stCriarEditar.setText("CRIAR"); - } - butApagar.setRendered(false); - } - if(getSessionBean1().getModoEdicaoUtilizador().matches("edit")) - { - //drpNome.setRendered(true); - if(!isPostData) - { - showUser(); - } - } - txtMsg.setText(getSessionBean1().getMsg()); - getSessionBean1().setMsg(""); - } - - /** - *

Callback method that is called after rendering is completed for - * this request, if init() was called (regardless of whether - * or not this was the page that was actually rendered). Customize this - * method to release resources acquired in the init(), - * preprocess(), or prerender() methods (or - * acquired during execution of an event handler).

- */ - public void destroy() { - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected SessionBean1 getSessionBean1() { - return (SessionBean1)getBean("SessionBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected ApplicationBean1 getApplicationBean1() { - return (ApplicationBean1)getBean("ApplicationBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected RequestBean1 getRequestBean1() { - return (RequestBean1)getBean("RequestBean1"); - } - - public String lnkLogout_action() { - // TODO: Replace with your code - - javax.servlet.http.HttpSession session = - (javax.servlet.http.HttpSession) getExternalContext().getSession(true); - session.invalidate(); - return "login"; - } - - - public String butCancelar_action() { - // TODO: Process the button click action. Return value is a navigation - // case name where null will return to the same page. - - String nav_from = getSessionBean1().getNavFrom(); - if(nav_from.matches("FormSeguranca")) - { - return "form_seguranca"; - } - else if(nav_from.matches("FormRH")) - { - return "form_rh"; - } - else if(nav_from.matches("FormHS")) - { - return "form_hs"; - } - else if(nav_from.matches("FormMedico")) - { - return "form_medico"; - } - else if(nav_from.matches("AnaliseAcidenteTrabalho")) - { - System.out.println("GOTO ANALISE ACIDENTE"); - return "analise_acidente"; - } - else if(nav_from.matches("ViewAnaliseAcidenteTrabalho")) - { - return "view_analise"; - } - return "case1"; - } - - public String butGravar_action() { - // TODO: Process the button click action. Return value is a navigation - // case name where null will return to the same page. - if(validationOk()) - { - if(getSessionBean1().getModoEdicaoUtilizador().matches("new")) - { - try - { - Utilizador u = addUser(); - addPermissao(u); - } - catch(Exception ex) - { - getSessionBean1().setMsg("Erro na criação do utilizador"); - ex.printStackTrace(); - } - } - else //edit - { - try - { - updateUser(); - } - catch(Exception ex) - { - getSessionBean1().setMsg("Erro na actualização do utilizador"); - ex.printStackTrace(); - } - } - - } - - return null; - } - - public void drpTipo_processValueChange(ValueChangeEvent event) { - // TODO: Replace with your code - drpNome.setVisible(true); - Integer tipo = (Integer) drpTipo.getSelected(); - if(tipo.intValue() == SEG || tipo.intValue() == RH || tipo.intValue() == ADMIN_LOJA) - { - drpNome.setRendered(false); - txtNome.setStyleClass("show"); - lblCap.setRendered(false); - txtCap.setRendered(false); - lblCedula.setRendered(false); - stCedula.setRendered(false); - } - else if(tipo.intValue() == HS || tipo.intValue() == MEDICO) - { - drpNome.setRendered(true); - txtNome.setStyleClass("hide"); - AnalisesDataProvider adp = new AnalisesDataProvider(); - if(tipo.intValue() == HS) - { - lblCap.setRendered(true); - txtCap.setRendered(true); - lblCedula.setRendered(false); - stCedula.setRendered(false); - try - { - getSessionBean1().setMedicosOptions(adp.getTecnicosSaudeList()); - drpNome.setSelected(new Integer(0)); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - } - else // medicos - { - lblCedula.setRendered(true); - stCedula.setRendered(true); - lblCap.setRendered(false); - txtCap.setRendered(false); - try - { - getSessionBean1().setMedicosOptions(adp.getMedicosList()); - drpNome.setSelected(new Integer(0)); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - } - } - } - - private boolean validationOk() - { - Integer tipo = (Integer) drpTipo.getSelected(); - if(tipo.intValue() == 0) - { - getSessionBean1().setMsg("Tem de escolher um tipo !"); - return false; - } - Integer estabelecimento = (Integer) drpEstabelecimentos.getSelected(); - if(estabelecimento.intValue() == 0) - { - getSessionBean1().setMsg("Tem de escolher um estabelecimento !"); - return false; - } - - if(tipo.intValue() == SEG || tipo.intValue() == RH || tipo.intValue() == HS || tipo.intValue() == MEDICO || tipo.intValue() == ADMIN_LOJA) - { - if(txtNome.getText() == null) - { - getSessionBean1().setMsg("Tem de indicar o nome !"); - return false; - } - else - { - String nome = (String) txtNome.getText(); - if(nome.trim().length() == 0) - { - getSessionBean1().setMsg("Tem de indicar o nome !"); - return false; - } - } - } - else if(tipo.intValue() == HS || tipo.intValue() == MEDICO) - { - Integer nome = (Integer) drpNome.getSelected(); - if(nome.intValue() == 0) - { - getSessionBean1().setMsg("Tem de indicar o nome !"); - return false; - } - } - - if(txtLogin.getText() == null) - { - getSessionBean1().setMsg("Tem de indicar o login !"); - return false; - } - else - { - String login = (String) txtLogin.getText(); - if(login.trim().length() == 0) - { - getSessionBean1().setMsg("Tem de indicar o login !"); - return false; - } - } - - if(txtPassword.getText() == null) - { - getSessionBean1().setMsg("Tem de indicar a password !"); - return false; - } - else - { - String password = (String) txtPassword.getText(); - if(password.trim().length() == 0) - { - getSessionBean1().setMsg("Tem de indicar a password !"); - return false; - } - } - - if(tipo.intValue() == HS) - { - if(txtCap.getText() == null ) - { - getSessionBean1().setMsg("Tem de indicar o c.a.p. !"); - return false; - } - else - { - String cap = (String) txtCap.getText(); - if(cap.trim().length() == 0) - { - getSessionBean1().setMsg("Tem de indicar o c.a.p. !"); - return false; - } - } - } - - return true; - } - - public void drpNome_processValueChange(ValueChangeEvent event) { - // TODO: Replace with your code - Integer tipo = (Integer) drpTipo.getSelected(); - if(tipo.intValue() == MEDICO) - { - AnalisesDataProvider adp = new AnalisesDataProvider(); - Integer medico_id = (Integer) drpNome.getSelected(); - try - { - String numero_cedula = adp.getNumeroCedula(medico_id); - stCedula.setText(numero_cedula); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - } - } - - private Utilizador addUser() throws Exception - { - Utilizador u = fillUser(); - UtilizadoresDataProvider udp = new UtilizadoresDataProvider(); - Integer id = udp.createNewUtilizador(u); - u.setId(id); - return u; - } - - private void addPermissao(Utilizador u) throws Exception - { - Permissao p = new Permissao(); - p.setUser_id(u.getId()); - p.setCodigo_permissao(u.getTipo()); - UtilizadoresDataProvider udp = new UtilizadoresDataProvider(); - udp.createPermissao(p); - } - - private void updateUser() throws Exception - { - Utilizador u = fillUser(); - u.setId(getSessionBean1().getCurrentUser().getId()); - UtilizadoresDataProvider udp = new UtilizadoresDataProvider(); - udp.updateUtilizador(u); - } - - private void deleteUser() throws Exception - { - UtilizadoresDataProvider udp = new UtilizadoresDataProvider(); - udp.deleteUser(getSessionBean1().getCurrentUser().getId()); - } - - private void showUser() - { - AnalisesDataProvider adp = new AnalisesDataProvider(); - Utilizador u = getSessionBean1().getCurrentUser(); - drpTipo.setSelected(u.getTipo()); - if(u.getTipo().intValue() == SEG || u.getTipo().intValue() == RH || u.getTipo().intValue() == HS || u.getTipo().intValue() == MEDICO || u.getTipo().intValue() == ADMIN_LOJA) - { - drpNome.setRendered(false); - txtNome.setStyleClass("show"); - lblCap.setRendered(false); - txtCap.setRendered(false); - lblCedula.setRendered(false); - stCedula.setRendered(false); - System.out.println("NOME == " + u.getNome()); - txtNome.setText(utils.Utils.unicodeToHTML(u.getNome())); - } - else if(u.getTipo().intValue() == HS) - { - //txtNome.setRendered(false); - try - { - getSessionBean1().setMedicosOptions(adp.getTecnicosSaudeList()); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - drpNome.setSelected(u.getFuncionario_hst_id()); - drpNome.setStyleClass("show"); - lblCap.setRendered(true); - txtCap.setRendered(true); - lblCedula.setRendered(false); - stCedula.setRendered(false); - txtCap.setText(u.getCap()); - } - else if(u.getTipo().intValue() == MEDICO) //medico - { - drpNome.setRendered(true); - try - { - getSessionBean1().setMedicosOptions(adp.getMedicosList()); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - drpNome.setSelected(u.getMedico_id()); - txtNome.setStyleClass("hide"); - lblCap.setRendered(false); - txtCap.setRendered(false); - lblCedula.setRendered(true); - stCedula.setRendered(true); - stCedula.setText(u.getNumero_cedula()); - - } - drpEstabelecimentos.setSelected(u.getEstabelecimento_id()); - txtLogin.setText(u.getLogin()); - txtPassword.setText(u.getPassword()); - txtEmail.setText(u.getEmail()); - } - - private Utilizador fillUser() - { - Utilizador u = new Utilizador(); - u.setActivo("y"); - u.setAdministrador("n"); - u.setTipo((Integer) drpTipo.getSelected()); - u.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id()); - u.setEstabelecimento_id( (Integer) drpEstabelecimentos.getSelected() ); - u.setLogin( (String) txtLogin.getText() ); - u.setPassword( (String) txtPassword.getText() ); - u.setEmail(""); - if(txtEmail.getText() != null) - { - u.setEmail( (String) txtEmail.getText() ); - } - - Integer tipo = (Integer) drpTipo.getSelected(); - - u.setNumero_cedula(""); - u.setCap(""); - if(tipo.intValue() == HS || tipo.intValue() == MEDICO) - { - AnalisesDataProvider adp = new AnalisesDataProvider(); - if(tipo.intValue() == HS) - { - try - { - Integer tecnico_id = (Integer) drpNome.getSelected(); - u.setFuncionario_hst_id(tecnico_id); - u.setNome( adp.getTecnicoSaudeNome(tecnico_id) ); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - u.setCap( (String) txtCap.getText()); - } - else // medico - { - try - { - Integer medico_id = (Integer) drpNome.getSelected(); - u.setMedico_id(medico_id); - u.setNome( adp.getMedicoNome(medico_id) ); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - u.setNumero_cedula( (String) stCedula.getText()); - } - } - else - { - u.setNome( (String) txtNome.getText() ); - } - return u; - } - - public String lnkEditUser_action() { - // TODO: Replace with your code - - getSessionBean1().setModoEdicaoUtilizador("edit"); - return "user"; - } - - public String butApagar_action() { - // TODO: Replace with your code - hidConfDelUser.setValue("apagar"); - return null; - } -} - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Footer.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Footer.java deleted file mode 100644 index 52f9e49d..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Footer.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Footer.java - * - * Created on September 19, 2007, 10:57 AM - * Copyright lluis - */ -package analiseacidentestrabalho; - -import com.sun.rave.web.ui.appbase.AbstractFragmentBean; -import com.sun.rave.web.ui.component.ImageComponent; -import com.sun.rave.web.ui.component.PanelGroup; -import com.sun.rave.web.ui.component.StaticText; -import javax.faces.FacesException; -import javax.faces.component.html.HtmlPanelGrid; - -/** - *

Fragment bean that corresponds to a similarly named JSP page - * fragment. This class contains component definitions (and initialization - * code) for all components that you have defined on this fragment, as well as - * lifecycle methods and event handlers where you may add behavior - * to respond to incoming events.

- */ -public class Footer extends AbstractFragmentBean { - // - private int __placeholder; - - /** - *

Automatically managed component initialization. WARNING: - * This method is automatically generated, so any user-specified code inserted - * here is subject to being replaced.

- */ - private void _init() throws Exception { - } - - private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel1() { - return gridPanel1; - } - - public void setGridPanel1(HtmlPanelGrid hpg) { - this.gridPanel1 = hpg; - } - - private PanelGroup groupPanel1 = new PanelGroup(); - - public PanelGroup getGroupPanel1() { - return groupPanel1; - } - - public void setGroupPanel1(PanelGroup pg) { - this.groupPanel1 = pg; - } - - private StaticText staticText1 = new StaticText(); - - public StaticText getStaticText1() { - return staticText1; - } - - public void setStaticText1(StaticText st) { - this.staticText1 = st; - } - - private StaticText staticText2 = new StaticText(); - - public StaticText getStaticText2() { - return staticText2; - } - - public void setStaticText2(StaticText st) { - this.staticText2 = st; - } - - private ImageComponent image1 = new ImageComponent(); - - public ImageComponent getImage1() { - return image1; - } - - public void setImage1(ImageComponent ic) { - this.image1 = ic; - } - //
- - public Footer() { - } - - /** - *

Callback method that is called whenever a page containing - * this page fragment is navigated to, either directly via a URL, - * or indirectly via page navigation. Override this method to acquire - * resources that will be needed for event handlers and lifecycle methods.

- * - *

The default implementation does nothing.

- */ - public void init() { - // Perform initializations inherited from our superclass - super.init(); - // Perform application initialization that must complete - // *before* managed components are initialized - // TODO - add your own initialiation code here - - - // - // Initialize automatically managed components - // *Note* - this logic should NOT be modified - try { - _init(); - } catch (Exception e) { - log("Page1 Initialization Failure", e); - throw e instanceof FacesException ? (FacesException) e: new FacesException(e); - } - - // - // Perform application initialization that must complete - // *after* managed components are initialized - // TODO - add your own initialization code here - } - - /** - *

Callback method that is called after rendering is completed for - * this request, if init() was called. Override this - * method to release resources acquired in the init() - * resources that will be needed for event handlers and lifecycle methods.

- * - *

The default implementation does nothing.

- */ - public void destroy() { - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected RequestBean1 getRequestBean1() { - return (RequestBean1)getBean("RequestBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected SessionBean1 getSessionBean1() { - return (SessionBean1)getBean("SessionBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected ApplicationBean1 getApplicationBean1() { - return (ApplicationBean1)getBean("ApplicationBean1"); - } -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormHS.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormHS.java deleted file mode 100644 index 1c0ec398..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormHS.java +++ /dev/null @@ -1,1327 +0,0 @@ -/* - * FormHS.java - * - * Created on October 1, 2007, 1:43 PM - * Copyright lluis - */ -package analiseacidentestrabalho; - -import com.sun.data.provider.RowKey; -import com.sun.rave.web.ui.appbase.AbstractPageBean; -import com.sun.rave.web.ui.component.Body; -import com.sun.rave.web.ui.component.Button; -import com.sun.rave.web.ui.component.DropDown; -import com.sun.rave.web.ui.component.Form; -import com.sun.rave.web.ui.component.Head; -import com.sun.rave.web.ui.component.Html; -import com.sun.rave.web.ui.component.Hyperlink; -import com.sun.rave.web.ui.component.ImageComponent; -import com.sun.rave.web.ui.component.Link; -import com.sun.rave.web.ui.component.Page; -import com.sun.rave.web.ui.component.PanelGroup; -import com.sun.rave.web.ui.component.StaticText; -import com.sun.rave.web.ui.component.Table; -import com.sun.rave.web.ui.component.TableColumn; -import com.sun.rave.web.ui.component.TableRowGroup; -import com.sun.rave.web.ui.component.TextField; -import com.sun.rave.web.ui.model.Option; -import db.AnalisesActualDataProvider; -import db.AnalisesConcluidasDataProvider; -import db.AnalisesDataProvider; -import db.AnalisesSeguimentoDataProvider; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.GregorianCalendar; -import java.util.ListIterator; -import javax.faces.FacesException; -import javax.faces.component.html.HtmlPanelGrid; -import javax.faces.event.ValueChangeEvent; -import javax.servlet.http.HttpServletRequest; -import utils.Utils; - -/** - *

Page bean that corresponds to a similarly named JSP page. This - * class contains component definitions (and initialization code) for - * all components that you have defined on this page, as well as - * lifecycle methods and event handlers where you may add behavior - * to respond to incoming events.

- */ -public class FormHS extends AbstractPageBean { - // - private int __placeholder; - - /** - *

Automatically managed component initialization. WARNING: - * This method is automatically generated, so any user-specified code inserted - * here is subject to being replaced.

- */ - private void _init() throws Exception { - } - - private Page page1 = new Page(); - - public Page getPage1() { - return page1; - } - - public void setPage1(Page p) { - this.page1 = p; - } - - private Html html1 = new Html(); - - public Html getHtml1() { - return html1; - } - - public void setHtml1(Html h) { - this.html1 = h; - } - - private Head head1 = new Head(); - - public Head getHead1() { - return head1; - } - - public void setHead1(Head h) { - this.head1 = h; - } - - private Link link1 = new Link(); - - public Link getLink1() { - return link1; - } - - public void setLink1(Link l) { - this.link1 = l; - } - - private Body body1 = new Body(); - - public Body getBody1() { - return body1; - } - - public void setBody1(Body b) { - this.body1 = b; - } - - private Form form1 = new Form(); - - public Form getForm1() { - return form1; - } - - public void setForm1(Form f) { - this.form1 = f; - } - - private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridBase1() { - return gridBase1; - } - - public void setGridBase1(HtmlPanelGrid hpg) { - this.gridBase1 = hpg; - } - - private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridLayout1() { - return gridLayout1; - } - - public void setGridLayout1(HtmlPanelGrid hpg) { - this.gridLayout1 = hpg; - } - - private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel1() { - return gridPanel1; - } - - public void setGridPanel1(HtmlPanelGrid hpg) { - this.gridPanel1 = hpg; - } - - private PanelGroup groupPanel1 = new PanelGroup(); - - public PanelGroup getGroupPanel1() { - return groupPanel1; - } - - public void setGroupPanel1(PanelGroup pg) { - this.groupPanel1 = pg; - } - - private ImageComponent image1 = new ImageComponent(); - - public ImageComponent getImage1() { - return image1; - } - - public void setImage1(ImageComponent ic) { - this.image1 = ic; - } - - private ImageComponent image2 = new ImageComponent(); - - public ImageComponent getImage2() { - return image2; - } - - public void setImage2(ImageComponent ic) { - this.image2 = ic; - } - - private PanelGroup groupPanel2 = new PanelGroup(); - - public PanelGroup getGroupPanel2() { - return groupPanel2; - } - - public void setGroupPanel2(PanelGroup pg) { - this.groupPanel2 = pg; - } - - private StaticText lblUser = new StaticText(); - - public StaticText getLblUser() { - return lblUser; - } - - public void setLblUser(StaticText st) { - this.lblUser = st; - } - - private StaticText staticText1 = new StaticText(); - - public StaticText getStaticText1() { - return staticText1; - } - - public void setStaticText1(StaticText st) { - this.staticText1 = st; - } - - private Hyperlink lnkEditUser = new Hyperlink(); - - public Hyperlink getLnkEditUser() { - return lnkEditUser; - } - - public void setLnkEditUser(Hyperlink h) { - this.lnkEditUser = h; - } - - private StaticText staticText2 = new StaticText(); - - public StaticText getStaticText2() { - return staticText2; - } - - public void setStaticText2(StaticText st) { - this.staticText2 = st; - } - - private Hyperlink lnkLogout = new Hyperlink(); - - public Hyperlink getLnkLogout() { - return lnkLogout; - } - - public void setLnkLogout(Hyperlink h) { - this.lnkLogout = h; - } - - private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridLayoutTop1() { - return gridLayoutTop1; - } - - public void setGridLayoutTop1(HtmlPanelGrid hpg) { - this.gridLayoutTop1 = hpg; - } - - private HtmlPanelGrid gridActual1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridActual1() { - return gridActual1; - } - - public void setGridActual1(HtmlPanelGrid hpg) { - this.gridActual1 = hpg; - } - - private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel2() { - return gridPanel2; - } - - public void setGridPanel2(HtmlPanelGrid hpg) { - this.gridPanel2 = hpg; - } - - private StaticText staticText4 = new StaticText(); - - public StaticText getStaticText4() { - return staticText4; - } - - public void setStaticText4(StaticText st) { - this.staticText4 = st; - } - - private StaticText staticText5 = new StaticText(); - - public StaticText getStaticText5() { - return staticText5; - } - - public void setStaticText5(StaticText st) { - this.staticText5 = st; - } - - private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel3() { - return gridPanel3; - } - - public void setGridPanel3(HtmlPanelGrid hpg) { - this.gridPanel3 = hpg; - } - - private Table table1 = new Table(); - - public Table getTable1() { - return table1; - } - - public void setTable1(Table t) { - this.table1 = t; - } - - private TableRowGroup tableRowGroup1 = new TableRowGroup(); - - public TableRowGroup getTableRowGroup1() { - return tableRowGroup1; - } - - public void setTableRowGroup1(TableRowGroup trg) { - this.tableRowGroup1 = trg; - } - - private TableColumn tableColumn1 = new TableColumn(); - - public TableColumn getTableColumn1() { - return tableColumn1; - } - - public void setTableColumn1(TableColumn tc) { - this.tableColumn1 = tc; - } - - private Hyperlink lnkDataAcidente = new Hyperlink(); - - public Hyperlink getLnkDataAcidente() { - return lnkDataAcidente; - } - - public void setLnkDataAcidente(Hyperlink h) { - this.lnkDataAcidente = h; - } - - private TableColumn tableColumn2 = new TableColumn(); - - public TableColumn getTableColumn2() { - return tableColumn2; - } - - public void setTableColumn2(TableColumn tc) { - this.tableColumn2 = tc; - } - - private Hyperlink lnkNr = new Hyperlink(); - - public Hyperlink getLnkNr() { - return lnkNr; - } - - public void setLnkNr(Hyperlink h) { - this.lnkNr = h; - } - - private TableColumn tableColumn3 = new TableColumn(); - - public TableColumn getTableColumn3() { - return tableColumn3; - } - - public void setTableColumn3(TableColumn tc) { - this.tableColumn3 = tc; - } - - private Hyperlink lnkNomeAcidentado = new Hyperlink(); - - public Hyperlink getLnkNomeAcidentado() { - return lnkNomeAcidentado; - } - - public void setLnkNomeAcidentado(Hyperlink h) { - this.lnkNomeAcidentado = h; - } - - private HtmlPanelGrid gridSeguimento1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridSeguimento1() { - return gridSeguimento1; - } - - public void setGridSeguimento1(HtmlPanelGrid hpg) { - this.gridSeguimento1 = hpg; - } - - private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel4() { - return gridPanel4; - } - - public void setGridPanel4(HtmlPanelGrid hpg) { - this.gridPanel4 = hpg; - } - - private StaticText staticText6 = new StaticText(); - - public StaticText getStaticText6() { - return staticText6; - } - - public void setStaticText6(StaticText st) { - this.staticText6 = st; - } - - private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel5() { - return gridPanel5; - } - - public void setGridPanel5(HtmlPanelGrid hpg) { - this.gridPanel5 = hpg; - } - - private Table table2 = new Table(); - - public Table getTable2() { - return table2; - } - - public void setTable2(Table t) { - this.table2 = t; - } - - private TableRowGroup tableRowGroup2 = new TableRowGroup(); - - public TableRowGroup getTableRowGroup2() { - return tableRowGroup2; - } - - public void setTableRowGroup2(TableRowGroup trg) { - this.tableRowGroup2 = trg; - } - - private TableColumn tableColumn4 = new TableColumn(); - - public TableColumn getTableColumn4() { - return tableColumn4; - } - - public void setTableColumn4(TableColumn tc) { - this.tableColumn4 = tc; - } - - private Hyperlink lnkDataAcidenteSeg = new Hyperlink(); - - public Hyperlink getLnkDataAcidenteSeg() { - return lnkDataAcidenteSeg; - } - - public void setLnkDataAcidenteSeg(Hyperlink h) { - this.lnkDataAcidenteSeg = h; - } - - private TableColumn tableColumn5 = new TableColumn(); - - public TableColumn getTableColumn5() { - return tableColumn5; - } - - public void setTableColumn5(TableColumn tc) { - this.tableColumn5 = tc; - } - - private Hyperlink lnkNrSeg = new Hyperlink(); - - public Hyperlink getLnkNrSeg() { - return lnkNrSeg; - } - - public void setLnkNrSeg(Hyperlink h) { - this.lnkNrSeg = h; - } - - private TableColumn tableColumn6 = new TableColumn(); - - public TableColumn getTableColumn6() { - return tableColumn6; - } - - public void setTableColumn6(TableColumn tc) { - this.tableColumn6 = tc; - } - - private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink(); - - public Hyperlink getLnkNomeAcidentadoSeg() { - return lnkNomeAcidentadoSeg; - } - - public void setLnkNomeAcidentadoSeg(Hyperlink h) { - this.lnkNomeAcidentadoSeg = h; - } - - private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridConcluidos1() { - return gridConcluidos1; - } - - public void setGridConcluidos1(HtmlPanelGrid hpg) { - this.gridConcluidos1 = hpg; - } - - private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel6() { - return gridPanel6; - } - - public void setGridPanel6(HtmlPanelGrid hpg) { - this.gridPanel6 = hpg; - } - - private StaticText staticText7 = new StaticText(); - - public StaticText getStaticText7() { - return staticText7; - } - - public void setStaticText7(StaticText st) { - this.staticText7 = st; - } - - private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel7() { - return gridPanel7; - } - - public void setGridPanel7(HtmlPanelGrid hpg) { - this.gridPanel7 = hpg; - } - - private PanelGroup groupPanel3 = new PanelGroup(); - - public PanelGroup getGroupPanel3() { - return groupPanel3; - } - - public void setGroupPanel3(PanelGroup pg) { - this.groupPanel3 = pg; - } - - private StaticText staticText8 = new StaticText(); - - public StaticText getStaticText8() { - return staticText8; - } - - public void setStaticText8(StaticText st) { - this.staticText8 = st; - } - - private DropDown drpAno = new DropDown(); - - public DropDown getDrpAno() { - return drpAno; - } - - public void setDrpAno(DropDown dd) { - this.drpAno = dd; - } - - private PanelGroup groupPanel4 = new PanelGroup(); - - public PanelGroup getGroupPanel4() { - return groupPanel4; - } - - public void setGroupPanel4(PanelGroup pg) { - this.groupPanel4 = pg; - } - - private StaticText lblMes = new StaticText(); - - public StaticText getLblMes() { - return lblMes; - } - - public void setLblMes(StaticText st) { - this.lblMes = st; - } - - private DropDown drpMes = new DropDown(); - - public DropDown getDrpMes() { - return drpMes; - } - - public void setDrpMes(DropDown dd) { - this.drpMes = dd; - } - - private PanelGroup groupPanel5 = new PanelGroup(); - - public PanelGroup getGroupPanel5() { - return groupPanel5; - } - - public void setGroupPanel5(PanelGroup pg) { - this.groupPanel5 = pg; - } - - private StaticText lblDia = new StaticText(); - - public StaticText getLblDia() { - return lblDia; - } - - public void setLblDia(StaticText st) { - this.lblDia = st; - } - - private DropDown drpDia = new DropDown(); - - public DropDown getDrpDia() { - return drpDia; - } - - public void setDrpDia(DropDown dd) { - this.drpDia = dd; - } - - private PanelGroup groupPanel6 = new PanelGroup(); - - public PanelGroup getGroupPanel6() { - return groupPanel6; - } - - public void setGroupPanel6(PanelGroup pg) { - this.groupPanel6 = pg; - } - - private StaticText staticText9 = new StaticText(); - - public StaticText getStaticText9() { - return staticText9; - } - - public void setStaticText9(StaticText st) { - this.staticText9 = st; - } - - private TextField txtNome = new TextField(); - - public TextField getTxtNome() { - return txtNome; - } - - public void setTxtNome(TextField tf) { - this.txtNome = tf; - } - - private Button butPesquisar = new Button(); - - public Button getButPesquisar() { - return butPesquisar; - } - - public void setButPesquisar(Button b) { - this.butPesquisar = b; - } - - private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel8() { - return gridPanel8; - } - - public void setGridPanel8(HtmlPanelGrid hpg) { - this.gridPanel8 = hpg; - } - - private Table table3 = new Table(); - - public Table getTable3() { - return table3; - } - - public void setTable3(Table t) { - this.table3 = t; - } - - private TableRowGroup tableRowGroup3 = new TableRowGroup(); - - public TableRowGroup getTableRowGroup3() { - return tableRowGroup3; - } - - public void setTableRowGroup3(TableRowGroup trg) { - this.tableRowGroup3 = trg; - } - - private TableColumn tableColumn7 = new TableColumn(); - - public TableColumn getTableColumn7() { - return tableColumn7; - } - - public void setTableColumn7(TableColumn tc) { - this.tableColumn7 = tc; - } - - private Hyperlink lnkDataConcluida = new Hyperlink(); - - public Hyperlink getLnkDataConcluida() { - return lnkDataConcluida; - } - - public void setLnkDataConcluida(Hyperlink h) { - this.lnkDataConcluida = h; - } - - private TableColumn tableColumn8 = new TableColumn(); - - public TableColumn getTableColumn8() { - return tableColumn8; - } - - public void setTableColumn8(TableColumn tc) { - this.tableColumn8 = tc; - } - - private Hyperlink lnkNrConcluida = new Hyperlink(); - - public Hyperlink getLnkNrConcluida() { - return lnkNrConcluida; - } - - public void setLnkNrConcluida(Hyperlink h) { - this.lnkNrConcluida = h; - } - - private TableColumn tableColumn9 = new TableColumn(); - - public TableColumn getTableColumn9() { - return tableColumn9; - } - - public void setTableColumn9(TableColumn tc) { - this.tableColumn9 = tc; - } - - private Hyperlink lnkNomeConcluida = new Hyperlink(); - - public Hyperlink getLnkNomeConcluida() { - return lnkNomeConcluida; - } - - public void setLnkNomeConcluida(Hyperlink h) { - this.lnkNomeConcluida = h; - } - - private StaticText txtSearchMsg = new StaticText(); - - public StaticText getTxtSearchMsg() { - return txtSearchMsg; - } - - public void setTxtSearchMsg(StaticText st) { - this.txtSearchMsg = st; - } - - private TableColumn tableColumn10 = new TableColumn(); - - public TableColumn getTableColumn10() { - return tableColumn10; - } - - public void setTableColumn10(TableColumn tc) { - this.tableColumn10 = tc; - } - - private Hyperlink lnkFase = new Hyperlink(); - - public Hyperlink getLnkFase() { - return lnkFase; - } - - public void setLnkFase(Hyperlink h) { - this.lnkFase = h; - } - - private TableColumn tableColumn11 = new TableColumn(); - - public TableColumn getTableColumn11() { - return tableColumn11; - } - - public void setTableColumn11(TableColumn tc) { - this.tableColumn11 = tc; - } - - private Hyperlink lnkFaseSeg = new Hyperlink(); - - public Hyperlink getLnkFaseSeg() { - return lnkFaseSeg; - } - - public void setLnkFaseSeg(Hyperlink h) { - this.lnkFaseSeg = h; - } - - //
- - /** - *

Construct a new Page bean instance.

- */ - public FormHS() { - } - - /** - *

Callback method that is called whenever a page is navigated to, - * either directly via a URL, or indirectly via page navigation. - * Customize this method to acquire resources that will be needed - * for event handlers and lifecycle methods, whether or not this - * page is performing post back processing.

- * - *

Note that, if the current request is a postback, the property - * values of the components do not represent any - * values submitted with this request. Instead, they represent the - * property values that were saved for this view when it was rendered.

- */ - public void init() { - // Perform initializations inherited from our superclass - super.init(); - // Perform application initialization that must complete - // *before* managed components are initialized - // TODO - add your own initialiation code here - - // - // Initialize automatically managed components - // *Note* - this logic should NOT be modified - try { - _init(); - } catch (Exception e) { - log("FormHS Initialization Failure", e); - throw e instanceof FacesException ? (FacesException) e: new FacesException(e); - } - - // - // Perform application initialization that must complete - // *after* managed components are initialized - // TODO - add your own initialization code here - - if (!getSessionBean1().isLoggedIn()) { - try { - getExternalContext().redirect("Login.jsp"); - } catch(Exception e) { - // . . . handle exception . . . - } - } - } - - /** - *

Callback method that is called after the component tree has been - * restored, but before any event processing takes place. This method - * will only be called on a postback request that - * is processing a form submit. Customize this method to allocate - * resources that will be required in your event handlers.

- */ - public void preprocess() { - } - - /** - *

Callback method that is called just before rendering takes place. - * This method will only be called for the page that - * will actually be rendered (and not, for example, on a page that - * handled a postback and then navigated to a different page). Customize - * this method to allocate resources that will be required for rendering - * this page.

- */ - public void prerender() { - lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); - - AnalisesDataProvider adp = new AnalisesDataProvider(); - try - { - //lblActivos.setRendered(true); - table1.setRendered(true); - - //ArrayList actuaisList = adp.getAnalisesActuaisList(getSessionBean1().getCurrentUser().getEstabelecimento_id(), new Integer(3)); - ArrayList actuaisList = adp.getAnalisesActuaisHsList( getSessionBean1().getCurrentUser().getEstabelecimento_id() ); - getSessionBean1().getAnalisesActualDataProvider().setList(actuaisList); - } - catch(Exception ex) - { - //lblActivos.setRendered(false); - table1.setRendered(false); - ex.printStackTrace(); - } - - try - { - //lblActivos.setRendered(true); - table2.setRendered(true); - - ArrayList seguimentoList = adp.getAnalisesSeguimentoHsList(getSessionBean1().getCurrentUser().getEstabelecimento_id()); - getSessionBean1().getAnalisesSeguimentoDataProvider().setList(seguimentoList); - } - catch(Exception ex) - { - //lblActivos.setRendered(false); - table2.setRendered(false); - ex.printStackTrace(); - } - - HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest(); - String referer = request.getRequestURI(); - String pageFrom = Utils.getPageFrom(referer); - if(!pageFrom.matches("FormHS.jsp")) - { - - try - { - //lblActivos.setRendered(true); - table3.setRendered(true); - - ArrayList concluidasList = adp.getAnalisesConcluidasList(getSessionBean1().getCurrentUser().getEstabelecimento_id()); - getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); - } - catch(Exception ex) - { - //lblActivos.setRendered(false); - table3.setRendered(false); - ex.printStackTrace(); - } - fillAnoDropDown(); - } - } - - /** - *

Callback method that is called after rendering is completed for - * this request, if init() was called (regardless of whether - * or not this was the page that was actually rendered). Customize this - * method to release resources acquired in the init(), - * preprocess(), or prerender() methods (or - * acquired during execution of an event handler).

- */ - public void destroy() { - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected ApplicationBean1 getApplicationBean1() { - return (ApplicationBean1)getBean("ApplicationBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected SessionBean1 getSessionBean1() { - return (SessionBean1)getBean("SessionBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected RequestBean1 getRequestBean1() { - return (RequestBean1)getBean("RequestBean1"); - } - - public String lnkLogout_action() { - // TODO: Replace with your code - - javax.servlet.http.HttpSession session = - (javax.servlet.http.HttpSession) getExternalContext().getSession(true); - session.invalidate(); - return "login"; - } - - public String lnkDataAcidente_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableActivosRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormHS"); - return "analise_acidente"; - } - - public String lnkNr_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableActivosRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormHS"); - return "analise_acidente"; - } - - public String lnkNomeAcidentado_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableActivosRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormHS"); - return "analise_acidente"; - } - - private AnaliseAcidente getTableActivosRowData() - { - RowKey rk = tableRowGroup1.getRowKey(); - int k = Integer.parseInt(rk.getRowId()); - AnalisesActualDataProvider provider = (AnalisesActualDataProvider) tableRowGroup1.getSourceData(); - ArrayList list = (ArrayList) provider.getList(); - AnaliseAcidente a = (AnaliseAcidente)list.get(k); - return a; - } - - public String lnkDataAcidenteSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormSeguranca"); - return "view_analise"; - } - - public String lnkNrSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormSeguranca"); - return "view_analise"; - } - - public String lnkNomeAcidentadoSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormSeguranca"); - return "view_analise"; - } - - private AnaliseAcidente getTableSeguimentoRowData() - { - RowKey rk = tableRowGroup2.getRowKey(); - int k = Integer.parseInt(rk.getRowId()); - AnalisesSeguimentoDataProvider provider = (AnalisesSeguimentoDataProvider) tableRowGroup2.getSourceData(); - ArrayList list = (ArrayList) provider.getList(); - AnaliseAcidente a = (AnaliseAcidente)list.get(k); - return a; - } - - private AnaliseAcidente getTableConcluidasRowData() - { - RowKey rk = tableRowGroup3.getRowKey(); - int k = Integer.parseInt(rk.getRowId()); - AnalisesConcluidasDataProvider provider = (AnalisesConcluidasDataProvider) tableRowGroup3.getSourceData(); - ArrayList list = (ArrayList) provider.getList(); - AnaliseAcidente a = (AnaliseAcidente)list.get(k); - return a; - } - - public void drpAno_processValueChange(ValueChangeEvent event) { - // TODO: Replace with your code - Object ano = event.getNewValue(); - if(ano == null) - { - lblMes.setVisible(false); - drpMes.setVisible(false); - lblDia.setVisible(false); - drpDia.setVisible(false); - } - else - { - lblMes.setVisible(true); - drpMes.setVisible(true); - fillMesDropDown(); - } - } - - public void drpMes_processValueChange(ValueChangeEvent event) { - // TODO: Replace with your code - Object mes = event.getNewValue(); - if(mes == null) - { - lblDia.setVisible(false); - drpDia.setVisible(false); - } - else - { - lblDia.setVisible(true); - drpDia.setVisible(true); - fillDiaDropDown(); - } - } - - public void drpDia_processValueChange(ValueChangeEvent event) { - // TODO: Replace with your code - - } - - public String butPesquisar_action() { - // TODO: Process the button click action. Return value is a navigation - // case name where null will return to the same page. - - Object obAno = null; - Object obMes = null; - Object obDia = null; - try - { - obAno = drpAno.getSelected(); - obMes = drpMes.getSelected(); - obDia = drpDia.getSelected(); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - Integer ano = null; - Integer mes = null; - Integer dia = null; - - if(obAno != null) - { - ano = (Integer) obAno; - } - - if(obMes != null) - { - mes = (Integer) obMes; - } - - if(obDia != null) - { - dia = (Integer) obDia; - } - - String nome = null; - if(txtNome.getText() != null) - { - nome = (String) txtNome.getText(); - } - - AnalisesDataProvider adp = new AnalisesDataProvider(); - try - { - - //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList()); - ArrayList concluidasList = adp.searchAanalisesConcluidasList(getSessionBean1().getCurrentUser().getEstabelecimento_id(), ano, mes, dia, nome); - - table3.setRendered(true); - txtSearchMsg.setRendered(false); - getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); - - - } - catch(Exception ex) - { - table3.setRendered(false); - txtSearchMsg.setRendered(true); - txtSearchMsg.setText("Não foram encontrados registos para a sua pesquisa !"); - ex.printStackTrace(); - } - - return null; - } - -// private String getPageFrom(String referer) -// { -// String pageFrom = referer.substring(referer.lastIndexOf("/")+1); -// return pageFrom; -// } - - private void fillAnoDropDown() - { - ArrayList anosList = new ArrayList(); - for(int ano=2007; ano<2051; ano++) - { - anosList.add(new Integer(ano)); - } - com.sun.rave.web.ui.model.Option[] anoOptions = new com.sun.rave.web.ui.model.Option[anosList.size()+1]; - anoOptions[0] = new Option("", ""); - ListIterator iter = anosList.listIterator(); - int i = 1; - while(iter.hasNext()) - { - Integer ano = (Integer) iter.next(); - - anoOptions[i] = new Option(ano, ano.toString()); - i++; - } - getSessionBean1().setAnoOptions(anoOptions); - Calendar cal = new GregorianCalendar(); - int year = cal.get(Calendar.YEAR); - //drpAno.setSelected( new Integer(year) ); - } - - private void fillMesDropDown() - { - com.sun.rave.web.ui.model.Option[] mesOptions = new com.sun.rave.web.ui.model.Option[13]; - mesOptions[0] = new Option("", ""); - mesOptions[1] = new Option(new Integer(1), "Janeiro"); - mesOptions[2] = new Option(new Integer(2), "Fevereiro"); - mesOptions[3] = new Option(new Integer(3), "Março"); - mesOptions[4] = new Option(new Integer(4), "Abril"); - mesOptions[5] = new Option(new Integer(5), "Maio"); - mesOptions[6] = new Option(new Integer(6), "Junho"); - mesOptions[7] = new Option(new Integer(7), "Julho"); - mesOptions[8] = new Option(new Integer(8), "Agosto"); - mesOptions[9] = new Option(new Integer(9), "Setembro"); - mesOptions[10] = new Option(new Integer(10), "Outubro"); - mesOptions[11] = new Option(new Integer(11), "Novembro"); - mesOptions[12] = new Option(new Integer(12), "Dezembro"); - getSessionBean1().setMesOptions(mesOptions); - Calendar cal = new GregorianCalendar(); - int month = cal.get(Calendar.MONTH); // 0=Jan, 1=Feb, ... - //drpMes.setSelected( new Integer(month+1) ); - } - - private void fillDiaDropDown() - { -// int ano = ( (Integer)drpAno.getSelected() ).intValue(); -// int mes = ( (Integer)drpMes.getSelected() ).intValue(); -// int dias = 0; -// switch (mes) { -// case 1: dias=31; break; -// case 2: -// GregorianCalendar cal = new GregorianCalendar(); -// if(cal.isLeapYear(ano)) -// { -// dias = 29; -// } -// else -// { -// dias = 28; -// } -// break; -// case 3: dias=31; break; -// case 4: dias=30; break; -// case 5: dias=31; break; -// case 6: dias=30; break; -// case 7: dias=31; break; -// case 8: dias=31; break; -// case 9: dias=30; break; -// case 10: dias=31; break; -// case 11: dias=30; break; -// case 12: dias=31; break; -// default: System.out.println("Invalid month.");break; -// } -// -// ArrayList diasList = new ArrayList(); -// for(int dia=1; diaPage bean that corresponds to a similarly named JSP page. This - * class contains component definitions (and initialization code) for - * all components that you have defined on this page, as well as - * lifecycle methods and event handlers where you may add behavior - * to respond to incoming events.

- */ -public class FormMedico extends AbstractPageBean { - // - private int __placeholder; - - /** - *

Automatically managed component initialization. WARNING: - * This method is automatically generated, so any user-specified code inserted - * here is subject to being replaced.

- */ - private void _init() throws Exception { - } - - private Page page1 = new Page(); - - public Page getPage1() { - return page1; - } - - public void setPage1(Page p) { - this.page1 = p; - } - - private Html html1 = new Html(); - - public Html getHtml1() { - return html1; - } - - public void setHtml1(Html h) { - this.html1 = h; - } - - private Head head1 = new Head(); - - public Head getHead1() { - return head1; - } - - public void setHead1(Head h) { - this.head1 = h; - } - - private Link link1 = new Link(); - - public Link getLink1() { - return link1; - } - - public void setLink1(Link l) { - this.link1 = l; - } - - private Body body1 = new Body(); - - public Body getBody1() { - return body1; - } - - public void setBody1(Body b) { - this.body1 = b; - } - - private Form form1 = new Form(); - - public Form getForm1() { - return form1; - } - - public void setForm1(Form f) { - this.form1 = f; - } - - private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridBase1() { - return gridBase1; - } - - public void setGridBase1(HtmlPanelGrid hpg) { - this.gridBase1 = hpg; - } - - private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridLayout1() { - return gridLayout1; - } - - public void setGridLayout1(HtmlPanelGrid hpg) { - this.gridLayout1 = hpg; - } - - private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel1() { - return gridPanel1; - } - - public void setGridPanel1(HtmlPanelGrid hpg) { - this.gridPanel1 = hpg; - } - - private PanelGroup groupPanel1 = new PanelGroup(); - - public PanelGroup getGroupPanel1() { - return groupPanel1; - } - - public void setGroupPanel1(PanelGroup pg) { - this.groupPanel1 = pg; - } - - private ImageComponent image1 = new ImageComponent(); - - public ImageComponent getImage1() { - return image1; - } - - public void setImage1(ImageComponent ic) { - this.image1 = ic; - } - - private ImageComponent image2 = new ImageComponent(); - - public ImageComponent getImage2() { - return image2; - } - - public void setImage2(ImageComponent ic) { - this.image2 = ic; - } - - private PanelGroup groupPanel2 = new PanelGroup(); - - public PanelGroup getGroupPanel2() { - return groupPanel2; - } - - public void setGroupPanel2(PanelGroup pg) { - this.groupPanel2 = pg; - } - - private StaticText lblUser = new StaticText(); - - public StaticText getLblUser() { - return lblUser; - } - - public void setLblUser(StaticText st) { - this.lblUser = st; - } - - private StaticText staticText1 = new StaticText(); - - public StaticText getStaticText1() { - return staticText1; - } - - public void setStaticText1(StaticText st) { - this.staticText1 = st; - } - - private Hyperlink lnkEditUser = new Hyperlink(); - - public Hyperlink getLnkEditUser() { - return lnkEditUser; - } - - public void setLnkEditUser(Hyperlink h) { - this.lnkEditUser = h; - } - - private StaticText staticText2 = new StaticText(); - - public StaticText getStaticText2() { - return staticText2; - } - - public void setStaticText2(StaticText st) { - this.staticText2 = st; - } - - private Hyperlink lnkLogout = new Hyperlink(); - - public Hyperlink getLnkLogout() { - return lnkLogout; - } - - public void setLnkLogout(Hyperlink h) { - this.lnkLogout = h; - } - - private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridLayoutTop1() { - return gridLayoutTop1; - } - - public void setGridLayoutTop1(HtmlPanelGrid hpg) { - this.gridLayoutTop1 = hpg; - } - - private HtmlPanelGrid gridActual = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridActual() { - return gridActual; - } - - public void setGridActual(HtmlPanelGrid hpg) { - this.gridActual = hpg; - } - - private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel2() { - return gridPanel2; - } - - public void setGridPanel2(HtmlPanelGrid hpg) { - this.gridPanel2 = hpg; - } - - private StaticText staticText4 = new StaticText(); - - public StaticText getStaticText4() { - return staticText4; - } - - public void setStaticText4(StaticText st) { - this.staticText4 = st; - } - - private StaticText staticText5 = new StaticText(); - - public StaticText getStaticText5() { - return staticText5; - } - - public void setStaticText5(StaticText st) { - this.staticText5 = st; - } - - private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel3() { - return gridPanel3; - } - - public void setGridPanel3(HtmlPanelGrid hpg) { - this.gridPanel3 = hpg; - } - - private Table table1 = new Table(); - - public Table getTable1() { - return table1; - } - - public void setTable1(Table t) { - this.table1 = t; - } - - private TableRowGroup tableRowGroup1 = new TableRowGroup(); - - public TableRowGroup getTableRowGroup1() { - return tableRowGroup1; - } - - public void setTableRowGroup1(TableRowGroup trg) { - this.tableRowGroup1 = trg; - } - - private TableColumn tableColumn1 = new TableColumn(); - - public TableColumn getTableColumn1() { - return tableColumn1; - } - - public void setTableColumn1(TableColumn tc) { - this.tableColumn1 = tc; - } - - private Hyperlink lnkDataAcidente = new Hyperlink(); - - public Hyperlink getLnkDataAcidente() { - return lnkDataAcidente; - } - - public void setLnkDataAcidente(Hyperlink h) { - this.lnkDataAcidente = h; - } - - private TableColumn tableColumn2 = new TableColumn(); - - public TableColumn getTableColumn2() { - return tableColumn2; - } - - public void setTableColumn2(TableColumn tc) { - this.tableColumn2 = tc; - } - - private Hyperlink lnkNr = new Hyperlink(); - - public Hyperlink getLnkNr() { - return lnkNr; - } - - public void setLnkNr(Hyperlink h) { - this.lnkNr = h; - } - - private TableColumn tableColumn3 = new TableColumn(); - - public TableColumn getTableColumn3() { - return tableColumn3; - } - - public void setTableColumn3(TableColumn tc) { - this.tableColumn3 = tc; - } - - private Hyperlink lnkNomeAcidentado = new Hyperlink(); - - public Hyperlink getLnkNomeAcidentado() { - return lnkNomeAcidentado; - } - - public void setLnkNomeAcidentado(Hyperlink h) { - this.lnkNomeAcidentado = h; - } - - private HtmlPanelGrid gridSeguimento = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridSeguimento() { - return gridSeguimento; - } - - public void setGridSeguimento(HtmlPanelGrid hpg) { - this.gridSeguimento = hpg; - } - - private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel4() { - return gridPanel4; - } - - public void setGridPanel4(HtmlPanelGrid hpg) { - this.gridPanel4 = hpg; - } - - private StaticText staticText6 = new StaticText(); - - public StaticText getStaticText6() { - return staticText6; - } - - public void setStaticText6(StaticText st) { - this.staticText6 = st; - } - - private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel5() { - return gridPanel5; - } - - public void setGridPanel5(HtmlPanelGrid hpg) { - this.gridPanel5 = hpg; - } - - private Table table2 = new Table(); - - public Table getTable2() { - return table2; - } - - public void setTable2(Table t) { - this.table2 = t; - } - - private TableRowGroup tableRowGroup2 = new TableRowGroup(); - - public TableRowGroup getTableRowGroup2() { - return tableRowGroup2; - } - - public void setTableRowGroup2(TableRowGroup trg) { - this.tableRowGroup2 = trg; - } - - private TableColumn tableColumn4 = new TableColumn(); - - public TableColumn getTableColumn4() { - return tableColumn4; - } - - public void setTableColumn4(TableColumn tc) { - this.tableColumn4 = tc; - } - - private Hyperlink lnkDataAcidenteSeg = new Hyperlink(); - - public Hyperlink getLnkDataAcidenteSeg() { - return lnkDataAcidenteSeg; - } - - public void setLnkDataAcidenteSeg(Hyperlink h) { - this.lnkDataAcidenteSeg = h; - } - - private TableColumn tableColumn5 = new TableColumn(); - - public TableColumn getTableColumn5() { - return tableColumn5; - } - - public void setTableColumn5(TableColumn tc) { - this.tableColumn5 = tc; - } - - private Hyperlink lnkNrSeg = new Hyperlink(); - - public Hyperlink getLnkNrSeg() { - return lnkNrSeg; - } - - public void setLnkNrSeg(Hyperlink h) { - this.lnkNrSeg = h; - } - - private TableColumn tableColumn6 = new TableColumn(); - - public TableColumn getTableColumn6() { - return tableColumn6; - } - - public void setTableColumn6(TableColumn tc) { - this.tableColumn6 = tc; - } - - private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink(); - - public Hyperlink getLnkNomeAcidentadoSeg() { - return lnkNomeAcidentadoSeg; - } - - public void setLnkNomeAcidentadoSeg(Hyperlink h) { - this.lnkNomeAcidentadoSeg = h; - } - - private HtmlPanelGrid gridConcluidos = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridConcluidos() { - return gridConcluidos; - } - - public void setGridConcluidos(HtmlPanelGrid hpg) { - this.gridConcluidos = hpg; - } - - private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel6() { - return gridPanel6; - } - - public void setGridPanel6(HtmlPanelGrid hpg) { - this.gridPanel6 = hpg; - } - - private StaticText staticText7 = new StaticText(); - - public StaticText getStaticText7() { - return staticText7; - } - - public void setStaticText7(StaticText st) { - this.staticText7 = st; - } - - private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel7() { - return gridPanel7; - } - - public void setGridPanel7(HtmlPanelGrid hpg) { - this.gridPanel7 = hpg; - } - - private PanelGroup groupPanel3 = new PanelGroup(); - - public PanelGroup getGroupPanel3() { - return groupPanel3; - } - - public void setGroupPanel3(PanelGroup pg) { - this.groupPanel3 = pg; - } - - private StaticText staticText8 = new StaticText(); - - public StaticText getStaticText8() { - return staticText8; - } - - public void setStaticText8(StaticText st) { - this.staticText8 = st; - } - - private DropDown drpAno = new DropDown(); - - public DropDown getDrpAno() { - return drpAno; - } - - public void setDrpAno(DropDown dd) { - this.drpAno = dd; - } - - private PanelGroup groupPanel4 = new PanelGroup(); - - public PanelGroup getGroupPanel4() { - return groupPanel4; - } - - public void setGroupPanel4(PanelGroup pg) { - this.groupPanel4 = pg; - } - - private StaticText lblMes = new StaticText(); - - public StaticText getLblMes() { - return lblMes; - } - - public void setLblMes(StaticText st) { - this.lblMes = st; - } - - private DropDown drpMes = new DropDown(); - - public DropDown getDrpMes() { - return drpMes; - } - - public void setDrpMes(DropDown dd) { - this.drpMes = dd; - } - - private PanelGroup groupPanel5 = new PanelGroup(); - - public PanelGroup getGroupPanel5() { - return groupPanel5; - } - - public void setGroupPanel5(PanelGroup pg) { - this.groupPanel5 = pg; - } - - private StaticText lblDia = new StaticText(); - - public StaticText getLblDia() { - return lblDia; - } - - public void setLblDia(StaticText st) { - this.lblDia = st; - } - - private DropDown drpDia = new DropDown(); - - public DropDown getDrpDia() { - return drpDia; - } - - public void setDrpDia(DropDown dd) { - this.drpDia = dd; - } - - private PanelGroup groupPanel6 = new PanelGroup(); - - public PanelGroup getGroupPanel6() { - return groupPanel6; - } - - public void setGroupPanel6(PanelGroup pg) { - this.groupPanel6 = pg; - } - - private StaticText staticText9 = new StaticText(); - - public StaticText getStaticText9() { - return staticText9; - } - - public void setStaticText9(StaticText st) { - this.staticText9 = st; - } - - private TextField txtNome = new TextField(); - - public TextField getTxtNome() { - return txtNome; - } - - public void setTxtNome(TextField tf) { - this.txtNome = tf; - } - - private Button butPesquisar = new Button(); - - public Button getButPesquisar() { - return butPesquisar; - } - - public void setButPesquisar(Button b) { - this.butPesquisar = b; - } - - private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel8() { - return gridPanel8; - } - - public void setGridPanel8(HtmlPanelGrid hpg) { - this.gridPanel8 = hpg; - } - - private Table table3 = new Table(); - - public Table getTable3() { - return table3; - } - - public void setTable3(Table t) { - this.table3 = t; - } - - private TableRowGroup tableRowGroup3 = new TableRowGroup(); - - public TableRowGroup getTableRowGroup3() { - return tableRowGroup3; - } - - public void setTableRowGroup3(TableRowGroup trg) { - this.tableRowGroup3 = trg; - } - - private TableColumn tableColumn7 = new TableColumn(); - - public TableColumn getTableColumn7() { - return tableColumn7; - } - - public void setTableColumn7(TableColumn tc) { - this.tableColumn7 = tc; - } - - private Hyperlink lnkDataConcluida = new Hyperlink(); - - public Hyperlink getLnkDataConcluida() { - return lnkDataConcluida; - } - - public void setLnkDataConcluida(Hyperlink h) { - this.lnkDataConcluida = h; - } - - private TableColumn tableColumn8 = new TableColumn(); - - public TableColumn getTableColumn8() { - return tableColumn8; - } - - public void setTableColumn8(TableColumn tc) { - this.tableColumn8 = tc; - } - - private Hyperlink lnkNrConcluida = new Hyperlink(); - - public Hyperlink getLnkNrConcluida() { - return lnkNrConcluida; - } - - public void setLnkNrConcluida(Hyperlink h) { - this.lnkNrConcluida = h; - } - - private TableColumn tableColumn9 = new TableColumn(); - - public TableColumn getTableColumn9() { - return tableColumn9; - } - - public void setTableColumn9(TableColumn tc) { - this.tableColumn9 = tc; - } - - private Hyperlink lnkNomeConcluida = new Hyperlink(); - - public Hyperlink getLnkNomeConcluida() { - return lnkNomeConcluida; - } - - public void setLnkNomeConcluida(Hyperlink h) { - this.lnkNomeConcluida = h; - } - - private StaticText txtSearchMsg = new StaticText(); - - public StaticText getTxtSearchMsg() { - return txtSearchMsg; - } - - public void setTxtSearchMsg(StaticText st) { - this.txtSearchMsg = st; - } - - private TableColumn tableColumn10 = new TableColumn(); - - public TableColumn getTableColumn10() { - return tableColumn10; - } - - public void setTableColumn10(TableColumn tc) { - this.tableColumn10 = tc; - } - - private Hyperlink lnkFase = new Hyperlink(); - - public Hyperlink getLnkFase() { - return lnkFase; - } - - public void setLnkFase(Hyperlink h) { - this.lnkFase = h; - } - - private TableColumn tableColumn11 = new TableColumn(); - - public TableColumn getTableColumn11() { - return tableColumn11; - } - - public void setTableColumn11(TableColumn tc) { - this.tableColumn11 = tc; - } - - private Hyperlink lnkFaseSeg = new Hyperlink(); - - public Hyperlink getLnkFaseSeg() { - return lnkFaseSeg; - } - - public void setLnkFaseSeg(Hyperlink h) { - this.lnkFaseSeg = h; - } - - //
- - /** - *

Construct a new Page bean instance.

- */ - public FormMedico() { - } - - /** - *

Callback method that is called whenever a page is navigated to, - * either directly via a URL, or indirectly via page navigation. - * Customize this method to acquire resources that will be needed - * for event handlers and lifecycle methods, whether or not this - * page is performing post back processing.

- * - *

Note that, if the current request is a postback, the property - * values of the components do not represent any - * values submitted with this request. Instead, they represent the - * property values that were saved for this view when it was rendered.

- */ - public void init() { - // Perform initializations inherited from our superclass - super.init(); - // Perform application initialization that must complete - // *before* managed components are initialized - // TODO - add your own initialiation code here - - // - // Initialize automatically managed components - // *Note* - this logic should NOT be modified - try { - _init(); - } catch (Exception e) { - log("FormMedico Initialization Failure", e); - throw e instanceof FacesException ? (FacesException) e: new FacesException(e); - } - - // - // Perform application initialization that must complete - // *after* managed components are initialized - // TODO - add your own initialization code here - - if (!getSessionBean1().isLoggedIn()) { - try { - getExternalContext().redirect("Login.jsp"); - } catch(Exception e) { - // . . . handle exception . . . - } - } - } - - /** - *

Callback method that is called after the component tree has been - * restored, but before any event processing takes place. This method - * will only be called on a postback request that - * is processing a form submit. Customize this method to allocate - * resources that will be required in your event handlers.

- */ - public void preprocess() { - } - - /** - *

Callback method that is called just before rendering takes place. - * This method will only be called for the page that - * will actually be rendered (and not, for example, on a page that - * handled a postback and then navigated to a different page). Customize - * this method to allocate resources that will be required for rendering - * this page.

- */ - public void prerender() { - lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); - - AnalisesDataProvider adp = new AnalisesDataProvider(); - try - { - //lblActivos.setRendered(true); - table1.setRendered(true); - - //ArrayList actuaisList = adp.getAnalisesActuaisList(getSessionBean1().getCurrentUser().getEstabelecimento_id(), new Integer(5)); - ArrayList actuaisList = adp.getAnalisesActuaisMedicoList( getSessionBean1().getCurrentUser().getEstabelecimento_id() ); - getSessionBean1().getAnalisesActualDataProvider().setList(actuaisList); - } - catch(Exception ex) - { - //lblActivos.setRendered(false); - table1.setRendered(false); - ex.printStackTrace(); - } - - table2.setRendered(false); - - try - { - //lblActivos.setRendered(true); - table2.setRendered(true); - - ArrayList seguimentoList = adp.getAnalisesSeguimentoMedList(getSessionBean1().getCurrentUser().getEstabelecimento_id()); - getSessionBean1().getAnalisesSeguimentoDataProvider().setList(seguimentoList); - } - catch(Exception ex) - { - //lblActivos.setRendered(false); - table2.setRendered(false); - ex.printStackTrace(); - } - - HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest(); - String referer = request.getRequestURI(); - String pageFrom = Utils.getPageFrom(referer); - if(!pageFrom.matches("FormMedico.jsp")) - { - - try - { - //lblActivos.setRendered(true); - table3.setRendered(true); - - ArrayList concluidasList = adp.getAnalisesConcluidasList(getSessionBean1().getCurrentUser().getEstabelecimento_id()); - getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); - } - catch(Exception ex) - { - //lblActivos.setRendered(false); - table3.setRendered(false); - ex.printStackTrace(); - } - fillAnoDropDown(); - } - } - - /** - *

Callback method that is called after rendering is completed for - * this request, if init() was called (regardless of whether - * or not this was the page that was actually rendered). Customize this - * method to release resources acquired in the init(), - * preprocess(), or prerender() methods (or - * acquired during execution of an event handler).

- */ - public void destroy() { - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected RequestBean1 getRequestBean1() { - return (RequestBean1)getBean("RequestBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected SessionBean1 getSessionBean1() { - return (SessionBean1)getBean("SessionBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected ApplicationBean1 getApplicationBean1() { - return (ApplicationBean1)getBean("ApplicationBean1"); - } - - public String lnkEditUser_action() { - // TODO: Replace with your code - - getSessionBean1().setNavFrom("FormMedico"); - getSessionBean1().setModoEdicaoUtilizador("edit"); - return "user"; - } - - public String lnkLogout_action() { - // TODO: Replace with your code - - javax.servlet.http.HttpSession session = - (javax.servlet.http.HttpSession) getExternalContext().getSession(true); - session.invalidate(); - return "login"; - } - - public String lnkDataAcidente_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableActivosRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormMedico"); - return "analise_acidente"; - } - - public String lnkNr_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableActivosRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormMedico"); - return "analise_acidente"; - } - - public String lnkNomeAcidentado_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableActivosRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormMedico"); - return "analise_acidente"; - } - - private AnaliseAcidente getTableActivosRowData() - { - RowKey rk = tableRowGroup1.getRowKey(); - int k = Integer.parseInt(rk.getRowId()); - AnalisesActualDataProvider provider = (AnalisesActualDataProvider) tableRowGroup1.getSourceData(); - ArrayList list = (ArrayList) provider.getList(); - AnaliseAcidente a = (AnaliseAcidente)list.get(k); - return a; - } - - private AnaliseAcidente getTableConcluidasRowData() - { - RowKey rk = tableRowGroup3.getRowKey(); - int k = Integer.parseInt(rk.getRowId()); - AnalisesConcluidasDataProvider provider = (AnalisesConcluidasDataProvider) tableRowGroup3.getSourceData(); - ArrayList list = (ArrayList) provider.getList(); - AnaliseAcidente a = (AnaliseAcidente)list.get(k); - return a; - } - - public String lnkDataAcidenteSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormMedico"); - return "view_analise"; - } - - public String lnkNrSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormMedico"); - return "view_analise"; - } - - public String lnkNomeAcidentadoSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormMedico"); - return "view_analise"; - } - - private AnaliseAcidente getTableSeguimentoRowData() - { - RowKey rk = tableRowGroup2.getRowKey(); - int k = Integer.parseInt(rk.getRowId()); - AnalisesSeguimentoDataProvider provider = (AnalisesSeguimentoDataProvider) tableRowGroup2.getSourceData(); - ArrayList list = (ArrayList) provider.getList(); - AnaliseAcidente a = (AnaliseAcidente)list.get(k); - return a; - } - - public void drpAno_processValueChange(ValueChangeEvent event) { - // TODO: Replace with your code - Object ano = event.getNewValue(); - if(ano == null) - { - lblMes.setVisible(false); - drpMes.setVisible(false); - lblDia.setVisible(false); - drpDia.setVisible(false); - } - else - { - lblMes.setVisible(true); - drpMes.setVisible(true); - fillMesDropDown(); - } - } - - public void drpMes_processValueChange(ValueChangeEvent event) { - // TODO: Replace with your code - Object mes = event.getNewValue(); - if(mes == null) - { - lblDia.setVisible(false); - drpDia.setVisible(false); - } - else - { - lblDia.setVisible(true); - drpDia.setVisible(true); - fillDiaDropDown(); - } - } - - public void drpDia_processValueChange(ValueChangeEvent event) { - // TODO: Replace with your code - - } - - public String butPesquisar_action() { - // TODO: Process the button click action. Return value is a navigation - // case name where null will return to the same page. - Object obAno = null; - Object obMes = null; - Object obDia = null; - try - { - obAno = drpAno.getSelected(); - obMes = drpMes.getSelected(); - obDia = drpDia.getSelected(); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - Integer ano = null; - Integer mes = null; - Integer dia = null; - - if(obAno != null) - { - ano = (Integer) obAno; - } - - if(obMes != null) - { - mes = (Integer) obMes; - } - - if(obDia != null) - { - dia = (Integer) obDia; - } - - String nome = null; - if(txtNome.getText() != null) - { - nome = (String) txtNome.getText(); - } - - AnalisesDataProvider adp = new AnalisesDataProvider(); - try - { - - //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList()); - ArrayList concluidasList = adp.searchAanalisesConcluidasList(getSessionBean1().getCurrentUser().getEstabelecimento_id(), ano, mes, dia, nome); - - table3.setRendered(true); - txtSearchMsg.setRendered(false); - getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); - - - } - catch(Exception ex) - { - table3.setRendered(false); - txtSearchMsg.setRendered(true); - txtSearchMsg.setText("Não foram encontrados registos para a sua pesquisa !"); - ex.printStackTrace(); - } - return null; - } - - private void fillAnoDropDown() - { - ArrayList anosList = new ArrayList(); - for(int ano=2007; ano<2051; ano++) - { - anosList.add(new Integer(ano)); - } - com.sun.rave.web.ui.model.Option[] anoOptions = new com.sun.rave.web.ui.model.Option[anosList.size()+1]; - anoOptions[0] = new Option("", ""); - ListIterator iter = anosList.listIterator(); - int i = 1; - while(iter.hasNext()) - { - Integer ano = (Integer) iter.next(); - - anoOptions[i] = new Option(ano, ano.toString()); - i++; - } - getSessionBean1().setAnoOptions(anoOptions); - Calendar cal = new GregorianCalendar(); - int year = cal.get(Calendar.YEAR); - //drpAno.setSelected( new Integer(year) ); - } - - private void fillMesDropDown() - { - com.sun.rave.web.ui.model.Option[] mesOptions = new com.sun.rave.web.ui.model.Option[13]; - mesOptions[0] = new Option("", ""); - mesOptions[1] = new Option(new Integer(1), "Janeiro"); - mesOptions[2] = new Option(new Integer(2), "Fevereiro"); - mesOptions[3] = new Option(new Integer(3), "Março"); - mesOptions[4] = new Option(new Integer(4), "Abril"); - mesOptions[5] = new Option(new Integer(5), "Maio"); - mesOptions[6] = new Option(new Integer(6), "Junho"); - mesOptions[7] = new Option(new Integer(7), "Julho"); - mesOptions[8] = new Option(new Integer(8), "Agosto"); - mesOptions[9] = new Option(new Integer(9), "Setembro"); - mesOptions[10] = new Option(new Integer(10), "Outubro"); - mesOptions[11] = new Option(new Integer(11), "Novembro"); - mesOptions[12] = new Option(new Integer(12), "Dezembro"); - getSessionBean1().setMesOptions(mesOptions); - Calendar cal = new GregorianCalendar(); - int month = cal.get(Calendar.MONTH); // 0=Jan, 1=Feb, ... - //drpMes.setSelected( new Integer(month+1) ); - } - - private void fillDiaDropDown() - { - - } - - public String lnkDataConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormMedico"); - return "view_analise"; - } - - public String lnkNrConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormMedico"); - return "view_analise"; - } - - public String lnkNomeConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormMedico"); - return "view_analise"; - } - - public String lnkFase_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableActivosRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormMedico"); - return "analise_acidente"; - } - - public String lnkFaseSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormMedico"); - return "view_analise"; - } - -} - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormRH.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormRH.java deleted file mode 100644 index 470eabf9..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormRH.java +++ /dev/null @@ -1,1335 +0,0 @@ -/* - * FormRH.java - * - * Created on October 1, 2007, 11:43 AM - * Copyright lluis - */ -package analiseacidentestrabalho; - -import com.sun.data.provider.RowKey; -import com.sun.rave.web.ui.appbase.AbstractPageBean; -import com.sun.rave.web.ui.component.Body; -import com.sun.rave.web.ui.component.Button; -import com.sun.rave.web.ui.component.DropDown; -import com.sun.rave.web.ui.component.Form; -import com.sun.rave.web.ui.component.Head; -import com.sun.rave.web.ui.component.Html; -import com.sun.rave.web.ui.component.Hyperlink; -import com.sun.rave.web.ui.component.ImageComponent; -import com.sun.rave.web.ui.component.Link; -import com.sun.rave.web.ui.component.Page; -import com.sun.rave.web.ui.component.PanelGroup; -import com.sun.rave.web.ui.component.StaticText; -import com.sun.rave.web.ui.component.Table; -import com.sun.rave.web.ui.component.TableColumn; -import com.sun.rave.web.ui.component.TableRowGroup; -import com.sun.rave.web.ui.component.TextField; -import com.sun.rave.web.ui.model.Option; -import db.AnalisesActualDataProvider; -import db.AnalisesConcluidasDataProvider; -import db.AnalisesDataProvider; -import db.AnalisesSeguimentoDataProvider; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.GregorianCalendar; -import java.util.ListIterator; -import javax.faces.FacesException; -import javax.faces.component.html.HtmlPanelGrid; -import javax.faces.event.ValueChangeEvent; -import javax.servlet.http.HttpServletRequest; -import utils.Utils; - -/** - *

Page bean that corresponds to a similarly named JSP page. This - * class contains component definitions (and initialization code) for - * all components that you have defined on this page, as well as - * lifecycle methods and event handlers where you may add behavior - * to respond to incoming events.

- */ -public class FormRH extends AbstractPageBean { - // - private int __placeholder; - - /** - *

Automatically managed component initialization. WARNING: - * This method is automatically generated, so any user-specified code inserted - * here is subject to being replaced.

- */ - private void _init() throws Exception { - } - - private Page page1 = new Page(); - - public Page getPage1() { - return page1; - } - - public void setPage1(Page p) { - this.page1 = p; - } - - private Html html1 = new Html(); - - public Html getHtml1() { - return html1; - } - - public void setHtml1(Html h) { - this.html1 = h; - } - - private Head head1 = new Head(); - - public Head getHead1() { - return head1; - } - - public void setHead1(Head h) { - this.head1 = h; - } - - private Link link1 = new Link(); - - public Link getLink1() { - return link1; - } - - public void setLink1(Link l) { - this.link1 = l; - } - - private Body body1 = new Body(); - - public Body getBody1() { - return body1; - } - - public void setBody1(Body b) { - this.body1 = b; - } - - private Form form1 = new Form(); - - public Form getForm1() { - return form1; - } - - public void setForm1(Form f) { - this.form1 = f; - } - - private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridBase1() { - return gridBase1; - } - - public void setGridBase1(HtmlPanelGrid hpg) { - this.gridBase1 = hpg; - } - - private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridLayout1() { - return gridLayout1; - } - - public void setGridLayout1(HtmlPanelGrid hpg) { - this.gridLayout1 = hpg; - } - - private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel1() { - return gridPanel1; - } - - public void setGridPanel1(HtmlPanelGrid hpg) { - this.gridPanel1 = hpg; - } - - private PanelGroup groupPanel1 = new PanelGroup(); - - public PanelGroup getGroupPanel1() { - return groupPanel1; - } - - public void setGroupPanel1(PanelGroup pg) { - this.groupPanel1 = pg; - } - - private ImageComponent image1 = new ImageComponent(); - - public ImageComponent getImage1() { - return image1; - } - - public void setImage1(ImageComponent ic) { - this.image1 = ic; - } - - private ImageComponent image2 = new ImageComponent(); - - public ImageComponent getImage2() { - return image2; - } - - public void setImage2(ImageComponent ic) { - this.image2 = ic; - } - - private PanelGroup groupPanel2 = new PanelGroup(); - - public PanelGroup getGroupPanel2() { - return groupPanel2; - } - - public void setGroupPanel2(PanelGroup pg) { - this.groupPanel2 = pg; - } - - private StaticText lblUser = new StaticText(); - - public StaticText getLblUser() { - return lblUser; - } - - public void setLblUser(StaticText st) { - this.lblUser = st; - } - - private StaticText staticText1 = new StaticText(); - - public StaticText getStaticText1() { - return staticText1; - } - - public void setStaticText1(StaticText st) { - this.staticText1 = st; - } - - private Hyperlink lnkEditUser = new Hyperlink(); - - public Hyperlink getLnkEditUser() { - return lnkEditUser; - } - - public void setLnkEditUser(Hyperlink h) { - this.lnkEditUser = h; - } - - private StaticText staticText2 = new StaticText(); - - public StaticText getStaticText2() { - return staticText2; - } - - public void setStaticText2(StaticText st) { - this.staticText2 = st; - } - - private Hyperlink lnkLogout = new Hyperlink(); - - public Hyperlink getLnkLogout() { - return lnkLogout; - } - - public void setLnkLogout(Hyperlink h) { - this.lnkLogout = h; - } - - private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridLayoutTop1() { - return gridLayoutTop1; - } - - public void setGridLayoutTop1(HtmlPanelGrid hpg) { - this.gridLayoutTop1 = hpg; - } - - private HtmlPanelGrid gridActual1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridActual1() { - return gridActual1; - } - - public void setGridActual1(HtmlPanelGrid hpg) { - this.gridActual1 = hpg; - } - - private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel2() { - return gridPanel2; - } - - public void setGridPanel2(HtmlPanelGrid hpg) { - this.gridPanel2 = hpg; - } - - private StaticText staticText4 = new StaticText(); - - public StaticText getStaticText4() { - return staticText4; - } - - public void setStaticText4(StaticText st) { - this.staticText4 = st; - } - - private StaticText staticText5 = new StaticText(); - - public StaticText getStaticText5() { - return staticText5; - } - - public void setStaticText5(StaticText st) { - this.staticText5 = st; - } - - private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel3() { - return gridPanel3; - } - - public void setGridPanel3(HtmlPanelGrid hpg) { - this.gridPanel3 = hpg; - } - - private Table table1 = new Table(); - - public Table getTable1() { - return table1; - } - - public void setTable1(Table t) { - this.table1 = t; - } - - private TableRowGroup tableRowGroup1 = new TableRowGroup(); - - public TableRowGroup getTableRowGroup1() { - return tableRowGroup1; - } - - public void setTableRowGroup1(TableRowGroup trg) { - this.tableRowGroup1 = trg; - } - - private TableColumn tableColumn1 = new TableColumn(); - - public TableColumn getTableColumn1() { - return tableColumn1; - } - - public void setTableColumn1(TableColumn tc) { - this.tableColumn1 = tc; - } - - private Hyperlink lnkDataAcidente = new Hyperlink(); - - public Hyperlink getLnkDataAcidente() { - return lnkDataAcidente; - } - - public void setLnkDataAcidente(Hyperlink h) { - this.lnkDataAcidente = h; - } - - private TableColumn tableColumn2 = new TableColumn(); - - public TableColumn getTableColumn2() { - return tableColumn2; - } - - public void setTableColumn2(TableColumn tc) { - this.tableColumn2 = tc; - } - - private Hyperlink lnkNr = new Hyperlink(); - - public Hyperlink getLnkNr() { - return lnkNr; - } - - public void setLnkNr(Hyperlink h) { - this.lnkNr = h; - } - - private TableColumn tableColumn3 = new TableColumn(); - - public TableColumn getTableColumn3() { - return tableColumn3; - } - - public void setTableColumn3(TableColumn tc) { - this.tableColumn3 = tc; - } - - private Hyperlink lnkNomeAcidentado = new Hyperlink(); - - public Hyperlink getLnkNomeAcidentado() { - return lnkNomeAcidentado; - } - - public void setLnkNomeAcidentado(Hyperlink h) { - this.lnkNomeAcidentado = h; - } - - private HtmlPanelGrid gridSeguimento1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridSeguimento1() { - return gridSeguimento1; - } - - public void setGridSeguimento1(HtmlPanelGrid hpg) { - this.gridSeguimento1 = hpg; - } - - private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel4() { - return gridPanel4; - } - - public void setGridPanel4(HtmlPanelGrid hpg) { - this.gridPanel4 = hpg; - } - - private StaticText staticText6 = new StaticText(); - - public StaticText getStaticText6() { - return staticText6; - } - - public void setStaticText6(StaticText st) { - this.staticText6 = st; - } - - private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel5() { - return gridPanel5; - } - - public void setGridPanel5(HtmlPanelGrid hpg) { - this.gridPanel5 = hpg; - } - - private Table table2 = new Table(); - - public Table getTable2() { - return table2; - } - - public void setTable2(Table t) { - this.table2 = t; - } - - private TableRowGroup tableRowGroup2 = new TableRowGroup(); - - public TableRowGroup getTableRowGroup2() { - return tableRowGroup2; - } - - public void setTableRowGroup2(TableRowGroup trg) { - this.tableRowGroup2 = trg; - } - - private TableColumn tableColumn4 = new TableColumn(); - - public TableColumn getTableColumn4() { - return tableColumn4; - } - - public void setTableColumn4(TableColumn tc) { - this.tableColumn4 = tc; - } - - private Hyperlink lnkDataAcidenteSeg = new Hyperlink(); - - public Hyperlink getLnkDataAcidenteSeg() { - return lnkDataAcidenteSeg; - } - - public void setLnkDataAcidenteSeg(Hyperlink h) { - this.lnkDataAcidenteSeg = h; - } - - private TableColumn tableColumn5 = new TableColumn(); - - public TableColumn getTableColumn5() { - return tableColumn5; - } - - public void setTableColumn5(TableColumn tc) { - this.tableColumn5 = tc; - } - - private Hyperlink lnkNrSeg = new Hyperlink(); - - public Hyperlink getLnkNrSeg() { - return lnkNrSeg; - } - - public void setLnkNrSeg(Hyperlink h) { - this.lnkNrSeg = h; - } - - private TableColumn tableColumn6 = new TableColumn(); - - public TableColumn getTableColumn6() { - return tableColumn6; - } - - public void setTableColumn6(TableColumn tc) { - this.tableColumn6 = tc; - } - - private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink(); - - public Hyperlink getLnkNomeAcidentadoSeg() { - return lnkNomeAcidentadoSeg; - } - - public void setLnkNomeAcidentadoSeg(Hyperlink h) { - this.lnkNomeAcidentadoSeg = h; - } - - private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridConcluidos1() { - return gridConcluidos1; - } - - public void setGridConcluidos1(HtmlPanelGrid hpg) { - this.gridConcluidos1 = hpg; - } - - private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel6() { - return gridPanel6; - } - - public void setGridPanel6(HtmlPanelGrid hpg) { - this.gridPanel6 = hpg; - } - - private StaticText staticText7 = new StaticText(); - - public StaticText getStaticText7() { - return staticText7; - } - - public void setStaticText7(StaticText st) { - this.staticText7 = st; - } - - private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel7() { - return gridPanel7; - } - - public void setGridPanel7(HtmlPanelGrid hpg) { - this.gridPanel7 = hpg; - } - - private PanelGroup groupPanel3 = new PanelGroup(); - - public PanelGroup getGroupPanel3() { - return groupPanel3; - } - - public void setGroupPanel3(PanelGroup pg) { - this.groupPanel3 = pg; - } - - private StaticText staticText8 = new StaticText(); - - public StaticText getStaticText8() { - return staticText8; - } - - public void setStaticText8(StaticText st) { - this.staticText8 = st; - } - - private DropDown drpAno = new DropDown(); - - public DropDown getDrpAno() { - return drpAno; - } - - public void setDrpAno(DropDown dd) { - this.drpAno = dd; - } - - private PanelGroup groupPanel4 = new PanelGroup(); - - public PanelGroup getGroupPanel4() { - return groupPanel4; - } - - public void setGroupPanel4(PanelGroup pg) { - this.groupPanel4 = pg; - } - - private StaticText lblMes = new StaticText(); - - public StaticText getLblMes() { - return lblMes; - } - - public void setLblMes(StaticText st) { - this.lblMes = st; - } - - private DropDown drpMes = new DropDown(); - - public DropDown getDrpMes() { - return drpMes; - } - - public void setDrpMes(DropDown dd) { - this.drpMes = dd; - } - - private PanelGroup groupPanel5 = new PanelGroup(); - - public PanelGroup getGroupPanel5() { - return groupPanel5; - } - - public void setGroupPanel5(PanelGroup pg) { - this.groupPanel5 = pg; - } - - private StaticText lblDia = new StaticText(); - - public StaticText getLblDia() { - return lblDia; - } - - public void setLblDia(StaticText st) { - this.lblDia = st; - } - - private DropDown drpDia = new DropDown(); - - public DropDown getDrpDia() { - return drpDia; - } - - public void setDrpDia(DropDown dd) { - this.drpDia = dd; - } - - private PanelGroup groupPanel6 = new PanelGroup(); - - public PanelGroup getGroupPanel6() { - return groupPanel6; - } - - public void setGroupPanel6(PanelGroup pg) { - this.groupPanel6 = pg; - } - - private StaticText staticText9 = new StaticText(); - - public StaticText getStaticText9() { - return staticText9; - } - - public void setStaticText9(StaticText st) { - this.staticText9 = st; - } - - private TextField txtNome = new TextField(); - - public TextField getTxtNome() { - return txtNome; - } - - public void setTxtNome(TextField tf) { - this.txtNome = tf; - } - - private Button butPesquisar = new Button(); - - public Button getButPesquisar() { - return butPesquisar; - } - - public void setButPesquisar(Button b) { - this.butPesquisar = b; - } - - private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel8() { - return gridPanel8; - } - - public void setGridPanel8(HtmlPanelGrid hpg) { - this.gridPanel8 = hpg; - } - - private Table table3 = new Table(); - - public Table getTable3() { - return table3; - } - - public void setTable3(Table t) { - this.table3 = t; - } - - private TableRowGroup tableRowGroup3 = new TableRowGroup(); - - public TableRowGroup getTableRowGroup3() { - return tableRowGroup3; - } - - public void setTableRowGroup3(TableRowGroup trg) { - this.tableRowGroup3 = trg; - } - - private TableColumn tableColumn7 = new TableColumn(); - - public TableColumn getTableColumn7() { - return tableColumn7; - } - - public void setTableColumn7(TableColumn tc) { - this.tableColumn7 = tc; - } - - private Hyperlink lnkDataConcluida = new Hyperlink(); - - public Hyperlink getLnkDataConcluida() { - return lnkDataConcluida; - } - - public void setLnkDataConcluida(Hyperlink h) { - this.lnkDataConcluida = h; - } - - private TableColumn tableColumn8 = new TableColumn(); - - public TableColumn getTableColumn8() { - return tableColumn8; - } - - public void setTableColumn8(TableColumn tc) { - this.tableColumn8 = tc; - } - - private Hyperlink lnkNrConcluida = new Hyperlink(); - - public Hyperlink getLnkNrConcluida() { - return lnkNrConcluida; - } - - public void setLnkNrConcluida(Hyperlink h) { - this.lnkNrConcluida = h; - } - - private TableColumn tableColumn9 = new TableColumn(); - - public TableColumn getTableColumn9() { - return tableColumn9; - } - - public void setTableColumn9(TableColumn tc) { - this.tableColumn9 = tc; - } - - private Hyperlink lnkNomeConcluida = new Hyperlink(); - - public Hyperlink getLnkNomeConcluida() { - return lnkNomeConcluida; - } - - public void setLnkNomeConcluida(Hyperlink h) { - this.lnkNomeConcluida = h; - } - - private StaticText txtSearchMsg = new StaticText(); - - public StaticText getTxtSearchMsg() { - return txtSearchMsg; - } - - public void setTxtSearchMsg(StaticText st) { - this.txtSearchMsg = st; - } - - private TableColumn tableColumn10 = new TableColumn(); - - public TableColumn getTableColumn10() { - return tableColumn10; - } - - public void setTableColumn10(TableColumn tc) { - this.tableColumn10 = tc; - } - - private Hyperlink lnkFase = new Hyperlink(); - - public Hyperlink getLnkFase() { - return lnkFase; - } - - public void setLnkFase(Hyperlink h) { - this.lnkFase = h; - } - - private TableColumn tableColumn11 = new TableColumn(); - - public TableColumn getTableColumn11() { - return tableColumn11; - } - - public void setTableColumn11(TableColumn tc) { - this.tableColumn11 = tc; - } - - private Hyperlink lnkFaseSeg = new Hyperlink(); - - public Hyperlink getLnkFaseSeg() { - return lnkFaseSeg; - } - - public void setLnkFaseSeg(Hyperlink h) { - this.lnkFaseSeg = h; - } - - //
- - /** - *

Construct a new Page bean instance.

- */ - public FormRH() { - } - - /** - *

Callback method that is called whenever a page is navigated to, - * either directly via a URL, or indirectly via page navigation. - * Customize this method to acquire resources that will be needed - * for event handlers and lifecycle methods, whether or not this - * page is performing post back processing.

- * - *

Note that, if the current request is a postback, the property - * values of the components do not represent any - * values submitted with this request. Instead, they represent the - * property values that were saved for this view when it was rendered.

- */ - public void init() { - // Perform initializations inherited from our superclass - super.init(); - // Perform application initialization that must complete - // *before* managed components are initialized - // TODO - add your own initialiation code here - - // - // Initialize automatically managed components - // *Note* - this logic should NOT be modified - try { - _init(); - } catch (Exception e) { - log("FormRH Initialization Failure", e); - throw e instanceof FacesException ? (FacesException) e: new FacesException(e); - } - - // - // Perform application initialization that must complete - // *after* managed components are initialized - // TODO - add your own initialization code here - - if (!getSessionBean1().isLoggedIn()) { - try { - getExternalContext().redirect("Login.jsp"); - } catch(Exception e) { - // . . . handle exception . . . - } - } - } - - /** - *

Callback method that is called after the component tree has been - * restored, but before any event processing takes place. This method - * will only be called on a postback request that - * is processing a form submit. Customize this method to allocate - * resources that will be required in your event handlers.

- */ - public void preprocess() { - } - - /** - *

Callback method that is called just before rendering takes place. - * This method will only be called for the page that - * will actually be rendered (and not, for example, on a page that - * handled a postback and then navigated to a different page). Customize - * this method to allocate resources that will be required for rendering - * this page.

- */ - public void prerender() { - lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); - - AnalisesDataProvider adp = new AnalisesDataProvider(); - try - { - //lblActivos.setRendered(true); - table1.setRendered(true); - - //ArrayList actuaisList = adp.getAnalisesActuaisList(getSessionBean1().getCurrentUser().getEstabelecimento_id()); - ArrayList actuaisList = adp.getAnalisesActuaisRhList(getSessionBean1().getCurrentUser().getEstabelecimento_id()); - getSessionBean1().getAnalisesActualDataProvider().setList(actuaisList); - } - catch(Exception ex) - { - //lblActivos.setRendered(false); - table1.setRendered(false); - ex.printStackTrace(); - } - - try - { - //lblActivos.setRendered(true); - table2.setRendered(true); - - ArrayList seguimentoList = adp.getAnalisesSeguimentoRhList(getSessionBean1().getCurrentUser().getEstabelecimento_id()); - getSessionBean1().getAnalisesSeguimentoDataProvider().setList(seguimentoList); - } - catch(Exception ex) - { - //lblActivos.setRendered(false); - table2.setRendered(false); - ex.printStackTrace(); - } - - HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest(); - String referer = request.getRequestURI(); - String pageFrom = Utils.getPageFrom(referer); - if(!pageFrom.matches("FormRH.jsp")) - { - - try - { - //lblActivos.setRendered(true); - table3.setRendered(true); - - ArrayList concluidasList = adp.getAnalisesConcluidasList(getSessionBean1().getCurrentUser().getEstabelecimento_id()); - getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); - } - catch(Exception ex) - { - //lblActivos.setRendered(false); - table3.setRendered(false); - ex.printStackTrace(); - } - fillAnoDropDown(); - } - } - - /** - *

Callback method that is called after rendering is completed for - * this request, if init() was called (regardless of whether - * or not this was the page that was actually rendered). Customize this - * method to release resources acquired in the init(), - * preprocess(), or prerender() methods (or - * acquired during execution of an event handler).

- */ - public void destroy() { - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected SessionBean1 getSessionBean1() { - return (SessionBean1)getBean("SessionBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected RequestBean1 getRequestBean1() { - return (RequestBean1)getBean("RequestBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected ApplicationBean1 getApplicationBean1() { - return (ApplicationBean1)getBean("ApplicationBean1"); - } - - public String lnkLogout_action() { - // TODO: Replace with your code - - javax.servlet.http.HttpSession session = - (javax.servlet.http.HttpSession) getExternalContext().getSession(true); - session.invalidate(); - return "login"; - } - - public String butNovaAnalise_action() { - // TODO: Process the button click action. Return value is a navigation - // case name where null will return to the same page. - - return null; - } - - public String lnkDataAcidente_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableActivosRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormRH"); - return "analise_acidente"; - } - - public String lnkNr_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableActivosRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormRH"); - return "analise_acidente"; - } - - public String lnkNomeAcidentado_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableActivosRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormRH"); - return "analise_acidente"; - } - - private AnaliseAcidente getTableActivosRowData() - { - RowKey rk = tableRowGroup1.getRowKey(); - int k = Integer.parseInt(rk.getRowId()); - AnalisesActualDataProvider provider = (AnalisesActualDataProvider) tableRowGroup1.getSourceData(); - ArrayList list = (ArrayList) provider.getList(); - AnaliseAcidente a = (AnaliseAcidente)list.get(k); - return a; - } - - public String lnkDataAcidenteSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormSeguranca"); - return "view_analise"; - } - - public String lnkNrSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormSeguranca"); - return "view_analise"; - } - - - public String lnkNomeAcidentadoSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormSeguranca"); - return "view_analise"; - } - - private AnaliseAcidente getTableSeguimentoRowData() - { - RowKey rk = tableRowGroup2.getRowKey(); - int k = Integer.parseInt(rk.getRowId()); - AnalisesSeguimentoDataProvider provider = (AnalisesSeguimentoDataProvider) tableRowGroup2.getSourceData(); - ArrayList list = (ArrayList) provider.getList(); - AnaliseAcidente a = (AnaliseAcidente)list.get(k); - return a; - } - - private AnaliseAcidente getTableConcluidasRowData() - { - RowKey rk = tableRowGroup3.getRowKey(); - int k = Integer.parseInt(rk.getRowId()); - AnalisesConcluidasDataProvider provider = (AnalisesConcluidasDataProvider) tableRowGroup3.getSourceData(); - ArrayList list = (ArrayList) provider.getList(); - AnaliseAcidente a = (AnaliseAcidente)list.get(k); - return a; - } - - public void drpAno_processValueChange(ValueChangeEvent event) { - // TODO: Replace with your code - Object ano = event.getNewValue(); - if(ano == null) - { - lblMes.setVisible(false); - drpMes.setVisible(false); - lblDia.setVisible(false); - drpDia.setVisible(false); - } - else - { - lblMes.setVisible(true); - drpMes.setVisible(true); - fillMesDropDown(); - } - } - - public void drpMes_processValueChange(ValueChangeEvent event) { - // TODO: Replace with your code - Object mes = event.getNewValue(); - if(mes == null) - { - lblDia.setVisible(false); - drpDia.setVisible(false); - } - else - { - lblDia.setVisible(true); - drpDia.setVisible(true); - fillDiaDropDown(); - } - } - - public void drpDia_processValueChange(ValueChangeEvent event) { - // TODO: Replace with your code - - } - - public String butPesquisar_action() { - // TODO: Process the button click action. Return value is a navigation - // case name where null will return to the same page. - - Object obAno = null; - Object obMes = null; - Object obDia = null; - try - { - obAno = drpAno.getSelected(); - obMes = drpMes.getSelected(); - obDia = drpDia.getSelected(); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - Integer ano = null; - Integer mes = null; - Integer dia = null; - - if(obAno != null) - { - ano = (Integer) obAno; - } - - if(obMes != null) - { - mes = (Integer) obMes; - } - - if(obDia != null) - { - dia = (Integer) obDia; - } - - String nome = null; - if(txtNome.getText() != null) - { - nome = (String) txtNome.getText(); - } - - AnalisesDataProvider adp = new AnalisesDataProvider(); - try - { - - //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList()); - ArrayList concluidasList = adp.searchAanalisesConcluidasList(getSessionBean1().getCurrentUser().getEstabelecimento_id(), ano, mes, dia, nome); - - table3.setRendered(true); - txtSearchMsg.setRendered(false); - getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); - - - } - catch(Exception ex) - { - table3.setRendered(false); - txtSearchMsg.setRendered(true); - txtSearchMsg.setText("Não foram encontrados registos para a sua pesquisa !"); - ex.printStackTrace(); - } - - return null; - } - -// private String getPageFrom(String referer) -// { -// String pageFrom = referer.substring(referer.lastIndexOf("/")+1); -// return pageFrom; -// } - - private void fillAnoDropDown() - { - ArrayList anosList = new ArrayList(); - for(int ano=2007; ano<2051; ano++) - { - anosList.add(new Integer(ano)); - } - com.sun.rave.web.ui.model.Option[] anoOptions = new com.sun.rave.web.ui.model.Option[anosList.size()+1]; - anoOptions[0] = new Option("", ""); - ListIterator iter = anosList.listIterator(); - int i = 1; - while(iter.hasNext()) - { - Integer ano = (Integer) iter.next(); - - anoOptions[i] = new Option(ano, ano.toString()); - i++; - } - getSessionBean1().setAnoOptions(anoOptions); - Calendar cal = new GregorianCalendar(); - int year = cal.get(Calendar.YEAR); - //drpAno.setSelected( new Integer(year) ); - } - - private void fillMesDropDown() - { - com.sun.rave.web.ui.model.Option[] mesOptions = new com.sun.rave.web.ui.model.Option[13]; - mesOptions[0] = new Option("", ""); - mesOptions[1] = new Option(new Integer(1), "Janeiro"); - mesOptions[2] = new Option(new Integer(2), "Fevereiro"); - mesOptions[3] = new Option(new Integer(3), "Março"); - mesOptions[4] = new Option(new Integer(4), "Abril"); - mesOptions[5] = new Option(new Integer(5), "Maio"); - mesOptions[6] = new Option(new Integer(6), "Junho"); - mesOptions[7] = new Option(new Integer(7), "Julho"); - mesOptions[8] = new Option(new Integer(8), "Agosto"); - mesOptions[9] = new Option(new Integer(9), "Setembro"); - mesOptions[10] = new Option(new Integer(10), "Outubro"); - mesOptions[11] = new Option(new Integer(11), "Novembro"); - mesOptions[12] = new Option(new Integer(12), "Dezembro"); - getSessionBean1().setMesOptions(mesOptions); - Calendar cal = new GregorianCalendar(); - int month = cal.get(Calendar.MONTH); // 0=Jan, 1=Feb, ... - //drpMes.setSelected( new Integer(month+1) ); - } - - private void fillDiaDropDown() - { -// int ano = ( (Integer)drpAno.getSelected() ).intValue(); -// int mes = ( (Integer)drpMes.getSelected() ).intValue(); -// int dias = 0; -// switch (mes) { -// case 1: dias=31; break; -// case 2: -// GregorianCalendar cal = new GregorianCalendar(); -// if(cal.isLeapYear(ano)) -// { -// dias = 29; -// } -// else -// { -// dias = 28; -// } -// break; -// case 3: dias=31; break; -// case 4: dias=30; break; -// case 5: dias=31; break; -// case 6: dias=30; break; -// case 7: dias=31; break; -// case 8: dias=31; break; -// case 9: dias=30; break; -// case 10: dias=31; break; -// case 11: dias=30; break; -// case 12: dias=31; break; -// default: System.out.println("Invalid month.");break; -// } -// -// ArrayList diasList = new ArrayList(); -// for(int dia=1; diaPage bean that corresponds to a similarly named JSP page. This - * class contains component definitions (and initialization code) for - * all components that you have defined on this page, as well as - * lifecycle methods and event handlers where you may add behavior - * to respond to incoming events.

- */ -public class FormSeguranca extends AbstractPageBean { - // - private int __placeholder; - - /** - *

Automatically managed component initialization. WARNING: - * This method is automatically generated, so any user-specified code inserted - * here is subject to being replaced.

- */ - private void _init() throws Exception { - } - - private Page page1 = new Page(); - - public Page getPage1() { - return page1; - } - - public void setPage1(Page p) { - this.page1 = p; - } - - private Html html1 = new Html(); - - public Html getHtml1() { - return html1; - } - - public void setHtml1(Html h) { - this.html1 = h; - } - - private Head head1 = new Head(); - - public Head getHead1() { - return head1; - } - - public void setHead1(Head h) { - this.head1 = h; - } - - private Link link1 = new Link(); - - public Link getLink1() { - return link1; - } - - public void setLink1(Link l) { - this.link1 = l; - } - - private Body body1 = new Body(); - - public Body getBody1() { - return body1; - } - - public void setBody1(Body b) { - this.body1 = b; - } - - private Form form1 = new Form(); - - public Form getForm1() { - return form1; - } - - public void setForm1(Form f) { - this.form1 = f; - } - - private HtmlPanelGrid gridBase = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridBase() { - return gridBase; - } - - public void setGridBase(HtmlPanelGrid hpg) { - this.gridBase = hpg; - } - - private HtmlPanelGrid gridLayout = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridLayout() { - return gridLayout; - } - - public void setGridLayout(HtmlPanelGrid hpg) { - this.gridLayout = hpg; - } - - private HtmlPanelGrid gridLayoutTop = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridLayoutTop() { - return gridLayoutTop; - } - - public void setGridLayoutTop(HtmlPanelGrid hpg) { - this.gridLayoutTop = hpg; - } - - private HtmlPanelGrid gridActual = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridActual() { - return gridActual; - } - - public void setGridActual(HtmlPanelGrid hpg) { - this.gridActual = hpg; - } - - private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel1() { - return gridPanel1; - } - - public void setGridPanel1(HtmlPanelGrid hpg) { - this.gridPanel1 = hpg; - } - - private StaticText staticText1 = new StaticText(); - - public StaticText getStaticText1() { - return staticText1; - } - - public void setStaticText1(StaticText st) { - this.staticText1 = st; - } - - private HtmlPanelGrid gridSeguimento = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridSeguimento() { - return gridSeguimento; - } - - public void setGridSeguimento(HtmlPanelGrid hpg) { - this.gridSeguimento = hpg; - } - - private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel2() { - return gridPanel2; - } - - public void setGridPanel2(HtmlPanelGrid hpg) { - this.gridPanel2 = hpg; - } - - private StaticText staticText2 = new StaticText(); - - public StaticText getStaticText2() { - return staticText2; - } - - public void setStaticText2(StaticText st) { - this.staticText2 = st; - } - - private HtmlPanelGrid gridConcluidos = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridConcluidos() { - return gridConcluidos; - } - - public void setGridConcluidos(HtmlPanelGrid hpg) { - this.gridConcluidos = hpg; - } - - private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel3() { - return gridPanel3; - } - - public void setGridPanel3(HtmlPanelGrid hpg) { - this.gridPanel3 = hpg; - } - - private StaticText staticText3 = new StaticText(); - - public StaticText getStaticText3() { - return staticText3; - } - - public void setStaticText3(StaticText st) { - this.staticText3 = st; - } - - private Link link2 = new Link(); - - public Link getLink2() { - return link2; - } - - public void setLink2(Link l) { - this.link2 = l; - } - - private Button butNovaAnalise = new Button(); - - public Button getButNovaAnalise() { - return butNovaAnalise; - } - - public void setButNovaAnalise(Button b) { - this.butNovaAnalise = b; - } - - private StaticText staticText4 = new StaticText(); - - public StaticText getStaticText4() { - return staticText4; - } - - public void setStaticText4(StaticText st) { - this.staticText4 = st; - } - - private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel4() { - return gridPanel4; - } - - public void setGridPanel4(HtmlPanelGrid hpg) { - this.gridPanel4 = hpg; - } - - private Table table1 = new Table(); - - public Table getTable1() { - return table1; - } - - public void setTable1(Table t) { - this.table1 = t; - } - - private TableRowGroup tableRowGroup1 = new TableRowGroup(); - - public TableRowGroup getTableRowGroup1() { - return tableRowGroup1; - } - - public void setTableRowGroup1(TableRowGroup trg) { - this.tableRowGroup1 = trg; - } - - private TableColumn tableColumn1 = new TableColumn(); - - public TableColumn getTableColumn1() { - return tableColumn1; - } - - public void setTableColumn1(TableColumn tc) { - this.tableColumn1 = tc; - } - - private TableColumn tableColumn2 = new TableColumn(); - - public TableColumn getTableColumn2() { - return tableColumn2; - } - - public void setTableColumn2(TableColumn tc) { - this.tableColumn2 = tc; - } - - private TableColumn tableColumn3 = new TableColumn(); - - public TableColumn getTableColumn3() { - return tableColumn3; - } - - public void setTableColumn3(TableColumn tc) { - this.tableColumn3 = tc; - } - - private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel5() { - return gridPanel5; - } - - public void setGridPanel5(HtmlPanelGrid hpg) { - this.gridPanel5 = hpg; - } - - private Table table2 = new Table(); - - public Table getTable2() { - return table2; - } - - public void setTable2(Table t) { - this.table2 = t; - } - - private TableRowGroup tableRowGroup2 = new TableRowGroup(); - - public TableRowGroup getTableRowGroup2() { - return tableRowGroup2; - } - - public void setTableRowGroup2(TableRowGroup trg) { - this.tableRowGroup2 = trg; - } - - private TableColumn tableColumn4 = new TableColumn(); - - public TableColumn getTableColumn4() { - return tableColumn4; - } - - public void setTableColumn4(TableColumn tc) { - this.tableColumn4 = tc; - } - - private TableColumn tableColumn5 = new TableColumn(); - - public TableColumn getTableColumn5() { - return tableColumn5; - } - - public void setTableColumn5(TableColumn tc) { - this.tableColumn5 = tc; - } - - private TableColumn tableColumn6 = new TableColumn(); - - public TableColumn getTableColumn6() { - return tableColumn6; - } - - public void setTableColumn6(TableColumn tc) { - this.tableColumn6 = tc; - } - - private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel6() { - return gridPanel6; - } - - public void setGridPanel6(HtmlPanelGrid hpg) { - this.gridPanel6 = hpg; - } - - private PanelGroup groupPanel1 = new PanelGroup(); - - public PanelGroup getGroupPanel1() { - return groupPanel1; - } - - public void setGroupPanel1(PanelGroup pg) { - this.groupPanel1 = pg; - } - - private StaticText staticText11 = new StaticText(); - - public StaticText getStaticText11() { - return staticText11; - } - - public void setStaticText11(StaticText st) { - this.staticText11 = st; - } - - private DropDown drpAno = new DropDown(); - - public DropDown getDrpAno() { - return drpAno; - } - - public void setDrpAno(DropDown dd) { - this.drpAno = dd; - } - - private PanelGroup groupPanel2 = new PanelGroup(); - - public PanelGroup getGroupPanel2() { - return groupPanel2; - } - - public void setGroupPanel2(PanelGroup pg) { - this.groupPanel2 = pg; - } - - private StaticText lblMes = new StaticText(); - - public StaticText getLblMes() { - return lblMes; - } - - public void setLblMes(StaticText st) { - this.lblMes = st; - } - - private DropDown drpMes = new DropDown(); - - public DropDown getDrpMes() { - return drpMes; - } - - public void setDrpMes(DropDown dd) { - this.drpMes = dd; - } - - private PanelGroup groupPanel3 = new PanelGroup(); - - public PanelGroup getGroupPanel3() { - return groupPanel3; - } - - public void setGroupPanel3(PanelGroup pg) { - this.groupPanel3 = pg; - } - - private StaticText lblDia = new StaticText(); - - public StaticText getLblDia() { - return lblDia; - } - - public void setLblDia(StaticText st) { - this.lblDia = st; - } - - private DropDown drpDia = new DropDown(); - - public DropDown getDrpDia() { - return drpDia; - } - - public void setDrpDia(DropDown dd) { - this.drpDia = dd; - } - - private PanelGroup groupPanel4 = new PanelGroup(); - - public PanelGroup getGroupPanel4() { - return groupPanel4; - } - - public void setGroupPanel4(PanelGroup pg) { - this.groupPanel4 = pg; - } - - private StaticText staticText14 = new StaticText(); - - public StaticText getStaticText14() { - return staticText14; - } - - public void setStaticText14(StaticText st) { - this.staticText14 = st; - } - - private TextField txtNome = new TextField(); - - public TextField getTxtNome() { - return txtNome; - } - - public void setTxtNome(TextField tf) { - this.txtNome = tf; - } - - private Button butPesquisar = new Button(); - - public Button getButPesquisar() { - return butPesquisar; - } - - public void setButPesquisar(Button b) { - this.butPesquisar = b; - } - - private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel7() { - return gridPanel7; - } - - public void setGridPanel7(HtmlPanelGrid hpg) { - this.gridPanel7 = hpg; - } - - private Table table3 = new Table(); - - public Table getTable3() { - return table3; - } - - public void setTable3(Table t) { - this.table3 = t; - } - - private TableRowGroup tableRowGroup3 = new TableRowGroup(); - - public TableRowGroup getTableRowGroup3() { - return tableRowGroup3; - } - - public void setTableRowGroup3(TableRowGroup trg) { - this.tableRowGroup3 = trg; - } - - private TableColumn tableColumn7 = new TableColumn(); - - public TableColumn getTableColumn7() { - return tableColumn7; - } - - public void setTableColumn7(TableColumn tc) { - this.tableColumn7 = tc; - } - - private TableColumn tableColumn8 = new TableColumn(); - - public TableColumn getTableColumn8() { - return tableColumn8; - } - - public void setTableColumn8(TableColumn tc) { - this.tableColumn8 = tc; - } - - private TableColumn tableColumn9 = new TableColumn(); - - public TableColumn getTableColumn9() { - return tableColumn9; - } - - public void setTableColumn9(TableColumn tc) { - this.tableColumn9 = tc; - } - - private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel8() { - return gridPanel8; - } - - public void setGridPanel8(HtmlPanelGrid hpg) { - this.gridPanel8 = hpg; - } - - private PanelGroup groupPanel5 = new PanelGroup(); - - public PanelGroup getGroupPanel5() { - return groupPanel5; - } - - public void setGroupPanel5(PanelGroup pg) { - this.groupPanel5 = pg; - } - - private ImageComponent image1 = new ImageComponent(); - - public ImageComponent getImage1() { - return image1; - } - - public void setImage1(ImageComponent ic) { - this.image1 = ic; - } - - private ImageComponent image2 = new ImageComponent(); - - public ImageComponent getImage2() { - return image2; - } - - public void setImage2(ImageComponent ic) { - this.image2 = ic; - } - - private PanelGroup groupPanel6 = new PanelGroup(); - - public PanelGroup getGroupPanel6() { - return groupPanel6; - } - - public void setGroupPanel6(PanelGroup pg) { - this.groupPanel6 = pg; - } - - private StaticText lblUser = new StaticText(); - - public StaticText getLblUser() { - return lblUser; - } - - public void setLblUser(StaticText st) { - this.lblUser = st; - } - - private StaticText staticText18 = new StaticText(); - - public StaticText getStaticText18() { - return staticText18; - } - - public void setStaticText18(StaticText st) { - this.staticText18 = st; - } - - private Hyperlink lnkEditUser = new Hyperlink(); - - public Hyperlink getLnkEditUser() { - return lnkEditUser; - } - - public void setLnkEditUser(Hyperlink h) { - this.lnkEditUser = h; - } - - private StaticText staticText19 = new StaticText(); - - public StaticText getStaticText19() { - return staticText19; - } - - public void setStaticText19(StaticText st) { - this.staticText19 = st; - } - - private Hyperlink lnkLogout = new Hyperlink(); - - public Hyperlink getLnkLogout() { - return lnkLogout; - } - - public void setLnkLogout(Hyperlink h) { - this.lnkLogout = h; - } - - private Hyperlink lnkDataAcidente = new Hyperlink(); - - public Hyperlink getLnkDataAcidente() { - return lnkDataAcidente; - } - - public void setLnkDataAcidente(Hyperlink h) { - this.lnkDataAcidente = h; - } - - private Hyperlink lnkNr = new Hyperlink(); - - public Hyperlink getLnkNr() { - return lnkNr; - } - - public void setLnkNr(Hyperlink h) { - this.lnkNr = h; - } - - private Hyperlink lnkNomeAcidentado = new Hyperlink(); - - public Hyperlink getLnkNomeAcidentado() { - return lnkNomeAcidentado; - } - - public void setLnkNomeAcidentado(Hyperlink h) { - this.lnkNomeAcidentado = h; - } - - private Hyperlink lnkDataAcidenteSeg = new Hyperlink(); - - public Hyperlink getLnkDataAcidenteSeg() { - return lnkDataAcidenteSeg; - } - - public void setLnkDataAcidenteSeg(Hyperlink h) { - this.lnkDataAcidenteSeg = h; - } - - private Hyperlink lnkNrSeg = new Hyperlink(); - - public Hyperlink getLnkNrSeg() { - return lnkNrSeg; - } - - public void setLnkNrSeg(Hyperlink h) { - this.lnkNrSeg = h; - } - - private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink(); - - public Hyperlink getLnkNomeAcidentadoSeg() { - return lnkNomeAcidentadoSeg; - } - - public void setLnkNomeAcidentadoSeg(Hyperlink h) { - this.lnkNomeAcidentadoSeg = h; - } - - private Hyperlink lnkDataConcluida = new Hyperlink(); - - public Hyperlink getLnkDataConcluida() { - return lnkDataConcluida; - } - - public void setLnkDataConcluida(Hyperlink h) { - this.lnkDataConcluida = h; - } - - private Hyperlink lnkNrConcluida = new Hyperlink(); - - public Hyperlink getLnkNrConcluida() { - return lnkNrConcluida; - } - - public void setLnkNrConcluida(Hyperlink h) { - this.lnkNrConcluida = h; - } - - private Hyperlink lnkNomeConcluida = new Hyperlink(); - - public Hyperlink getLnkNomeConcluida() { - return lnkNomeConcluida; - } - - public void setLnkNomeConcluida(Hyperlink h) { - this.lnkNomeConcluida = h; - } - - private StaticText txtSearchMsg = new StaticText(); - - public StaticText getTxtSearchMsg() { - return txtSearchMsg; - } - - public void setTxtSearchMsg(StaticText st) { - this.txtSearchMsg = st; - } - - private TableColumn tableColumn10 = new TableColumn(); - - public TableColumn getTableColumn10() { - return tableColumn10; - } - - public void setTableColumn10(TableColumn tc) { - this.tableColumn10 = tc; - } - - private TableColumn tableColumn11 = new TableColumn(); - - public TableColumn getTableColumn11() { - return tableColumn11; - } - - public void setTableColumn11(TableColumn tc) { - this.tableColumn11 = tc; - } - - private Hyperlink lnkFase = new Hyperlink(); - - public Hyperlink getLnkFase() { - return lnkFase; - } - - public void setLnkFase(Hyperlink h) { - this.lnkFase = h; - } - - private Hyperlink lnkFaseSeg = new Hyperlink(); - - public Hyperlink getLnkFaseSeg() { - return lnkFaseSeg; - } - - public void setLnkFaseSeg(Hyperlink h) { - this.lnkFaseSeg = h; - } - - //
- - /** - *

Construct a new Page bean instance.

- */ - public FormSeguranca() { - } - - /** - *

Callback method that is called whenever a page is navigated to, - * either directly via a URL, or indirectly via page navigation. - * Customize this method to acquire resources that will be needed - * for event handlers and lifecycle methods, whether or not this - * page is performing post back processing.

- * - *

Note that, if the current request is a postback, the property - * values of the components do not represent any - * values submitted with this request. Instead, they represent the - * property values that were saved for this view when it was rendered.

- */ - public void init() { - // Perform initializations inherited from our superclass - super.init(); - // Perform application initialization that must complete - // *before* managed components are initialized - // TODO - add your own initialiation code here - - // - // Initialize automatically managed components - // *Note* - this logic should NOT be modified - try { - _init(); - } catch (Exception e) { - log("FormSeguranca Initialization Failure", e); - throw e instanceof FacesException ? (FacesException) e: new FacesException(e); - } - - // - // Perform application initialization that must complete - // *after* managed components are initialized - // TODO - add your own initialization code here - - if (!getSessionBean1().isLoggedIn()) { - try { - getExternalContext().redirect("Login.jsp"); - } catch(Exception e) { - // . . . handle exception . . . - } - } - } - - /** - *

Callback method that is called after the component tree has been - * restored, but before any event processing takes place. This method - * will only be called on a postback request that - * is processing a form submit. Customize this method to allocate - * resources that will be required in your event handlers.

- */ - public void preprocess() { - - } - - /** - *

Callback method that is called just before rendering takes place. - * This method will only be called for the page that - * will actually be rendered (and not, for example, on a page that - * handled a postback and then navigated to a different page). Customize - * this method to allocate resources that will be required for rendering - * this page.

- */ - public void prerender() { - lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); - - AnalisesDataProvider adp = new AnalisesDataProvider(); - try - { - //lblActivos.setRendered(true); - table1.setRendered(true); - - //ArrayList actuaisList = adp.getAnalisesActuaisList(getSessionBean1().getCurrentUser().getEstabelecimento_id(), new Integer(1)); - ArrayList actuaisList = adp.getAnalisesActuaisSegList( getSessionBean1().getCurrentUser().getEstabelecimento_id() ); - getSessionBean1().getAnalisesActualDataProvider().setList(actuaisList); - } - catch(Exception ex) - { - //lblActivos.setRendered(false); - table1.setRendered(false); - ex.printStackTrace(); - } - - try - { - //lblActivos.setRendered(true); - table2.setRendered(true); - - ArrayList seguimentoList = adp.getAnalisesSeguimentoSegList(getSessionBean1().getCurrentUser().getEstabelecimento_id()); - getSessionBean1().getAnalisesSeguimentoDataProvider().setList(seguimentoList); - } - catch(Exception ex) - { - //lblActivos.setRendered(false); - table2.setRendered(false); - ex.printStackTrace(); - } - - HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest(); - String referer = request.getRequestURI(); - String pageFrom = Utils.getPageFrom(referer); - if(!pageFrom.matches("FormSeguranca.jsp")) - { - - try - { - //lblActivos.setRendered(true); - table3.setRendered(true); - - ArrayList concluidasList = adp.getAnalisesConcluidasList(getSessionBean1().getCurrentUser().getEstabelecimento_id()); - getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); - } - catch(Exception ex) - { - //lblActivos.setRendered(false); - table3.setRendered(false); - ex.printStackTrace(); - } - fillAnoDropDown(); - } - - } - - /** - *

Callback method that is called after rendering is completed for - * this request, if init() was called (regardless of whether - * or not this was the page that was actually rendered). Customize this - * method to release resources acquired in the init(), - * preprocess(), or prerender() methods (or - * acquired during execution of an event handler).

- */ - public void destroy() { - } - - -// private void fillDateDropDowns() -// { -// fillAnoDropDown(); -// //fillMesDropDown(); -// //fillDiaDropDown(); -// } - - private void fillAnoDropDown() - { - ArrayList anosList = new ArrayList(); - for(int ano=2007; ano<2051; ano++) - { - anosList.add(new Integer(ano)); - } - com.sun.rave.web.ui.model.Option[] anoOptions = new com.sun.rave.web.ui.model.Option[anosList.size()+1]; - anoOptions[0] = new Option("", ""); - ListIterator iter = anosList.listIterator(); - int i = 1; - while(iter.hasNext()) - { - Integer ano = (Integer) iter.next(); - - anoOptions[i] = new Option(ano, ano.toString()); - i++; - } - getSessionBean1().setAnoOptions(anoOptions); - Calendar cal = new GregorianCalendar(); - int year = cal.get(Calendar.YEAR); - //drpAno.setSelected( new Integer(year) ); - } - - private void fillMesDropDown() - { - com.sun.rave.web.ui.model.Option[] mesOptions = new com.sun.rave.web.ui.model.Option[13]; - mesOptions[0] = new Option("", ""); - mesOptions[1] = new Option(new Integer(1), "Janeiro"); - mesOptions[2] = new Option(new Integer(2), "Fevereiro"); - mesOptions[3] = new Option(new Integer(3), "Março"); - mesOptions[4] = new Option(new Integer(4), "Abril"); - mesOptions[5] = new Option(new Integer(5), "Maio"); - mesOptions[6] = new Option(new Integer(6), "Junho"); - mesOptions[7] = new Option(new Integer(7), "Julho"); - mesOptions[8] = new Option(new Integer(8), "Agosto"); - mesOptions[9] = new Option(new Integer(9), "Setembro"); - mesOptions[10] = new Option(new Integer(10), "Outubro"); - mesOptions[11] = new Option(new Integer(11), "Novembro"); - mesOptions[12] = new Option(new Integer(12), "Dezembro"); - getSessionBean1().setMesOptions(mesOptions); - Calendar cal = new GregorianCalendar(); - int month = cal.get(Calendar.MONTH); // 0=Jan, 1=Feb, ... - //drpMes.setSelected( new Integer(month+1) ); - } - - private void fillDiaDropDown() - { - int ano = ( (Integer)drpAno.getSelected() ).intValue(); - int mes = ( (Integer)drpMes.getSelected() ).intValue(); - int dias = 0; - switch (mes) { - case 1: dias=31; break; - case 2: - GregorianCalendar cal = new GregorianCalendar(); - if(cal.isLeapYear(ano)) - { - dias = 29; - } - else - { - dias = 28; - } - break; - case 3: dias=31; break; - case 4: dias=30; break; - case 5: dias=31; break; - case 6: dias=30; break; - case 7: dias=31; break; - case 8: dias=31; break; - case 9: dias=30; break; - case 10: dias=31; break; - case 11: dias=30; break; - case 12: dias=31; break; - default: System.out.println("Invalid month.");break; - } - - ArrayList diasList = new ArrayList(); - for(int dia=1; diaReturn a reference to the scoped data bean.

- */ - protected RequestBean1 getRequestBean1() { - return (RequestBean1)getBean("RequestBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected SessionBean1 getSessionBean1() { - return (SessionBean1)getBean("SessionBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected ApplicationBean1 getApplicationBean1() { - return (ApplicationBean1)getBean("ApplicationBean1"); - } - - public String lnkLogout_action() { - // TODO: Replace with your code - // Invalidate the current session - javax.servlet.http.HttpSession session = - (javax.servlet.http.HttpSession) getExternalContext().getSession(true); - session.invalidate(); - return "login"; - } - - public void drpAno_processValueChange(ValueChangeEvent event) { - // TODO: Replace with your code - Object ano = event.getNewValue(); - if(ano == null) - { - lblMes.setVisible(false); - drpMes.setVisible(false); - lblDia.setVisible(false); - drpDia.setVisible(false); - } - else - { - lblMes.setVisible(true); - drpMes.setVisible(true); - fillMesDropDown(); - } - } - - public void drpMes_processValueChange(ValueChangeEvent event) { - // TODO: Replace with your code - Object mes = event.getNewValue(); - if(mes == null) - { - lblDia.setVisible(false); - drpDia.setVisible(false); - } - else - { - lblDia.setVisible(true); - drpDia.setVisible(true); - fillDiaDropDown(); - } - } - - public String butPesquisar_action() { - // TODO: Process the button click action. Return value is a navigation - // case name where null will return to the same page. - Object obAno = null; - Object obMes = null; - Object obDia = null; - try - { - obAno = drpAno.getSelected(); - obMes = drpMes.getSelected(); - obDia = drpDia.getSelected(); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - Integer ano = null; - Integer mes = null; - Integer dia = null; - - if(obAno != null) - { - ano = (Integer) obAno; - } - - if(obMes != null) - { - mes = (Integer) obMes; - } - - if(obDia != null) - { - dia = (Integer) obDia; - } - - String nome = null; - if(txtNome.getText() != null) - { - nome = (String) txtNome.getText(); - } - - AnalisesDataProvider adp = new AnalisesDataProvider(); - try - { - - //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList()); - ArrayList concluidasList = adp.searchAanalisesConcluidasList(getSessionBean1().getCurrentUser().getEstabelecimento_id(), ano, mes, dia, nome); - - table3.setRendered(true); - txtSearchMsg.setRendered(false); - getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); - - - } - catch(Exception ex) - { - table3.setRendered(false); - txtSearchMsg.setRendered(true); - txtSearchMsg.setText("Não foram encontrados registos para a sua pesquisa !"); - ex.printStackTrace(); - } - - return null; - } - - public void drpDia_processValueChange(ValueChangeEvent vce) { - // TODO: Replace with your code - - } - -// private String getPageFrom(String referer) -// { -// String pageFrom = referer.substring(referer.lastIndexOf("/")+1); -// return pageFrom; -// } - - public String butNovaAnalise_action() { - // TODO: Process the button click action. Return value is a navigation - // case name where null will return to the same page. - - getSessionBean1().setNavFrom("FormSeguranca"); - getSessionBean1().setCurrentAnalise(null); - return "analise_acidente"; - } - - public String lnkDataAcidente_action() { - // TODO: Replace with your code - AnaliseAcidente a = getTableActivosRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormSeguranca"); - return "analise_acidente"; - } - - public String lnkNr_action() { - // TODO: Replace with your code - AnaliseAcidente a = getTableActivosRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormSeguranca"); - return "analise_acidente"; - } - - public String lnkNomeAcidentado_action() { - // TODO: Replace with your code - AnaliseAcidente a = getTableActivosRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormSeguranca"); - return "analise_acidente"; - } - - private AnaliseAcidente getTableActivosRowData() - { - RowKey rk = tableRowGroup1.getRowKey(); - int k = Integer.parseInt(rk.getRowId()); - AnalisesActualDataProvider provider = (AnalisesActualDataProvider) tableRowGroup1.getSourceData(); - ArrayList list = (ArrayList) provider.getList(); - AnaliseAcidente a = (AnaliseAcidente)list.get(k); - return a; - } - - public String lnkDataAcidenteSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormSeguranca"); - return "view_analise"; - - } - - public String lnkNrSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormSeguranca"); - return "view_analise"; - } - - public String lnkNomeAcidentadoSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormSeguranca"); - return "view_analise"; - } - - private AnaliseAcidente getTableSeguimentoRowData() - { - RowKey rk = tableRowGroup2.getRowKey(); - int k = Integer.parseInt(rk.getRowId()); - AnalisesSeguimentoDataProvider provider = (AnalisesSeguimentoDataProvider) tableRowGroup2.getSourceData(); - ArrayList list = (ArrayList) provider.getList(); - AnaliseAcidente a = (AnaliseAcidente)list.get(k); - return a; - } - - private AnaliseAcidente getTableConcluidasRowData() - { - RowKey rk = tableRowGroup3.getRowKey(); - int k = Integer.parseInt(rk.getRowId()); - AnalisesConcluidasDataProvider provider = (AnalisesConcluidasDataProvider) tableRowGroup3.getSourceData(); - ArrayList list = (ArrayList) provider.getList(); - AnaliseAcidente a = (AnaliseAcidente)list.get(k); - return a; - } - - public String lnkEditUser_action() { - // TODO: Replace with your code - getSessionBean1().setNavFrom("FormSeguranca"); - getSessionBean1().setModoEdicaoUtilizador("edit"); - return "user"; - } - - public String lnkDataConcluida_action() { - // TODO: Replace with your code - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormSeguranca"); - return "view_analise"; - } - - public String lnkNrConcluida_action() { - // TODO: Replace with your code - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormSeguranca"); - return "view_analise"; - } - - public String lnkNomeConcluida_action() { - // TODO: Replace with your code - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormSeguranca"); - return "view_analise"; - } - - public String lnkFase_action() { - // TODO: Replace with your code - AnaliseAcidente a = getTableActivosRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormSeguranca"); - return "analise_acidente"; - } - - public String lnkFaseSeg_action() { - // TODO: Replace with your code - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormSeguranca"); - return "view_analise"; - } - -} - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Header.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Header.java deleted file mode 100644 index 7bcdb7dc..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Header.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Header.java - * - * Created on September 19, 2007, 10:14 AM - * Copyright lluis - */ -package analiseacidentestrabalho; - -import com.sun.rave.web.ui.appbase.AbstractFragmentBean; -import com.sun.rave.web.ui.component.StaticText; -import javax.faces.FacesException; -import javax.faces.component.html.HtmlPanelGrid; - -/** - *

Fragment bean that corresponds to a similarly named JSP page - * fragment. This class contains component definitions (and initialization - * code) for all components that you have defined on this fragment, as well as - * lifecycle methods and event handlers where you may add behavior - * to respond to incoming events.

- */ -public class Header extends AbstractFragmentBean { - // - private int __placeholder; - - /** - *

Automatically managed component initialization. WARNING: - * This method is automatically generated, so any user-specified code inserted - * here is subject to being replaced.

- */ - private void _init() throws Exception { - } - - private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel1() { - return gridPanel1; - } - - public void setGridPanel1(HtmlPanelGrid hpg) { - this.gridPanel1 = hpg; - } - - private StaticText staticText1 = new StaticText(); - - public StaticText getStaticText1() { - return staticText1; - } - - public void setStaticText1(StaticText st) { - this.staticText1 = st; - } - //
- - public Header() { - } - - /** - *

Callback method that is called whenever a page containing - * this page fragment is navigated to, either directly via a URL, - * or indirectly via page navigation. Override this method to acquire - * resources that will be needed for event handlers and lifecycle methods.

- * - *

The default implementation does nothing.

- */ - public void init() { - // Perform initializations inherited from our superclass - super.init(); - // Perform application initialization that must complete - // *before* managed components are initialized - // TODO - add your own initialiation code here - - - // - // Initialize automatically managed components - // *Note* - this logic should NOT be modified - try { - _init(); - } catch (Exception e) { - log("Page1 Initialization Failure", e); - throw e instanceof FacesException ? (FacesException) e: new FacesException(e); - } - - // - // Perform application initialization that must complete - // *after* managed components are initialized - // TODO - add your own initialization code here - } - - /** - *

Callback method that is called after rendering is completed for - * this request, if init() was called. Override this - * method to release resources acquired in the init() - * resources that will be needed for event handlers and lifecycle methods.

- * - *

The default implementation does nothing.

- */ - public void destroy() { - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected RequestBean1 getRequestBean1() { - return (RequestBean1)getBean("RequestBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected SessionBean1 getSessionBean1() { - return (SessionBean1)getBean("SessionBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected ApplicationBean1 getApplicationBean1() { - return (ApplicationBean1)getBean("ApplicationBean1"); - } -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/LoadImage.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/LoadImage.java deleted file mode 100644 index 8439b42f..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/LoadImage.java +++ /dev/null @@ -1,480 +0,0 @@ -/* - * LoadImage.java - * - * Created on September 26, 2007, 5:36 PM - * Copyright lluis - */ -package analiseacidentestrabalho; - -import com.sun.rave.web.ui.appbase.AbstractPageBean; -import com.sun.rave.web.ui.component.Body; -import com.sun.rave.web.ui.component.Button; -import com.sun.rave.web.ui.component.Form; -import com.sun.rave.web.ui.component.Head; -import com.sun.rave.web.ui.component.Html; -import com.sun.rave.web.ui.component.ImageComponent; -import com.sun.rave.web.ui.component.Link; -import com.sun.rave.web.ui.component.Page; -import com.sun.rave.web.ui.component.PanelGroup; -import com.sun.rave.web.ui.component.StaticText; -import com.sun.rave.web.ui.component.Upload; -import com.sun.rave.web.ui.model.UploadedFile; -import java.io.File; -import javax.faces.FacesException; -import javax.faces.component.html.HtmlPanelGrid; -import javax.servlet.ServletContext; - -/** - *

Page bean that corresponds to a similarly named JSP page. This - * class contains component definitions (and initialization code) for - * all components that you have defined on this page, as well as - * lifecycle methods and event handlers where you may add behavior - * to respond to incoming events.

- */ -public class LoadImage extends AbstractPageBean { - // - private int __placeholder; - - /** - *

Automatically managed component initialization. WARNING: - * This method is automatically generated, so any user-specified code inserted - * here is subject to being replaced.

- */ - private void _init() throws Exception { - } - - private Page page1 = new Page(); - - public Page getPage1() { - return page1; - } - - public void setPage1(Page p) { - this.page1 = p; - } - - private Html html1 = new Html(); - - public Html getHtml1() { - return html1; - } - - public void setHtml1(Html h) { - this.html1 = h; - } - - private Head head1 = new Head(); - - public Head getHead1() { - return head1; - } - - public void setHead1(Head h) { - this.head1 = h; - } - - private Link link1 = new Link(); - - public Link getLink1() { - return link1; - } - - public void setLink1(Link l) { - this.link1 = l; - } - - private Body body1 = new Body(); - - public Body getBody1() { - return body1; - } - - public void setBody1(Body b) { - this.body1 = b; - } - - private Form form1 = new Form(); - - public Form getForm1() { - return form1; - } - - public void setForm1(Form f) { - this.form1 = f; - } - - private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridBase1() { - return gridBase1; - } - - public void setGridBase1(HtmlPanelGrid hpg) { - this.gridBase1 = hpg; - } - - private HtmlPanelGrid gridLayout = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridLayout() { - return gridLayout; - } - - public void setGridLayout(HtmlPanelGrid hpg) { - this.gridLayout = hpg; - } - - private StaticText staticText1 = new StaticText(); - - public StaticText getStaticText1() { - return staticText1; - } - - public void setStaticText1(StaticText st) { - this.staticText1 = st; - } - - private Upload fileUpload1 = new Upload(); - - public Upload getFileUpload1() { - return fileUpload1; - } - - public void setFileUpload1(Upload u) { - this.fileUpload1 = u; - } - - private Button butUpload = new Button(); - - public Button getButUpload() { - return butUpload; - } - - public void setButUpload(Button b) { - this.butUpload = b; - } - - //
- /** - *

Construct a new Page bean instance.

- */ - - private String realImageFilePath; - //private static final String IMAGE_URL = "/resources/image-file"; - private String IMAGE_URL = "/resources/images"; - - private StaticText staticText2 = new StaticText(); - - public StaticText getStaticText2() { - return staticText2; - } - - public void setStaticText2(StaticText st) { - this.staticText2 = st; - } - - private PanelGroup groupPanel1 = new PanelGroup(); - - public PanelGroup getGroupPanel1() { - return groupPanel1; - } - - public void setGroupPanel1(PanelGroup pg) { - this.groupPanel1 = pg; - } - - private StaticText staticText3 = new StaticText(); - - public StaticText getStaticText3() { - return staticText3; - } - - public void setStaticText3(StaticText st) { - this.staticText3 = st; - } - - private StaticText txtFileName = new StaticText(); - - public StaticText getTxtFileName() { - return txtFileName; - } - - public void setTxtFileName(StaticText st) { - this.txtFileName = st; - } - - private PanelGroup groupPanel2 = new PanelGroup(); - - public PanelGroup getGroupPanel2() { - return groupPanel2; - } - - public void setGroupPanel2(PanelGroup pg) { - this.groupPanel2 = pg; - } - - private StaticText staticText5 = new StaticText(); - - public StaticText getStaticText5() { - return staticText5; - } - - public void setStaticText5(StaticText st) { - this.staticText5 = st; - } - - private StaticText txtFileType = new StaticText(); - - public StaticText getTxtFileType() { - return txtFileType; - } - - public void setTxtFileType(StaticText st) { - this.txtFileType = st; - } - - private PanelGroup groupPanel3 = new PanelGroup(); - - public PanelGroup getGroupPanel3() { - return groupPanel3; - } - - public void setGroupPanel3(PanelGroup pg) { - this.groupPanel3 = pg; - } - - private StaticText staticText7 = new StaticText(); - - public StaticText getStaticText7() { - return staticText7; - } - - public void setStaticText7(StaticText st) { - this.staticText7 = st; - } - - private StaticText txtFileSize = new StaticText(); - - public StaticText getTxtFileSize() { - return txtFileSize; - } - - public void setTxtFileSize(StaticText st) { - this.txtFileSize = st; - } - - private ImageComponent image1 = new ImageComponent(); - - public ImageComponent getImage1() { - return image1; - } - - public void setImage1(ImageComponent ic) { - this.image1 = ic; - } - - private StaticText txtMsg = new StaticText(); - - public StaticText getTxtMsg() { - return txtMsg; - } - - public void setTxtMsg(StaticText st) { - this.txtMsg = st; - } - public LoadImage() { - } - - /** - *

Callback method that is called whenever a page is navigated to, - * either directly via a URL, or indirectly via page navigation. - * Customize this method to acquire resources that will be needed - * for event handlers and lifecycle methods, whether or not this - * page is performing post back processing.

- * - *

Note that, if the current request is a postback, the property - * values of the components do not represent any - * values submitted with this request. Instead, they represent the - * property values that were saved for this view when it was rendered.

- */ - public void init() { - // Perform initializations inherited from our superclass - super.init(); - // Perform application initialization that must complete - // *before* managed components are initialized - // TODO - add your own initialiation code here - - // - // Initialize automatically managed components - // *Note* - this logic should NOT be modified - try { - _init(); - } catch (Exception e) { - log("LoadImage Initialization Failure", e); - throw e instanceof FacesException ? (FacesException) e: new FacesException(e); - } - - // - // Perform application initialization that must complete - // *after* managed components are initialized - // TODO - add your own initialization code here - - if (!getSessionBean1().isLoggedIn()) { - try { - getExternalContext().redirect("Login.jsp"); - } catch(Exception e) { - // . . . handle exception . . . - } - } - - getSessionBean1().setImageName(null); - ServletContext theApplicationsServletContext = - (ServletContext) this.getExternalContext().getContext(); - this.realImageFilePath = theApplicationsServletContext.getRealPath(IMAGE_URL); - try - { - realImageFilePath += "/tmp" + getSessionBean1().getCurrentUser().getLogin(); - File f = new File(realImageFilePath); - f.mkdir(); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - } - - /** - *

Callback method that is called after the component tree has been - * restored, but before any event processing takes place. This method - * will only be called on a postback request that - * is processing a form submit. Customize this method to allocate - * resources that will be required in your event handlers.

- */ - public void preprocess() { - } - - /** - *

Callback method that is called just before rendering takes place. - * This method will only be called for the page that - * will actually be rendered (and not, for example, on a page that - * handled a postback and then navigated to a different page). Customize - * this method to allocate resources that will be required for rendering - * this page.

- */ - public void prerender() { - String uploadedFileName = (String) - this.txtFileName.getValue(); - if ( uploadedFileName != null ) { - IMAGE_URL += getSessionBean1().getImageName(); - System.out.println("IMAGE URL : " + IMAGE_URL); - image1.setUrl(IMAGE_URL); - } - txtMsg.setText(getSessionBean1().getMsg()); - getSessionBean1().setMsg(""); - - } - - /** - *

Callback method that is called after rendering is completed for - * this request, if init() was called (regardless of whether - * or not this was the page that was actually rendered). Customize this - * method to release resources acquired in the init(), - * preprocess(), or prerender() methods (or - * acquired during execution of an event handler).

- */ - public void destroy() { - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected RequestBean1 getRequestBean1() { - return (RequestBean1)getBean("RequestBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected ApplicationBean1 getApplicationBean1() { - return (ApplicationBean1)getBean("ApplicationBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected SessionBean1 getSessionBean1() { - return (SessionBean1)getBean("SessionBean1"); - } - - public String lnkLogout_action() { - // TODO: Replace with your code - - return null; - } - - public String lnkNome_action() { - // TODO: Replace with your code - - return null; - } - - public String lnkDataNascimento_action() { - // TODO: Replace with your code - - return null; - } - - public String butUpload_action() { - // TODO: Process the button click action. Return value is a navigation - // case name where null will return to the same page. - - UploadedFile uploadedFile = fileUpload1.getUploadedFile(); - String uploadedFileName = uploadedFile.getOriginalName(); - // Some browsers return complete path name, some don't - // Make sure we only have the file name - // First, try forward slash - int index = uploadedFileName.lastIndexOf('/'); - String justFileName; - if ( index >= 0) { - justFileName = uploadedFileName.substring( index + 1 ); - } else { - // Try backslash - index = uploadedFileName.lastIndexOf('\\'); - if (index >= 0) { - justFileName = uploadedFileName.substring( index + 1 ); - } else { - // No forward or back slashes - justFileName = uploadedFileName; - } - } - justFileName = justFileName.substring(0, justFileName.lastIndexOf('.')); - this.txtFileName.setValue(justFileName); - Long uploadedFileSize = new Long(uploadedFile.getSize()); - this.txtFileSize.setValue(uploadedFileSize); - String uploadedFileType = uploadedFile.getContentType(); - this.txtFileType.setValue(uploadedFileType); - if ( uploadedFileType.equals("image/jpeg") - || uploadedFileType.equals("image/pjpeg") - || uploadedFileType.equals("image/gif") - || uploadedFileType.equals("image/png") - || uploadedFileType.equals("image/x-png")) { - try { - realImageFilePath += "/" + justFileName; - File file = new File(this.realImageFilePath); - uploadedFile.write(file); - getSessionBean1().setImageName(justFileName); - //getSessionBean1().setMsg("Ficheiro carregado !"); - } catch (Exception ex) { - ex.printStackTrace(); - getSessionBean1().setMsg("Não foi possivel carregar o ficheiro !"); - return null; - } - } else { - getSessionBean1().setMsg("O ficheiro deve ser do tipo JPEG, PJPEG, GIF, PNG, ou X-PNG !"); - new File(this.realImageFilePath).delete(); - return null; - } - return "analise_acidente"; - } -} - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Login.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Login.java deleted file mode 100644 index a38ebb06..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Login.java +++ /dev/null @@ -1,514 +0,0 @@ -/* - * Page1.java - * - * Created on September 18, 2007, 3:14 PM - * Copyright lluis - */ -package analiseacidentestrabalho; - -import com.sun.rave.web.ui.appbase.AbstractPageBean; -import com.sun.rave.web.ui.component.Body; -import com.sun.rave.web.ui.component.Button; -import com.sun.rave.web.ui.component.Form; -import com.sun.rave.web.ui.component.Head; -import com.sun.rave.web.ui.component.Html; -import com.sun.rave.web.ui.component.Hyperlink; -import com.sun.rave.web.ui.component.Link; -import com.sun.rave.web.ui.component.Page; -import com.sun.rave.web.ui.component.PasswordField; -import com.sun.rave.web.ui.component.StaticText; -import com.sun.rave.web.ui.component.TextField; -import com.sun.rave.web.ui.model.Option; -import db.AnalisesDataProvider; -import db.UtilizadoresDataProvider; -import java.sql.Connection; -import javax.faces.FacesException; -import javax.faces.component.html.HtmlPanelGrid; - -/** - *

Page bean that corresponds to a similarly named JSP page. This - * class contains component definitions (and initialization code) for - * all components that you have defined on this page, as well as - * lifecycle methods and event handlers where you may add behavior - * to respond to incoming events.

- */ -public class Login extends AbstractPageBean { - // - private int __placeholder; - - /** - *

Automatically managed component initialization. WARNING: - * This method is automatically generated, so any user-specified code inserted - * here is subject to being replaced.

- */ - private void _init() throws Exception { - } - - private Page page1 = new Page(); - - public Page getPage1() { - return page1; - } - - public void setPage1(Page p) { - this.page1 = p; - } - - private Html html1 = new Html(); - - public Html getHtml1() { - return html1; - } - - public void setHtml1(Html h) { - this.html1 = h; - } - - private Head head1 = new Head(); - - public Head getHead1() { - return head1; - } - - public void setHead1(Head h) { - this.head1 = h; - } - - private Link link1 = new Link(); - - public Link getLink1() { - return link1; - } - - public void setLink1(Link l) { - this.link1 = l; - } - - private Body body1 = new Body(); - - public Body getBody1() { - return body1; - } - - public void setBody1(Body b) { - this.body1 = b; - } - - private Form form1 = new Form(); - - public Form getForm1() { - return form1; - } - - public void setForm1(Form f) { - this.form1 = f; - } - - private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel6() { - return gridPanel6; - } - - public void setGridPanel6(HtmlPanelGrid hpg) { - this.gridPanel6 = hpg; - } - - private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel1() { - return gridPanel1; - } - - public void setGridPanel1(HtmlPanelGrid hpg) { - this.gridPanel1 = hpg; - } - - private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel2() { - return gridPanel2; - } - - public void setGridPanel2(HtmlPanelGrid hpg) { - this.gridPanel2 = hpg; - } - - private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel3() { - return gridPanel3; - } - - public void setGridPanel3(HtmlPanelGrid hpg) { - this.gridPanel3 = hpg; - } - - private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel4() { - return gridPanel4; - } - - public void setGridPanel4(HtmlPanelGrid hpg) { - this.gridPanel4 = hpg; - } - - private StaticText staticText1 = new StaticText(); - - public StaticText getStaticText1() { - return staticText1; - } - - public void setStaticText1(StaticText st) { - this.staticText1 = st; - } - - private TextField txtUtilizador = new TextField(); - - public TextField getTxtUtilizador() { - return txtUtilizador; - } - - public void setTxtUtilizador(TextField tf) { - this.txtUtilizador = tf; - } - - private StaticText staticText2 = new StaticText(); - - public StaticText getStaticText2() { - return staticText2; - } - - public void setStaticText2(StaticText st) { - this.staticText2 = st; - } - - private PasswordField txtPassword = new PasswordField(); - - public PasswordField getTxtPassword() { - return txtPassword; - } - - public void setTxtPassword(PasswordField pf) { - this.txtPassword = pf; - } - - private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel5() { - return gridPanel5; - } - - public void setGridPanel5(HtmlPanelGrid hpg) { - this.gridPanel5 = hpg; - } - - private Hyperlink lnkPassRecovery = new Hyperlink(); - - public Hyperlink getLnkPassRecovery() { - return lnkPassRecovery; - } - - public void setLnkPassRecovery(Hyperlink h) { - this.lnkPassRecovery = h; - } - - private Button butLogin = new Button(); - - public Button getButLogin() { - return butLogin; - } - - public void setButLogin(Button b) { - this.butLogin = b; - } - - private StaticText txtMsg = new StaticText(); - - public StaticText getTxtMsg() { - return txtMsg; - } - - public void setTxtMsg(StaticText st) { - this.txtMsg = st; - } - - //
- /** - *

Construct a new Page bean instance.

- */ - public Login() { - connect(); - } - - /** - *

Callback method that is called whenever a page is navigated to, - * either directly via a URL, or indirectly via page navigation. - * Customize this method to acquire resources that will be needed - * for event handlers and lifecycle methods, whether or not this - * page is performing post back processing.

- * - *

Note that, if the current request is a postback, the property - * values of the components do not represent any - * values submitted with this request. Instead, they represent the - * property values that were saved for this view when it was rendered.

- */ - public void init() { - // Perform initializations inherited from our superclass - super.init(); - // Perform application initialization that must complete - // *before* managed components are initialized - // TODO - add your own initialiation code here - - // - // Initialize automatically managed components - // *Note* - this logic should NOT be modified - try { - _init(); - } catch (Exception e) { - log("Page1 Initialization Failure", e); - throw e instanceof FacesException ? (FacesException) e: new FacesException(e); - } - - // - // Perform application initialization that must complete - // *after* managed components are initialized - // TODO - add your own initialization code here - - } - - /** - *

Callback method that is called after the component tree has been - * restored, but before any event processing takes place. This method - * will only be called on a postback request that - * is processing a form submit. Customize this method to allocate - * resources that will be required in your event handlers.

- */ - public void preprocess() { - } - - /** - *

Callback method that is called just before rendering takes place. - * This method will only be called for the page that - * will actually be rendered (and not, for example, on a page that - * handled a postback and then navigated to a different page). Customize - * this method to allocate resources that will be required for rendering - * this page.

- */ - public void prerender() { - - txtMsg.setText(getSessionBean1().getMsg()); - getSessionBean1().setMsg(""); - } - - /** - *

Callback method that is called after rendering is completed for - * this request, if init() was called (regardless of whether - * or not this was the page that was actually rendered). Customize this - * method to release resources acquired in the init(), - * preprocess(), or prerender() methods (or - * acquired during execution of an event handler).

- */ - public void destroy() { - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected SessionBean1 getSessionBean1() { - return (SessionBean1)getBean("SessionBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected RequestBean1 getRequestBean1() { - return (RequestBean1)getBean("RequestBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected ApplicationBean1 getApplicationBean1() { - return (ApplicationBean1)getBean("ApplicationBean1"); - } - - public String butLogin_action() { - // TODO: Process the button click action. Return value is a navigation - // case name where null will return to the same page. - String sRet = null; - - UtilizadoresDataProvider udp = new UtilizadoresDataProvider(); - if(txtUtilizador.getText() != null) - { - String utilizador = (String) txtUtilizador.getText(); - if(utilizador.trim().length() > 0) - { - if(txtPassword.getText() != null) - { - String password = (String) txtPassword.getText(); - if(password.trim().length() > 0) - { - try - { - Utilizador u = udp.getUtilizador(utilizador); - if(u.getActivo().matches("y")) - { - if(!password.equals(u.getPassword())) - { - getSessionBean1().setMsg("Palavra-chave inválida !"); - } - else - { - //if(u.getOwner_id().intValue() == 0 ) - - //Login Ok ! - - try - { - Integer permissao = udp.getPermissionCode(u.getId()); - if(permissao.intValue() == 1) //seguranca - { - sRet = "form_seguranca"; - } - else if(permissao.intValue() == 2) // rh - { - sRet = "form_rh"; - } - else if(permissao.intValue() == 3) // hs - { - System.out.println("PERMISSAO : HS"); - sRet = "form_hs"; - } - else if(permissao.intValue() == 5) // medico - { - sRet = "form_medico"; - } - else if(permissao.intValue() == 6) // administrador de loja - { - //sRet = "loja_admin"; - } - u.setCodigo_permissao(permissao); - getSessionBean1().setCurrentUser( u ); - getSessionBean1().setLoggedIn(true); - initializeClock(); - initializeDropDownOptions(); - - // só para testes. retirar depois : - ///getSessionBean1().setModoEdicaoUtilizador("new"); - ///sRet = "create_user"; - } - catch(Exception e1) - { - e1.printStackTrace(); - getSessionBean1().setMsg("Não tem permissão para entrar na aplicação !"); - } - } - - } - else - { - getSessionBean1().setMsg("Utilizador inválido ! "); - } - } - catch(Exception ex) - { - getSessionBean1().setMsg("Utilizador inválido ! "); - } - } - else - { - getSessionBean1().setMsg("Falta palavra-chave !"); - } - } - else - { - getSessionBean1().setMsg("Falta palavra-chave !"); - } - } - else - { - getSessionBean1().setMsg("Falta utilizador !"); - } - } - else - { - getSessionBean1().setMsg("Falta utilizador !"); - } - return sRet; - } - - public String lnkPassRecovery_action() { - // TODO: Replace with your code - - return "recuperar_password"; - } - - private void connect() - { - db.Db db = new db.Db(); - try - { - Connection connection = db.connect(); - } - catch(Exception ex) - { - getSessionBean1().setMsg("Erro na ligação à Base de Dados"); - //***** terminate session - try { - getExternalContext().redirect("faces/Erro.jsp"); - } catch(Exception e) { - // . . . handle exception . . . - e.printStackTrace(); - } - ex.printStackTrace(); - } - } - - private void initializeClock() - { - com.sun.rave.web.ui.model.Option[] horasOptions = new com.sun.rave.web.ui.model.Option[24]; - for(int i=0; i < 24; i++) - { - - horasOptions[i] = new Option(new Integer(i), new Integer(i).toString()); - } - getSessionBean1().setHorasOptions(horasOptions); - - com.sun.rave.web.ui.model.Option[] minutosOptions = new com.sun.rave.web.ui.model.Option[12]; - int j = 0; - for(int i=0; i < 12; i++) - { - - minutosOptions[i] = new Option(new Integer(j), new Integer(j).toString()); - j += 5; - } - getSessionBean1().setMinutosOptions(minutosOptions); - } - - private void initializeDropDownOptions() - { - UtilizadoresDataProvider udp = new UtilizadoresDataProvider(); - try - { - getSessionBean1().setTecnicosOptions(udp.getTecnicosSaudeList()); - //drpTipo.setSelected(new Integer(0)); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - try - { - getSessionBean1().setMedicosOptions(udp.getMedicosList()); - //drpTipo.setSelected(new Integer(0)); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - } -} - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Medico.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Medico.java deleted file mode 100644 index 257089e6..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Medico.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Medico.java - * - * Created on October 12, 2007, 11:00 AM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package analiseacidentestrabalho; - -/** - * - * @author lluis - */ -public class Medico { - private Integer id; - private String nome; - private String numero_cedula; - - /** Creates a new instance of Medico */ - public Medico() { - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getNome() { - return nome; - } - - public void setNome(String nome) { - this.nome = nome; - } - - public String getNumero_cedula() { - return numero_cedula; - } - - public void setNumero_cedula(String numero_cedula) { - this.numero_cedula = numero_cedula; - } - - public String toString() { - return utils.Utils.unicodeToHTML(nome); - } - -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Medida.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Medida.java deleted file mode 100644 index 5fe9c763..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Medida.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Medida.java - * - * Created on October 19, 2007, 4:59 PM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package analiseacidentestrabalho; - -/** - * - * @author lluis - */ -public class Medida { - private Integer id; - private Integer analise_id; - private String medida; - - /** Creates a new instance of Medida */ - public Medida() { - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Integer getAnalise_id() { - return analise_id; - } - - public void setAnalise_id(Integer analise_id) { - this.analise_id = analise_id; - } - - public String getMedida() { - return medida; - } - - public void setMedida(String medida) { - this.medida = medida; - } - -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Permissao.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Permissao.java deleted file mode 100644 index 31b0be5b..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Permissao.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Permissao.java - * - * Created on October 25, 2007, 4:40 PM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package analiseacidentestrabalho; - -/** - * - * @author lluis - */ -public class Permissao { - private Integer id; - private Integer user_id; - private Integer codigo_permissao; - - /** Creates a new instance of Permissao */ - public Permissao() { - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Integer getUser_id() { - return user_id; - } - - public void setUser_id(Integer user_id) { - this.user_id = user_id; - } - - public Integer getCodigo_permissao() { - return codigo_permissao; - } - - public void setCodigo_permissao(Integer codigo_permissao) { - this.codigo_permissao = codigo_permissao; - } - -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Recomendacao.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Recomendacao.java deleted file mode 100644 index 85aea13e..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Recomendacao.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Recomendacao.java - * - * Created on October 16, 2007, 3:13 PM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package analiseacidentestrabalho; - -/** - * - * @author lluis - */ -public class Recomendacao { - private Integer id; - private Integer analise_id; - private String recomendacao; - - /** Creates a new instance of Recomendacao */ - public Recomendacao() { - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Integer getAnalise_id() { - return analise_id; - } - - public void setAnalise_id(Integer analise_id) { - this.analise_id = analise_id; - } - - public String getRecomendacao() { - return recomendacao; - } - - public void setRecomendacao(String recomendacao) { - this.recomendacao = recomendacao; - } - -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/RecuperarPassword.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/RecuperarPassword.java deleted file mode 100644 index deb5b682..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/RecuperarPassword.java +++ /dev/null @@ -1,525 +0,0 @@ -/* - * RecuperarPassword.java - * - * Created on September 19, 2007, 9:57 AM - * Copyright lluis - */ -package analiseacidentestrabalho; - -import com.sun.rave.web.ui.appbase.AbstractPageBean; -import com.sun.rave.web.ui.component.Body; -import com.sun.rave.web.ui.component.Button; -import com.sun.rave.web.ui.component.Form; -import com.sun.rave.web.ui.component.Head; -import com.sun.rave.web.ui.component.Html; -import com.sun.rave.web.ui.component.Link; -import com.sun.rave.web.ui.component.Page; -import com.sun.rave.web.ui.component.PanelGroup; -import com.sun.rave.web.ui.component.StaticText; -import com.sun.rave.web.ui.component.TextField; -import db.UtilizadoresDataProvider; -import java.util.Date; -import java.util.Properties; -import javax.faces.FacesException; -import javax.faces.component.html.HtmlPanelGrid; -import javax.mail.BodyPart; -import javax.mail.Message; -import javax.mail.Multipart; -import javax.mail.Session; -import javax.mail.Transport; -import javax.mail.internet.InternetAddress; -import javax.mail.internet.MimeBodyPart; -import javax.mail.internet.MimeMessage; -import javax.mail.internet.MimeMultipart; -import utils.Utils; - -/** - *

Page bean that corresponds to a similarly named JSP page. This - * class contains component definitions (and initialization code) for - * all components that you have defined on this page, as well as - * lifecycle methods and event handlers where you may add behavior - * to respond to incoming events.

- */ -public class RecuperarPassword extends AbstractPageBean { - // - private int __placeholder; - - /** - *

Automatically managed component initialization. WARNING: - * This method is automatically generated, so any user-specified code inserted - * here is subject to being replaced.

- */ - private void _init() throws Exception { - } - - private Page page1 = new Page(); - - public Page getPage1() { - return page1; - } - - public void setPage1(Page p) { - this.page1 = p; - } - - private Html html1 = new Html(); - - public Html getHtml1() { - return html1; - } - - public void setHtml1(Html h) { - this.html1 = h; - } - - private Head head1 = new Head(); - - public Head getHead1() { - return head1; - } - - public void setHead1(Head h) { - this.head1 = h; - } - - private Link link1 = new Link(); - - public Link getLink1() { - return link1; - } - - public void setLink1(Link l) { - this.link1 = l; - } - - private Body body1 = new Body(); - - public Body getBody1() { - return body1; - } - - public void setBody1(Body b) { - this.body1 = b; - } - - private Form form1 = new Form(); - - public Form getForm1() { - return form1; - } - - public void setForm1(Form f) { - this.form1 = f; - } - - private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel1() { - return gridPanel1; - } - - public void setGridPanel1(HtmlPanelGrid hpg) { - this.gridPanel1 = hpg; - } - - private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel2() { - return gridPanel2; - } - - public void setGridPanel2(HtmlPanelGrid hpg) { - this.gridPanel2 = hpg; - } - - private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel3() { - return gridPanel3; - } - - public void setGridPanel3(HtmlPanelGrid hpg) { - this.gridPanel3 = hpg; - } - - private StaticText txtMsg = new StaticText(); - - public StaticText getTxtMsg() { - return txtMsg; - } - - public void setTxtMsg(StaticText st) { - this.txtMsg = st; - } - - private StaticText staticText3 = new StaticText(); - - public StaticText getStaticText3() { - return staticText3; - } - - public void setStaticText3(StaticText st) { - this.staticText3 = st; - } - - private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel4() { - return gridPanel4; - } - - public void setGridPanel4(HtmlPanelGrid hpg) { - this.gridPanel4 = hpg; - } - - private StaticText staticText1 = new StaticText(); - - public StaticText getStaticText1() { - return staticText1; - } - - public void setStaticText1(StaticText st) { - this.staticText1 = st; - } - - private TextField txtUtilizador = new TextField(); - - public TextField getTxtUtilizador() { - return txtUtilizador; - } - - public void setTxtUtilizador(TextField tf) { - this.txtUtilizador = tf; - } - - private StaticText staticText2 = new StaticText(); - - public StaticText getStaticText2() { - return staticText2; - } - - public void setStaticText2(StaticText st) { - this.staticText2 = st; - } - - private TextField txtEmail = new TextField(); - - public TextField getTxtEmail() { - return txtEmail; - } - - public void setTxtEmail(TextField tf) { - this.txtEmail = tf; - } - - private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel5() { - return gridPanel5; - } - - public void setGridPanel5(HtmlPanelGrid hpg) { - this.gridPanel5 = hpg; - } - - private PanelGroup groupPanel1 = new PanelGroup(); - - public PanelGroup getGroupPanel1() { - return groupPanel1; - } - - public void setGroupPanel1(PanelGroup pg) { - this.groupPanel1 = pg; - } - - private Button butCancelar = new Button(); - - public Button getButCancelar() { - return butCancelar; - } - - public void setButCancelar(Button b) { - this.butCancelar = b; - } - - private Button butOk = new Button(); - - public Button getButOk() { - return butOk; - } - - public void setButOk(Button b) { - this.butOk = b; - } - - //
- - /** - *

Construct a new Page bean instance.

- */ - public RecuperarPassword() { - } - - /** - *

Callback method that is called whenever a page is navigated to, - * either directly via a URL, or indirectly via page navigation. - * Customize this method to acquire resources that will be needed - * for event handlers and lifecycle methods, whether or not this - * page is performing post back processing.

- * - *

Note that, if the current request is a postback, the property - * values of the components do not represent any - * values submitted with this request. Instead, they represent the - * property values that were saved for this view when it was rendered.

- */ - public void init() { - // Perform initializations inherited from our superclass - super.init(); - // Perform application initialization that must complete - // *before* managed components are initialized - // TODO - add your own initialiation code here - - // - // Initialize automatically managed components - // *Note* - this logic should NOT be modified - try { - _init(); - } catch (Exception e) { - log("RecuperarPassword Initialization Failure", e); - throw e instanceof FacesException ? (FacesException) e: new FacesException(e); - } - - // - // Perform application initialization that must complete - // *after* managed components are initialized - // TODO - add your own initialization code here -// if (!getSessionBean1().isLoggedIn()) { -// try { -// getExternalContext().redirect("Login.jsp"); -// } catch(Exception e) { -// // . . . handle exception . . . -// } -// } - } - - /** - *

Callback method that is called after the component tree has been - * restored, but before any event processing takes place. This method - * will only be called on a postback request that - * is processing a form submit. Customize this method to allocate - * resources that will be required in your event handlers.

- */ - public void preprocess() { - } - - /** - *

Callback method that is called just before rendering takes place. - * This method will only be called for the page that - * will actually be rendered (and not, for example, on a page that - * handled a postback and then navigated to a different page). Customize - * this method to allocate resources that will be required for rendering - * this page.

- */ - public void prerender() { - txtMsg.setText(getSessionBean1().getMsg()); - getSessionBean1().setMsg(""); - } - - /** - *

Callback method that is called after rendering is completed for - * this request, if init() was called (regardless of whether - * or not this was the page that was actually rendered). Customize this - * method to release resources acquired in the init(), - * preprocess(), or prerender() methods (or - * acquired during execution of an event handler).

- */ - public void destroy() { - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected RequestBean1 getRequestBean1() { - return (RequestBean1)getBean("RequestBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected SessionBean1 getSessionBean1() { - return (SessionBean1)getBean("SessionBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected ApplicationBean1 getApplicationBean1() { - return (ApplicationBean1)getBean("ApplicationBean1"); - } - - public String butLogin_action() { - // TODO: Process the button click action. Return value is a navigation - // case name where null will return to the same page. - - return null; - } - - public String butCancelar_action() { - // TODO: Process the button click action. Return value is a navigation - // case name where null will return to the same page. - - return "login"; - } - - public String butOk_action() { - // TODO: Process the button click action. Return value is a navigation - // case name where null will return to the same page. - - - if(fieldsValidationOk()) - { - UtilizadoresDataProvider udp = new UtilizadoresDataProvider(); - try - { - String utilizador = (String) txtUtilizador.getText(); - Utilizador u = udp.getUtilizador(utilizador); - String email = (String) txtEmail.getText(); - if(u.getEmail().equals(email)) - { - //send mail : - try - { - sendEmail(u.getEmail(), u.getLogin(), u.getPassword(), "linojose@mail.com"); - getSessionBean1().setMsg("A sua password foi enviada para o seu email"); - return "login"; - } - catch(Exception ex) - { - getSessionBean1().setMsg("Erro no envio da password !"); - } - - } - else - { - getSessionBean1().setMsg("Os dados não coincidem com os registos !"); - } - } - catch(Exception ex) - { - getSessionBean1().setMsg("Utilizador inválido !"); - } - } - - - return null; - } - - private void sendEmail(String emailTo, String login, String password, String admin_email) throws Exception - { - Properties props = new Properties(); - //props.put("mail.transport.protocol", "smtp"); - props.put("mail.smtp.host", "smtp.netcabo.pt"); - props.put("mail.from", admin_email); - Session session1 = Session.getInstance(props); - Message msg = new MimeMessage(session1); - -// try -// { - //Address Email_TO = new InternetAddress("myemail@bol.com.br"); - msg.setFrom(new InternetAddress(admin_email)); - InternetAddress[] address = {new InternetAddress(emailTo)}; - msg.setRecipients(Message.RecipientType.TO, address); - msg.setSubject("Envio da password"); - msg.setSentDate(new Date()); - Multipart multipart = new MimeMultipart(); - BodyPart msgBodyPart = new MimeBodyPart(); - String html; - html=" "; - html+=""; - html+="

Envio da password de " + login + " :

"; - html+="

Password: " + password + "

"; - html+=""; - msgBodyPart.setContent(html, "text/html"); - multipart.addBodyPart(msgBodyPart); - msg.setContent(multipart); - Transport.send(msg); - System.out.println("Email Enviado !!!! " + emailTo + ", " + login); -// } -// catch (Exception ex) -// { -// System.out.println("MAIL ERROR : " + ex.getMessage()); -// ex.printStackTrace(); -// } - - } - - private boolean fieldsValidationOk() - { - if(txtUtilizador.getText() != null) - { - String utilizador = (String) txtUtilizador.getText(); - if(utilizador.trim().length() == 0) - { - getSessionBean1().setMsg("Falta utilizador !"); - return false; - } - } - else - { - getSessionBean1().setMsg("Falta utilizador !"); - return false; - } - - if(txtEmail.getText() != null) - { - String email = (String) txtEmail.getText(); - if(email.trim().length() == 0) - { - getSessionBean1().setMsg("Falta email !"); - return false; - } - else - { - if(! Utils.isValidEmail(email)) - { - getSessionBean1().setMsg("Email inválido !"); - return false; - } - } - } - else - { - getSessionBean1().setMsg("Falta email !"); - return false; - } - - return true; - } - -// private boolean isValidEmail(String email){ -// boolean res = true; -// -// int indexOfAtChar=email.indexOf("@"); -// -// if(indexOfAtChar > 0) -// { -// int indexOfDotChar = -// email.indexOf(".",indexOfAtChar); -// if(indexOfDotChar > 0) -// { -// res = true; -// } -// else -// { -// res = false; -// } -// } -// else{ -// res = false; -// } -// return res; -// } - - -} - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/RequestBean1.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/RequestBean1.java deleted file mode 100644 index 66ece1e4..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/RequestBean1.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * RequestBean1.java - * - * Created on September 18, 2007, 3:14 PM - * Copyright lluis - */ -package analiseacidentestrabalho; - -import com.sun.rave.web.ui.appbase.AbstractRequestBean; -import javax.faces.FacesException; - -/** - *

Request scope data bean for your application. Create properties - * here to represent data that should be made available across different - * pages in the same HTTP request, so that the page bean classes do not - * have to be directly linked to each other.

- * - *

An instance of this class will be created for you automatically, - * the first time your application evaluates a value binding expression - * or method binding expression that references a managed bean using - * this class.

- */ -public class RequestBean1 extends AbstractRequestBean { - // - private int __placeholder; - - /** - *

Automatically managed component initialization. WARNING: - * This method is automatically generated, so any user-specified code inserted - * here is subject to being replaced.

- */ - private void _init() throws Exception { - } - //
- - /** - *

Construct a new request data bean instance.

- */ - public RequestBean1() { - } - - /** - *

This method is called when this bean is initially added to - * request scope. Typically, this occurs as a result of evaluating - * a value binding or method binding expression, which utilizes the - * managed bean facility to instantiate this bean and store it into - * request scope.

- * - *

You may customize this method to allocate resources that are required - * for the lifetime of the current request.

- */ - public void init() { - // Perform initializations inherited from our superclass - super.init(); - // Perform application initialization that must complete - // *before* managed components are initialized - // TODO - add your own initialiation code here - - // - // Initialize automatically managed components - // *Note* - this logic should NOT be modified - try { - _init(); - } catch (Exception e) { - log("RequestBean1 Initialization Failure", e); - throw e instanceof FacesException ? (FacesException) e: new FacesException(e); - } - - // - // Perform application initialization that must complete - // *after* managed components are initialized - // TODO - add your own initialization code here - } - - /** - *

This method is called when this bean is removed from - * request scope. This occurs automatically when the corresponding - * HTTP response has been completed and sent to the client.

- * - *

You may customize this method to clean up resources allocated - * during the execution of the init() method, or - * at any later time during the lifetime of the request.

- */ - public void destroy() { - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected SessionBean1 getSessionBean1() { - return (SessionBean1)getBean("SessionBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected ApplicationBean1 getApplicationBean1() { - return (ApplicationBean1)getBean("ApplicationBean1"); - } -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/SessionBean1.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/SessionBean1.java deleted file mode 100644 index d1a90ab0..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/SessionBean1.java +++ /dev/null @@ -1,459 +0,0 @@ -/* - * SessionBean1.java - * - * Created on September 18, 2007, 3:14 PM - * Copyright lluis - */ -package analiseacidentestrabalho; - -import com.sun.rave.web.ui.appbase.AbstractSessionBean; -import javax.faces.FacesException; -import pagestate.AnaliseAcidenteTrabalhoState; - -/** - *

Session scope data bean for your application. Create properties - * here to represent cached data that should be made available across - * multiple HTTP requests for an individual user.

- * - *

An instance of this class will be created for you automatically, - * the first time your application evaluates a value binding expression - * or method binding expression that references a managed bean using - * this class.

- */ -public class SessionBean1 extends AbstractSessionBean { - // - private int __placeholder; - - /** - *

Automatically managed component initialization. WARNING: - * This method is automatically generated, so any user-specified code inserted - * here is subject to being replaced.

- */ - private void _init() throws Exception { - } - //
- - /** - *

Construct a new session data bean instance.

- */ - public SessionBean1() { - msg = new String(""); - currentUser = new Utilizador(); - analisesActualDataProvider = new db.AnalisesActualDataProvider(); - analisesSeguimentoDataProvider = new db.AnalisesSeguimentoDataProvider(); - analisesConcluidasDataProvider = new db.AnalisesConcluidasDataProvider(); - trabalhadoresListDataProvider = new db.TrabalhadoresListDataProvider(); - - setNavFrom(""); - setAcidentado(null); - setCurrentAnalise(null); - setLoggedIn(false); - - modoEdicaoUtilizador = ""; - setIdSequence(1); - } - - /** - *

This method is called when this bean is initially added to - * session scope. Typically, this occurs as a result of evaluating - * a value binding or method binding expression, which utilizes the - * managed bean facility to instantiate this bean and store it into - * session scope.

- * - *

You may customize this method to initialize and cache data values - * or resources that are required for the lifetime of a particular - * user session.

- */ - public void init() { - // Perform initializations inherited from our superclass - super.init(); - // Perform application initialization that must complete - // *before* managed components are initialized - // TODO - add your own initialiation code here - - // - // Initialize automatically managed components - // *Note* - this logic should NOT be modified - try { - _init(); - } catch (Exception e) { - log("SessionBean1 Initialization Failure", e); - throw e instanceof FacesException ? (FacesException) e: new FacesException(e); - } - - // - // Perform application initialization that must complete - // *after* managed components are initialized - // TODO - add your own initialization code here - } - - /** - *

This method is called when the session containing it is about to be - * passivated. Typically, this occurs in a distributed servlet container - * when the session is about to be transferred to a different - * container instance, after which the activate() method - * will be called to indicate that the transfer is complete.

- * - *

You may customize this method to release references to session data - * or resources that can not be serialized with the session itself.

- */ - public void passivate() { - } - - /** - *

This method is called when the session containing it was - * reactivated.

- * - *

You may customize this method to reacquire references to session - * data or resources that could not be serialized with the - * session itself.

- */ - public void activate() { - } - - /** - *

This method is called when this bean is removed from - * session scope. Typically, this occurs as a result of - * the session timing out or being terminated by the application.

- * - *

You may customize this method to clean up resources allocated - * during the execution of the init() method, or - * at any later time during the lifetime of the application.

- */ - public void destroy() { - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected ApplicationBean1 getApplicationBean1() { - return (ApplicationBean1)getBean("ApplicationBean1"); - } - - private String msg; - - public String getMsg() { - return msg; - } - - public void setMsg(String msg) { - this.msg = msg; - } - - private Utilizador currentUser; - - public Utilizador getCurrentUser() { - return currentUser; - } - - public void setCurrentUser(Utilizador currentUser) { - this.currentUser = currentUser; - } - - private db.AnalisesActualDataProvider analisesActualDataProvider; - private db.AnalisesSeguimentoDataProvider analisesSeguimentoDataProvider; - private db.AnalisesConcluidasDataProvider analisesConcluidasDataProvider; - private db.TrabalhadoresListDataProvider trabalhadoresListDataProvider; - - public db.AnalisesActualDataProvider getAnalisesActualDataProvider() { - return analisesActualDataProvider; - } - - public void setAnalisesActualDataProvider(db.AnalisesActualDataProvider analisesActualDataProvider) { - this.analisesActualDataProvider = analisesActualDataProvider; - } - - public db.AnalisesSeguimentoDataProvider getAnalisesSeguimentoDataProvider() { - return analisesSeguimentoDataProvider; - } - - public void setAnalisesSeguimentoDataProvider(db.AnalisesSeguimentoDataProvider analisesSeguimentoDataProvider) { - this.analisesSeguimentoDataProvider = analisesSeguimentoDataProvider; - } - - public db.AnalisesConcluidasDataProvider getAnalisesConcluidasDataProvider() { - return analisesConcluidasDataProvider; - } - - public void setAnalisesConcluidasDataProvider(db.AnalisesConcluidasDataProvider analisesConcluidasDataProvider) { - this.analisesConcluidasDataProvider = analisesConcluidasDataProvider; - } - - public db.TrabalhadoresListDataProvider getTrabalhadoresListDataProvider() { - return trabalhadoresListDataProvider; - } - - public void setTrabalhadoresListDataProvider(db.TrabalhadoresListDataProvider trabalhadoresListDataProvider) { - this.trabalhadoresListDataProvider = trabalhadoresListDataProvider; - } - - private com.sun.rave.web.ui.model.Option[] anoOptions; - - private Integer anoChoice; - - public Integer getAnoChoice() { - return anoChoice; - } - - public void setAnoChoice(Integer anoChoice) { - this.anoChoice = anoChoice; - } - - public com.sun.rave.web.ui.model.Option[] getAnoOptions() { - return anoOptions; - } - - public void setAnoOptions(com.sun.rave.web.ui.model.Option[] anoOptions) { - this.anoOptions = anoOptions; - } - - private com.sun.rave.web.ui.model.Option[] mesOptions; - - private Integer mesChoice; - - public Integer getMesChoice() { - return mesChoice; - } - - public void setMesChoice(Integer mesChoice) { - this.mesChoice = mesChoice; - } - - public com.sun.rave.web.ui.model.Option[] getMesOptions() { - return mesOptions; - } - - public void setMesOptions(com.sun.rave.web.ui.model.Option[] mesOptions) { - this.mesOptions = mesOptions; - } - - private com.sun.rave.web.ui.model.Option[] diaOptions; - - private Integer diaChoice; - - public Integer getDiaChoice() { - return diaChoice; - } - - public void setDiaChoice(Integer diaChoice) { - this.diaChoice = diaChoice; - } - - public com.sun.rave.web.ui.model.Option[] getDiaOptions() { - return diaOptions; - } - - public void setDiaOptions(com.sun.rave.web.ui.model.Option[] diaOptions) { - this.diaOptions = diaOptions; - } - - private String imageName; - - public String getImageName() { - return imageName; - } - - public void setImageName(String imageName) { - this.imageName = imageName; - } - - private String navFrom; - - public String getNavFrom() { - return navFrom; - } - - public void setNavFrom(String navFrom) { - this.navFrom = navFrom; - } - - private Acidentado acidentado; - - public Acidentado getAcidentado() { - return acidentado; - } - - public void setAcidentado(Acidentado acidentado) { - this.acidentado = acidentado; - } - - private AnaliseAcidenteTrabalhoState analise_acidente_trabalho_state; - - public AnaliseAcidenteTrabalhoState getAnalise_acidente_trabalho_state() { - return analise_acidente_trabalho_state; - } - - public void setAnalise_acidente_trabalho_state(AnaliseAcidenteTrabalhoState analise_acidente_trabalho_state) { - this.analise_acidente_trabalho_state = analise_acidente_trabalho_state; - } - - private AnaliseAcidente currentAnalise; - - public AnaliseAcidente getCurrentAnalise() { - return currentAnalise; - } - - public void setCurrentAnalise(AnaliseAcidente currentAnalise) { - this.currentAnalise = currentAnalise; - } - - private boolean loggedIn; - - public boolean isLoggedIn() - { - return loggedIn; - } - - public void setLoggedIn(boolean loggedIn) - { - this.loggedIn = loggedIn; - } - - private String modoEdicaoUtilizador; - - public String getModoEdicaoUtilizador() { - return modoEdicaoUtilizador; - } - - public void setModoEdicaoUtilizador(String modoEdicaoUtilizador) { - this.modoEdicaoUtilizador = modoEdicaoUtilizador; - } - - private Integer tipoChoice; - - public Integer getTipoChoice() { - return tipoChoice; - } - - public void setTipoChoice(Integer tipoChoice) { - this.tipoChoice = tipoChoice; - } - - private com.sun.rave.web.ui.model.Option[] tiposOptions; - - public com.sun.rave.web.ui.model.Option[] getTiposOptions() { - return tiposOptions; - } - - public void setTiposOptions(com.sun.rave.web.ui.model.Option[] tiposOptions) { - this.tiposOptions = tiposOptions; - } - - - private Integer estabelecimentoChoice; - - public Integer getEstabelecimentoChoice() { - return estabelecimentoChoice; - } - - public void setEstabelecimentoChoice(Integer estabelecimentoChoice) { - this.estabelecimentoChoice = estabelecimentoChoice; - } - - private com.sun.rave.web.ui.model.Option[] estabelecimentosOptions; - - public com.sun.rave.web.ui.model.Option[] getEstabelecimentosOptions() { - return estabelecimentosOptions; - } - - public void setEstabelecimentosOptions(com.sun.rave.web.ui.model.Option[] estabelecimentosOptions) { - this.estabelecimentosOptions = estabelecimentosOptions; - } - - - private Integer tecnicoChoice; - - public Integer getTecnicoChoice() { - return tecnicoChoice; - } - - public void setTecnicoChoice(Integer tecnicoChoice) { - this.tecnicoChoice = tecnicoChoice; - } - - private com.sun.rave.web.ui.model.Option[] tecnicosOptions; - - public com.sun.rave.web.ui.model.Option[] getTecnicosOptions() { - return tecnicosOptions; - } - - public void setTecnicosOptions(com.sun.rave.web.ui.model.Option[] tecnicosOptions) { - this.tecnicosOptions = tecnicosOptions; - } - - - private Integer medicoChoice; - - public Integer getMedicoChoice() { - return medicoChoice; - } - - public void setMedicoChoice(Integer medicoChoice) { - this.medicoChoice = medicoChoice; - } - - private com.sun.rave.web.ui.model.Option[] medicosOptions; - - public com.sun.rave.web.ui.model.Option[] getMedicosOptions() { - return medicosOptions; - } - - public void setMedicosOptions(com.sun.rave.web.ui.model.Option[] medicosOptions) { - this.medicosOptions = medicosOptions; - } - - - // Clock : - private Integer horaChoice; - - public Integer getHoraChoice() { - return horaChoice; - } - - public void setHoraChoice(Integer horaChoice) { - this.horaChoice = horaChoice; - } - - private com.sun.rave.web.ui.model.Option[] horasOptions; - - public com.sun.rave.web.ui.model.Option[] getHorasOptions() { - return horasOptions; - } - - public void setHorasOptions(com.sun.rave.web.ui.model.Option[] horasOptions) { - this.horasOptions = horasOptions; - } - - - private Integer minutoChoice; - - public Integer getMinutoChoice() { - return minutoChoice; - } - - public void setMinutoChoice(Integer minutoChoice) { - this.minutoChoice = minutoChoice; - } - - private com.sun.rave.web.ui.model.Option[] minutosOptions; - - public com.sun.rave.web.ui.model.Option[] getMinutosOptions() { - return minutosOptions; - } - - public void setMinutosOptions(com.sun.rave.web.ui.model.Option[] minutosOptions) { - this.minutosOptions = minutosOptions; - } - - - private int idSequence; - - public int getIdSequence() { - return idSequence; - } - - public void setIdSequence(int idSequence) { - this.idSequence = idSequence; - } - -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/TecnicoSaude.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/TecnicoSaude.java deleted file mode 100644 index 7980ae83..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/TecnicoSaude.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * TecnicoSaude.java - * - * Created on October 12, 2007, 11:00 AM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package analiseacidentestrabalho; - -/** - * - * @author lluis - */ -public class TecnicoSaude { - private Integer id; - private String nome; - - /** Creates a new instance of TecnicoSaude */ - public TecnicoSaude() { - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getNome() { - return nome; - } - - public void setNome(String nome) { - this.nome = nome; - } - - public String toString() { - return utils.Utils.unicodeToHTML(nome); - } - -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/TipoUtilizador.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/TipoUtilizador.java deleted file mode 100644 index 749160c9..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/TipoUtilizador.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * TipoUtilizador.java - * - * Created on October 11, 2007, 4:32 PM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package analiseacidentestrabalho; - -/** - * - * @author lluis - */ -public class TipoUtilizador { - private Integer id; - private Integer tipo; - private String descricao; - private String activo; - private Integer ordem; - - /** Creates a new instance of TipoUtilizador */ - public TipoUtilizador() { - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Integer getTipo() { - return tipo; - } - - public void setTipo(Integer tipo) { - this.tipo = tipo; - } - - public String getDescricao() { - return descricao; - } - - public void setDescricao(String descricao) { - this.descricao = descricao; - } - - public String getActivo() { - return activo; - } - - public void setActivo(String activo) { - this.activo = activo; - } - - public Integer getOrdem() { - return ordem; - } - - public void setOrdem(Integer ordem) { - this.ordem = ordem; - } - -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Top.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Top.java deleted file mode 100644 index d183ddf6..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Top.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Top.java - * - * Created on September 20, 2007, 11:04 AM - * Copyright lluis - */ -package analiseacidentestrabalho; - -import com.sun.rave.web.ui.appbase.AbstractFragmentBean; -import com.sun.rave.web.ui.component.Hyperlink; -import com.sun.rave.web.ui.component.ImageComponent; -import com.sun.rave.web.ui.component.PanelGroup; -import com.sun.rave.web.ui.component.StaticText; -import javax.faces.FacesException; -import javax.faces.component.html.HtmlPanelGrid; - -/** - *

Fragment bean that corresponds to a similarly named JSP page - * fragment. This class contains component definitions (and initialization - * code) for all components that you have defined on this fragment, as well as - * lifecycle methods and event handlers where you may add behavior - * to respond to incoming events.

- */ -public class Top extends AbstractFragmentBean { - // - private int __placeholder; - - /** - *

Automatically managed component initialization. WARNING: - * This method is automatically generated, so any user-specified code inserted - * here is subject to being replaced.

- */ - private void _init() throws Exception { - } - - private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel1() { - return gridPanel1; - } - - public void setGridPanel1(HtmlPanelGrid hpg) { - this.gridPanel1 = hpg; - } - - private PanelGroup groupPanel1 = new PanelGroup(); - - public PanelGroup getGroupPanel1() { - return groupPanel1; - } - - public void setGroupPanel1(PanelGroup pg) { - this.groupPanel1 = pg; - } - - private ImageComponent image1 = new ImageComponent(); - - public ImageComponent getImage1() { - return image1; - } - - public void setImage1(ImageComponent ic) { - this.image1 = ic; - } - - private ImageComponent image2 = new ImageComponent(); - - public ImageComponent getImage2() { - return image2; - } - - public void setImage2(ImageComponent ic) { - this.image2 = ic; - } - - private PanelGroup groupPanel2 = new PanelGroup(); - - public PanelGroup getGroupPanel2() { - return groupPanel2; - } - - public void setGroupPanel2(PanelGroup pg) { - this.groupPanel2 = pg; - } - - private StaticText lblUser = new StaticText(); - - public StaticText getLblUser() { - return lblUser; - } - - public void setLblUser(StaticText st) { - this.lblUser = st; - } - - private StaticText staticText2 = new StaticText(); - - public StaticText getStaticText2() { - return staticText2; - } - - public void setStaticText2(StaticText st) { - this.staticText2 = st; - } - - private Hyperlink lnkChangePassword = new Hyperlink(); - - public Hyperlink getLnkChangePassword() { - return lnkChangePassword; - } - - public void setLnkChangePassword(Hyperlink h) { - this.lnkChangePassword = h; - } - - private StaticText staticText3 = new StaticText(); - - public StaticText getStaticText3() { - return staticText3; - } - - public void setStaticText3(StaticText st) { - this.staticText3 = st; - } - - private Hyperlink lnkLogout = new Hyperlink(); - - public Hyperlink getLnkLogout() { - return lnkLogout; - } - - public void setLnkLogout(Hyperlink h) { - this.lnkLogout = h; - } - //
- - public Top() { - } - - /** - *

Callback method that is called whenever a page containing - * this page fragment is navigated to, either directly via a URL, - * or indirectly via page navigation. Override this method to acquire - * resources that will be needed for event handlers and lifecycle methods.

- * - *

The default implementation does nothing.

- */ - public void init() { - // Perform initializations inherited from our superclass - super.init(); - // Perform application initialization that must complete - // *before* managed components are initialized - // TODO - add your own initialiation code here - - - // - // Initialize automatically managed components - // *Note* - this logic should NOT be modified - try { - _init(); - } catch (Exception e) { - log("Page1 Initialization Failure", e); - throw e instanceof FacesException ? (FacesException) e: new FacesException(e); - } - - // - // Perform application initialization that must complete - // *after* managed components are initialized - // TODO - add your own initialization code here - } - - /** - *

Callback method that is called after rendering is completed for - * this request, if init() was called. Override this - * method to release resources acquired in the init() - * resources that will be needed for event handlers and lifecycle methods.

- * - *

The default implementation does nothing.

- */ - public void destroy() { - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected ApplicationBean1 getApplicationBean1() { - return (ApplicationBean1)getBean("ApplicationBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected RequestBean1 getRequestBean1() { - return (RequestBean1)getBean("RequestBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected SessionBean1 getSessionBean1() { - return (SessionBean1)getBean("SessionBean1"); - } -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Trabalhador.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Trabalhador.java deleted file mode 100644 index 407b593e..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Trabalhador.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Trabalhador.java - * - * Created on September 26, 2007, 4:23 PM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package analiseacidentestrabalho; - -/** - * - * @author lluis - */ -public class Trabalhador { - private Integer id; - private String nome; - private java.sql.Date data_nascimento; - private String funcao; - private java.sql.Date data_admissao; - private String numero_mecanografico; - - - /** Creates a new instance of Trabalhador */ - public Trabalhador() { - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getNome() { - return nome; - } - - public void setNome(String nome) { - this.nome = nome; - } - - public java.sql.Date getData_nascimento() { - return data_nascimento; - } - - public void setData_nascimento(java.sql.Date data_nascimento) { - this.data_nascimento = data_nascimento; - } - - public String getFuncao() { - return funcao; - } - - public void setFuncao(String funcao) { - this.funcao = funcao; - } - - public java.sql.Date getData_admissao() { - return data_admissao; - } - - public void setData_admissao(java.sql.Date data_admissao) { - this.data_admissao = data_admissao; - } - - public String getNumero_mecanografico() { - return numero_mecanografico; - } - - public void setNumero_mecanografico(String numero_mecanografico) { - this.numero_mecanografico = numero_mecanografico; - } - -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Utilizador.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Utilizador.java deleted file mode 100644 index c79482e6..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Utilizador.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Utilizador.java - * - * Created on September 20, 2007, 9:58 AM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package analiseacidentestrabalho; - -/** - * - * @author lluis - */ -public class Utilizador { - private Integer id; - private String login; - private String password; - private String email; - private Integer empresa_id; - private Integer estabelecimento_id; - private String administrador; - private Integer tipo; - private String numero_cedula; - private String cap; - - private Integer codigo_permissao; - - private String nome; - - private Integer medico_id; - private Integer funcionario_hst_id; - - private String activo; - - /** Creates a new instance of Utilizador */ - public Utilizador() { - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getLogin() { - return login; - } - - public void setLogin(String login) { - this.login = login; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public Integer getEmpresa_id() { - return empresa_id; - } - - public void setEmpresa_id(Integer empresa_id) { - this.empresa_id = empresa_id; - } - - public Integer getEstabelecimento_id() { - return estabelecimento_id; - } - - public void setEstabelecimento_id(Integer estabelecimento_id) { - this.estabelecimento_id = estabelecimento_id; - } - - public String getAdministrador() { - return administrador; - } - - public void setAdministrador(String administrador) { - this.administrador = administrador; - } - - public Integer getCodigo_permissao() { - return codigo_permissao; - } - - public void setCodigo_permissao(Integer codigo_permissao) { - this.codigo_permissao = codigo_permissao; - } - - public Integer getTipo() { - return tipo; - } - - public void setTipo(Integer tipo) { - this.tipo = tipo; - } - - public String getNumero_cedula() { - return numero_cedula; - } - - public void setNumero_cedula(String numero_cedula) { - this.numero_cedula = numero_cedula; - } - - public String getCap() { - return cap; - } - - public void setCap(String cap) { - this.cap = cap; - } - - public String getNome() { - return nome; - } - - public void setNome(String nome) { - this.nome = nome; - } - - public Integer getMedico_id() { - return medico_id; - } - - public void setMedico_id(Integer medico_id) { - this.medico_id = medico_id; - } - - public Integer getFuncionario_hst_id() { - return funcionario_hst_id; - } - - public void setFuncionario_hst_id(Integer funcionario_hst_id) { - this.funcionario_hst_id = funcionario_hst_id; - } - - public String getActivo() { - return activo; - } - - public void setActivo(String activo) { - this.activo = activo; - } - -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/ViewAnaliseAcidenteTrabalho.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/ViewAnaliseAcidenteTrabalho.java deleted file mode 100644 index ba65604d..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/ViewAnaliseAcidenteTrabalho.java +++ /dev/null @@ -1,2984 +0,0 @@ -/* - * ViewAnaliseAcidenteTrabalho.java - * - * Created on October 1, 2007, 10:48 AM - * Copyright lluis - */ -package analiseacidentestrabalho; - -import com.sun.rave.web.ui.appbase.AbstractPageBean; -import com.sun.rave.web.ui.component.Body; -import com.sun.rave.web.ui.component.Button; -import com.sun.rave.web.ui.component.Form; -import com.sun.rave.web.ui.component.Head; -import com.sun.rave.web.ui.component.Html; -import com.sun.rave.web.ui.component.Hyperlink; -import com.sun.rave.web.ui.component.ImageComponent; -import com.sun.rave.web.ui.component.Link; -import com.sun.rave.web.ui.component.Page; -import com.sun.rave.web.ui.component.PanelGroup; -import com.sun.rave.web.ui.component.StaticText; -import db.AnalisesDataProvider; -import db.UtilizadoresDataProvider; -import java.io.File; -import java.util.ArrayList; -import java.util.ListIterator; -import javax.faces.FacesException; -import javax.faces.component.html.HtmlPanelGrid; -import javax.servlet.ServletContext; -import utils.Utils; - -/** - *

Page bean that corresponds to a similarly named JSP page. This - * class contains component definitions (and initialization code) for - * all components that you have defined on this page, as well as - * lifecycle methods and event handlers where you may add behavior - * to respond to incoming events.

- */ -public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean { - // - private int __placeholder; - - /** - *

Automatically managed component initialization. WARNING: - * This method is automatically generated, so any user-specified code inserted - * here is subject to being replaced.

- */ - private void _init() throws Exception { - } - - private Page page1 = new Page(); - - public Page getPage1() { - return page1; - } - - public void setPage1(Page p) { - this.page1 = p; - } - - private Html html1 = new Html(); - - public Html getHtml1() { - return html1; - } - - public void setHtml1(Html h) { - this.html1 = h; - } - - private Head head1 = new Head(); - - public Head getHead1() { - return head1; - } - - public void setHead1(Head h) { - this.head1 = h; - } - - private Link link1 = new Link(); - - public Link getLink1() { - return link1; - } - - public void setLink1(Link l) { - this.link1 = l; - } - - private Body body1 = new Body(); - - public Body getBody1() { - return body1; - } - - public void setBody1(Body b) { - this.body1 = b; - } - - private Form form1 = new Form(); - - public Form getForm1() { - return form1; - } - - public void setForm1(Form f) { - this.form1 = f; - } - - private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridBase1() { - return gridBase1; - } - - public void setGridBase1(HtmlPanelGrid hpg) { - this.gridBase1 = hpg; - } - - private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridLayout1() { - return gridLayout1; - } - - public void setGridLayout1(HtmlPanelGrid hpg) { - this.gridLayout1 = hpg; - } - - private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel1() { - return gridPanel1; - } - - public void setGridPanel1(HtmlPanelGrid hpg) { - this.gridPanel1 = hpg; - } - - private PanelGroup groupPanel1 = new PanelGroup(); - - public PanelGroup getGroupPanel1() { - return groupPanel1; - } - - public void setGroupPanel1(PanelGroup pg) { - this.groupPanel1 = pg; - } - - private ImageComponent image1 = new ImageComponent(); - - public ImageComponent getImage1() { - return image1; - } - - public void setImage1(ImageComponent ic) { - this.image1 = ic; - } - - private ImageComponent image2 = new ImageComponent(); - - public ImageComponent getImage2() { - return image2; - } - - public void setImage2(ImageComponent ic) { - this.image2 = ic; - } - - private PanelGroup groupPanel2 = new PanelGroup(); - - public PanelGroup getGroupPanel2() { - return groupPanel2; - } - - public void setGroupPanel2(PanelGroup pg) { - this.groupPanel2 = pg; - } - - private StaticText lblUser = new StaticText(); - - public StaticText getLblUser() { - return lblUser; - } - - public void setLblUser(StaticText st) { - this.lblUser = st; - } - - private StaticText staticText1 = new StaticText(); - - public StaticText getStaticText1() { - return staticText1; - } - - public void setStaticText1(StaticText st) { - this.staticText1 = st; - } - - private Hyperlink lnkEditUser = new Hyperlink(); - - public Hyperlink getLnkEditUser() { - return lnkEditUser; - } - - public void setLnkEditUser(Hyperlink h) { - this.lnkEditUser = h; - } - - private StaticText staticText2 = new StaticText(); - - public StaticText getStaticText2() { - return staticText2; - } - - public void setStaticText2(StaticText st) { - this.staticText2 = st; - } - - private Hyperlink lnkLogout1 = new Hyperlink(); - - public Hyperlink getLnkLogout1() { - return lnkLogout1; - } - - public void setLnkLogout1(Hyperlink h) { - this.lnkLogout1 = h; - } - - private HtmlPanelGrid gridMsg1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridMsg1() { - return gridMsg1; - } - - public void setGridMsg1(HtmlPanelGrid hpg) { - this.gridMsg1 = hpg; - } - - private StaticText txtMsg1 = new StaticText(); - - public StaticText getTxtMsg1() { - return txtMsg1; - } - - public void setTxtMsg1(StaticText st) { - this.txtMsg1 = st; - } - - private HtmlPanelGrid gridCabecalho1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridCabecalho1() { - return gridCabecalho1; - } - - public void setGridCabecalho1(HtmlPanelGrid hpg) { - this.gridCabecalho1 = hpg; - } - - private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel2() { - return gridPanel2; - } - - public void setGridPanel2(HtmlPanelGrid hpg) { - this.gridPanel2 = hpg; - } - - private StaticText lblEmpresa1 = new StaticText(); - - public StaticText getLblEmpresa1() { - return lblEmpresa1; - } - - public void setLblEmpresa1(StaticText st) { - this.lblEmpresa1 = st; - } - - private StaticText txtEmpresa = new StaticText(); - - public StaticText getTxtEmpresa() { - return txtEmpresa; - } - - public void setTxtEmpresa(StaticText st) { - this.txtEmpresa = st; - } - - private StaticText staticText4 = new StaticText(); - - public StaticText getStaticText4() { - return staticText4; - } - - public void setStaticText4(StaticText st) { - this.staticText4 = st; - } - - private StaticText txtEstabelecimento = new StaticText(); - - public StaticText getTxtEstabelecimento() { - return txtEstabelecimento; - } - - public void setTxtEstabelecimento(StaticText st) { - this.txtEstabelecimento = st; - } - - private StaticText lblTrabalhador1 = new StaticText(); - - public StaticText getLblTrabalhador1() { - return lblTrabalhador1; - } - - public void setLblTrabalhador1(StaticText st) { - this.lblTrabalhador1 = st; - } - - private StaticText txtTrabalhador = new StaticText(); - - public StaticText getTxtTrabalhador() { - return txtTrabalhador; - } - - public void setTxtTrabalhador(StaticText st) { - this.txtTrabalhador = st; - } - - private HtmlPanelGrid gridSiprp1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridSiprp1() { - return gridSiprp1; - } - - public void setGridSiprp1(HtmlPanelGrid hpg) { - this.gridSiprp1 = hpg; - } - - private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel5() { - return gridPanel5; - } - - public void setGridPanel5(HtmlPanelGrid hpg) { - this.gridPanel5 = hpg; - } - - private StaticText staticText6 = new StaticText(); - - public StaticText getStaticText6() { - return staticText6; - } - - public void setStaticText6(StaticText st) { - this.staticText6 = st; - } - - private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel6() { - return gridPanel6; - } - - public void setGridPanel6(HtmlPanelGrid hpg) { - this.gridPanel6 = hpg; - } - - private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel7() { - return gridPanel7; - } - - public void setGridPanel7(HtmlPanelGrid hpg) { - this.gridPanel7 = hpg; - } - - private StaticText staticText7 = new StaticText(); - - public StaticText getStaticText7() { - return staticText7; - } - - public void setStaticText7(StaticText st) { - this.staticText7 = st; - } - - private StaticText staticText8 = new StaticText(); - - public StaticText getStaticText8() { - return staticText8; - } - - public void setStaticText8(StaticText st) { - this.staticText8 = st; - } - - private StaticText staticText9 = new StaticText(); - - public StaticText getStaticText9() { - return staticText9; - } - - public void setStaticText9(StaticText st) { - this.staticText9 = st; - } - - private PanelGroup groupPanel3 = new PanelGroup(); - - public PanelGroup getGroupPanel3() { - return groupPanel3; - } - - public void setGroupPanel3(PanelGroup pg) { - this.groupPanel3 = pg; - } - - private StaticText staticText10 = new StaticText(); - - public StaticText getStaticText10() { - return staticText10; - } - - public void setStaticText10(StaticText st) { - this.staticText10 = st; - } - - private StaticText txtCap1 = new StaticText(); - - public StaticText getTxtCap1() { - return txtCap1; - } - - public void setTxtCap1(StaticText st) { - this.txtCap1 = st; - } - - private StaticText staticText11 = new StaticText(); - - public StaticText getStaticText11() { - return staticText11; - } - - public void setStaticText11(StaticText st) { - this.staticText11 = st; - } - - private PanelGroup groupPanel4 = new PanelGroup(); - - public PanelGroup getGroupPanel4() { - return groupPanel4; - } - - public void setGroupPanel4(PanelGroup pg) { - this.groupPanel4 = pg; - } - - private StaticText staticText12 = new StaticText(); - - public StaticText getStaticText12() { - return staticText12; - } - - public void setStaticText12(StaticText st) { - this.staticText12 = st; - } - - private StaticText txtCedula1 = new StaticText(); - - public StaticText getTxtCedula1() { - return txtCedula1; - } - - public void setTxtCedula1(StaticText st) { - this.txtCedula1 = st; - } - - private HtmlPanelGrid gridAcidentado1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridAcidentado1() { - return gridAcidentado1; - } - - public void setGridAcidentado1(HtmlPanelGrid hpg) { - this.gridAcidentado1 = hpg; - } - - private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel8() { - return gridPanel8; - } - - public void setGridPanel8(HtmlPanelGrid hpg) { - this.gridPanel8 = hpg; - } - - private StaticText staticText13 = new StaticText(); - - public StaticText getStaticText13() { - return staticText13; - } - - public void setStaticText13(StaticText st) { - this.staticText13 = st; - } - - private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel9() { - return gridPanel9; - } - - public void setGridPanel9(HtmlPanelGrid hpg) { - this.gridPanel9 = hpg; - } - - private HtmlPanelGrid gridPanel10 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel10() { - return gridPanel10; - } - - public void setGridPanel10(HtmlPanelGrid hpg) { - this.gridPanel10 = hpg; - } - - private StaticText staticText16 = new StaticText(); - - public StaticText getStaticText16() { - return staticText16; - } - - public void setStaticText16(StaticText st) { - this.staticText16 = st; - } - - private StaticText staticText17 = new StaticText(); - - public StaticText getStaticText17() { - return staticText17; - } - - public void setStaticText17(StaticText st) { - this.staticText17 = st; - } - - private StaticText staticText18 = new StaticText(); - - public StaticText getStaticText18() { - return staticText18; - } - - public void setStaticText18(StaticText st) { - this.staticText18 = st; - } - - private HtmlPanelGrid gridPanel11 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel11() { - return gridPanel11; - } - - public void setGridPanel11(HtmlPanelGrid hpg) { - this.gridPanel11 = hpg; - } - - private StaticText staticText19 = new StaticText(); - - public StaticText getStaticText19() { - return staticText19; - } - - public void setStaticText19(StaticText st) { - this.staticText19 = st; - } - - private HtmlPanelGrid gridPanel12 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel12() { - return gridPanel12; - } - - public void setGridPanel12(HtmlPanelGrid hpg) { - this.gridPanel12 = hpg; - } - - private StaticText staticText20 = new StaticText(); - - public StaticText getStaticText20() { - return staticText20; - } - - public void setStaticText20(StaticText st) { - this.staticText20 = st; - } - - private HtmlPanelGrid gridPanel13 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel13() { - return gridPanel13; - } - - public void setGridPanel13(HtmlPanelGrid hpg) { - this.gridPanel13 = hpg; - } - - private StaticText staticText21 = new StaticText(); - - public StaticText getStaticText21() { - return staticText21; - } - - public void setStaticText21(StaticText st) { - this.staticText21 = st; - } - - private HtmlPanelGrid gridPanel14 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel14() { - return gridPanel14; - } - - public void setGridPanel14(HtmlPanelGrid hpg) { - this.gridPanel14 = hpg; - } - - private StaticText staticText22 = new StaticText(); - - public StaticText getStaticText22() { - return staticText22; - } - - public void setStaticText22(StaticText st) { - this.staticText22 = st; - } - - private HtmlPanelGrid gridPanel15 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel15() { - return gridPanel15; - } - - public void setGridPanel15(HtmlPanelGrid hpg) { - this.gridPanel15 = hpg; - } - - private StaticText staticText23 = new StaticText(); - - public StaticText getStaticText23() { - return staticText23; - } - - public void setStaticText23(StaticText st) { - this.staticText23 = st; - } - - private HtmlPanelGrid gridPanel16 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel16() { - return gridPanel16; - } - - public void setGridPanel16(HtmlPanelGrid hpg) { - this.gridPanel16 = hpg; - } - - private StaticText staticText24 = new StaticText(); - - public StaticText getStaticText24() { - return staticText24; - } - - public void setStaticText24(StaticText st) { - this.staticText24 = st; - } - - private HtmlPanelGrid gridPanel17 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel17() { - return gridPanel17; - } - - public void setGridPanel17(HtmlPanelGrid hpg) { - this.gridPanel17 = hpg; - } - - private StaticText staticText25 = new StaticText(); - - public StaticText getStaticText25() { - return staticText25; - } - - public void setStaticText25(StaticText st) { - this.staticText25 = st; - } - - private HtmlPanelGrid gridPanel18 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel18() { - return gridPanel18; - } - - public void setGridPanel18(HtmlPanelGrid hpg) { - this.gridPanel18 = hpg; - } - - private HtmlPanelGrid gridPanel19 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel19() { - return gridPanel19; - } - - public void setGridPanel19(HtmlPanelGrid hpg) { - this.gridPanel19 = hpg; - } - - private StaticText staticText26 = new StaticText(); - - public StaticText getStaticText26() { - return staticText26; - } - - public void setStaticText26(StaticText st) { - this.staticText26 = st; - } - - private HtmlPanelGrid gridImages = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridImages() { - return gridImages; - } - - public void setGridImages(HtmlPanelGrid hpg) { - this.gridImages = hpg; - } - - private HtmlPanelGrid gridPanel20 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel20() { - return gridPanel20; - } - - public void setGridPanel20(HtmlPanelGrid hpg) { - this.gridPanel20 = hpg; - } - - private StaticText staticText27 = new StaticText(); - - public StaticText getStaticText27() { - return staticText27; - } - - public void setStaticText27(StaticText st) { - this.staticText27 = st; - } - - private HtmlPanelGrid gridPanel21 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel21() { - return gridPanel21; - } - - public void setGridPanel21(HtmlPanelGrid hpg) { - this.gridPanel21 = hpg; - } - - private StaticText staticText28 = new StaticText(); - - public StaticText getStaticText28() { - return staticText28; - } - - public void setStaticText28(StaticText st) { - this.staticText28 = st; - } - - private StaticText txtAccoes = new StaticText(); - - public StaticText getTxtAccoes() { - return txtAccoes; - } - - public void setTxtAccoes(StaticText st) { - this.txtAccoes = st; - } - - private StaticText txtConclusoes = new StaticText(); - - public StaticText getTxtConclusoes() { - return txtConclusoes; - } - - public void setTxtConclusoes(StaticText st) { - this.txtConclusoes = st; - } - - private StaticText txtDescricao = new StaticText(); - - public StaticText getTxtDescricao() { - return txtDescricao; - } - - public void setTxtDescricao(StaticText st) { - this.txtDescricao = st; - } - - private StaticText txtCausas = new StaticText(); - - public StaticText getTxtCausas() { - return txtCausas; - } - - public void setTxtCausas(StaticText st) { - this.txtCausas = st; - } - - private StaticText txtTestemunhas = new StaticText(); - - public StaticText getTxtTestemunhas() { - return txtTestemunhas; - } - - public void setTxtTestemunhas(StaticText st) { - this.txtTestemunhas = st; - } - - private StaticText txtCondicoes = new StaticText(); - - public StaticText getTxtCondicoes() { - return txtCondicoes; - } - - public void setTxtCondicoes(StaticText st) { - this.txtCondicoes = st; - } - - private StaticText txtSuperior = new StaticText(); - - public StaticText getTxtSuperior() { - return txtSuperior; - } - - public void setTxtSuperior(StaticText st) { - this.txtSuperior = st; - } - - private StaticText txtSubstancias = new StaticText(); - - public StaticText getTxtSubstancias() { - return txtSubstancias; - } - - public void setTxtSubstancias(StaticText st) { - this.txtSubstancias = st; - } - - private StaticText txtTarefa = new StaticText(); - - public StaticText getTxtTarefa() { - return txtTarefa; - } - - public void setTxtTarefa(StaticText st) { - this.txtTarefa = st; - } - - private StaticText txtHorasTurno = new StaticText(); - - public StaticText getTxtHorasTurno() { - return txtHorasTurno; - } - - public void setTxtHorasTurno(StaticText st) { - this.txtHorasTurno = st; - } - - private StaticText txtSeccao = new StaticText(); - - public StaticText getTxtSeccao() { - return txtSeccao; - } - - public void setTxtSeccao(StaticText st) { - this.txtSeccao = st; - } - - private StaticText txtLocal = new StaticText(); - - public StaticText getTxtLocal() { - return txtLocal; - } - - public void setTxtLocal(StaticText st) { - this.txtLocal = st; - } - - private StaticText txtTecnicoSuperior = new StaticText(); - - public StaticText getTxtTecnicoSuperior() { - return txtTecnicoSuperior; - } - - public void setTxtTecnicoSuperior(StaticText st) { - this.txtTecnicoSuperior = st; - } - - private StaticText txtMedicoTrabalho = new StaticText(); - - public StaticText getTxtMedicoTrabalho() { - return txtMedicoTrabalho; - } - - public void setTxtMedicoTrabalho(StaticText st) { - this.txtMedicoTrabalho = st; - } - - //
- private String IMAGE_URL = "/resources/images"; - - private final static int IMAGE_WIDTH = 48; - private final static int IMAGE_HEIGHT = 48; - - - private HtmlPanelGrid gridDadosAcidenteRhView1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridDadosAcidenteRhView1() { - return gridDadosAcidenteRhView1; - } - - public void setGridDadosAcidenteRhView1(HtmlPanelGrid hpg) { - this.gridDadosAcidenteRhView1 = hpg; - } - - private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel3() { - return gridPanel3; - } - - public void setGridPanel3(HtmlPanelGrid hpg) { - this.gridPanel3 = hpg; - } - - private StaticText staticText5 = new StaticText(); - - public StaticText getStaticText5() { - return staticText5; - } - - public void setStaticText5(StaticText st) { - this.staticText5 = st; - } - - private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel4() { - return gridPanel4; - } - - public void setGridPanel4(HtmlPanelGrid hpg) { - this.gridPanel4 = hpg; - } - - private HtmlPanelGrid gridSHST = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridSHST() { - return gridSHST; - } - - public void setGridSHST(HtmlPanelGrid hpg) { - this.gridSHST = hpg; - } - - private HtmlPanelGrid gridColaborador = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridColaborador() { - return gridColaborador; - } - - public void setGridColaborador(HtmlPanelGrid hpg) { - this.gridColaborador = hpg; - } - - private HtmlPanelGrid gridColaboradores = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridColaboradores() { - return gridColaboradores; - } - - public void setGridColaboradores(HtmlPanelGrid hpg) { - this.gridColaboradores = hpg; - } - - private HtmlPanelGrid gridRecomendacoesViewHS1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridRecomendacoesViewHS1() { - return gridRecomendacoesViewHS1; - } - - public void setGridRecomendacoesViewHS1(HtmlPanelGrid hpg) { - this.gridRecomendacoesViewHS1 = hpg; - } - - private HtmlPanelGrid gridPanel23 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel23() { - return gridPanel23; - } - - public void setGridPanel23(HtmlPanelGrid hpg) { - this.gridPanel23 = hpg; - } - - private StaticText staticText29 = new StaticText(); - - public StaticText getStaticText29() { - return staticText29; - } - - public void setStaticText29(StaticText st) { - this.staticText29 = st; - } - - private HtmlPanelGrid gridRecomendacoesView = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridRecomendacoesView() { - return gridRecomendacoesView; - } - - public void setGridRecomendacoesView(HtmlPanelGrid hpg) { - this.gridRecomendacoesView = hpg; - } - - private HtmlPanelGrid gridMedidasViewRH1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridMedidasViewRH1() { - return gridMedidasViewRH1; - } - - public void setGridMedidasViewRH1(HtmlPanelGrid hpg) { - this.gridMedidasViewRH1 = hpg; - } - - private HtmlPanelGrid gridPanel24 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel24() { - return gridPanel24; - } - - public void setGridPanel24(HtmlPanelGrid hpg) { - this.gridPanel24 = hpg; - } - - private StaticText staticText30 = new StaticText(); - - public StaticText getStaticText30() { - return staticText30; - } - - public void setStaticText30(StaticText st) { - this.staticText30 = st; - } - - private HtmlPanelGrid gridMedidasView = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridMedidasView() { - return gridMedidasView; - } - - public void setGridMedidasView(HtmlPanelGrid hpg) { - this.gridMedidasView = hpg; - } - - private HtmlPanelGrid gridMedicoView1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridMedicoView1() { - return gridMedicoView1; - } - - public void setGridMedicoView1(HtmlPanelGrid hpg) { - this.gridMedicoView1 = hpg; - } - - private HtmlPanelGrid gridPanel25 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel25() { - return gridPanel25; - } - - public void setGridPanel25(HtmlPanelGrid hpg) { - this.gridPanel25 = hpg; - } - - private StaticText staticText31 = new StaticText(); - - public StaticText getStaticText31() { - return staticText31; - } - - public void setStaticText31(StaticText st) { - this.staticText31 = st; - } - - private HtmlPanelGrid gridLesao = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridLesao() { - return gridLesao; - } - - public void setGridLesao(HtmlPanelGrid hpg) { - this.gridLesao = hpg; - } - - private StaticText staticText32 = new StaticText(); - - public StaticText getStaticText32() { - return staticText32; - } - - public void setStaticText32(StaticText st) { - this.staticText32 = st; - } - - private HtmlPanelGrid gridPanel26 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel26() { - return gridPanel26; - } - - public void setGridPanel26(HtmlPanelGrid hpg) { - this.gridPanel26 = hpg; - } - - private StaticText staticText33 = new StaticText(); - - public StaticText getStaticText33() { - return staticText33; - } - - public void setStaticText33(StaticText st) { - this.staticText33 = st; - } - - private HtmlPanelGrid gridIncapacidade = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridIncapacidade() { - return gridIncapacidade; - } - - public void setGridIncapacidade(HtmlPanelGrid hpg) { - this.gridIncapacidade = hpg; - } - - private HtmlPanelGrid gridPanel27 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel27() { - return gridPanel27; - } - - public void setGridPanel27(HtmlPanelGrid hpg) { - this.gridPanel27 = hpg; - } - - private StaticText staticText34 = new StaticText(); - - public StaticText getStaticText34() { - return staticText34; - } - - public void setStaticText34(StaticText st) { - this.staticText34 = st; - } - - private HtmlPanelGrid gridRestricoes = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridRestricoes() { - return gridRestricoes; - } - - public void setGridRestricoes(HtmlPanelGrid hpg) { - this.gridRestricoes = hpg; - } - - private HtmlPanelGrid gridPanel28 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel28() { - return gridPanel28; - } - - public void setGridPanel28(HtmlPanelGrid hpg) { - this.gridPanel28 = hpg; - } - - private HtmlPanelGrid gridImagesRestricoes = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridImagesRestricoes() { - return gridImagesRestricoes; - } - - public void setGridImagesRestricoes(HtmlPanelGrid hpg) { - this.gridImagesRestricoes = hpg; - } - - private HtmlPanelGrid gridOutrasRestricoes = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridOutrasRestricoes() { - return gridOutrasRestricoes; - } - - public void setGridOutrasRestricoes(HtmlPanelGrid hpg) { - this.gridOutrasRestricoes = hpg; - } - - private StaticText staticText35 = new StaticText(); - - public StaticText getStaticText35() { - return staticText35; - } - - public void setStaticText35(StaticText st) { - this.staticText35 = st; - } - - private HtmlPanelGrid gridPanel29 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel29() { - return gridPanel29; - } - - public void setGridPanel29(HtmlPanelGrid hpg) { - this.gridPanel29 = hpg; - } - - private StaticText staticText36 = new StaticText(); - - public StaticText getStaticText36() { - return staticText36; - } - - public void setStaticText36(StaticText st) { - this.staticText36 = st; - } - - private StaticText stObservacoes = new StaticText(); - - public StaticText getStObservacoes() { - return stObservacoes; - } - - public void setStObservacoes(StaticText st) { - this.stObservacoes = st; - } - - private HtmlPanelGrid gridPanel22 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel22() { - return gridPanel22; - } - - public void setGridPanel22(HtmlPanelGrid hpg) { - this.gridPanel22 = hpg; - } - - private PanelGroup groupPanel5 = new PanelGroup(); - - public PanelGroup getGroupPanel5() { - return groupPanel5; - } - - public void setGroupPanel5(PanelGroup pg) { - this.groupPanel5 = pg; - } - - private Button butVoltar = new Button(); - - public Button getButVoltar() { - return butVoltar; - } - - public void setButVoltar(Button b) { - this.butVoltar = b; - } - - private HtmlPanelGrid gridAcidentadoView1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridAcidentadoView1() { - return gridAcidentadoView1; - } - - public void setGridAcidentadoView1(HtmlPanelGrid hpg) { - this.gridAcidentadoView1 = hpg; - } - - private HtmlPanelGrid gridPanel30 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel30() { - return gridPanel30; - } - - public void setGridPanel30(HtmlPanelGrid hpg) { - this.gridPanel30 = hpg; - } - - private StaticText staticText37 = new StaticText(); - - public StaticText getStaticText37() { - return staticText37; - } - - public void setStaticText37(StaticText st) { - this.staticText37 = st; - } - - private HtmlPanelGrid gridPanel31 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel31() { - return gridPanel31; - } - - public void setGridPanel31(HtmlPanelGrid hpg) { - this.gridPanel31 = hpg; - } - - private HtmlPanelGrid gridPanel32 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridPanel32() { - return gridPanel32; - } - - public void setGridPanel32(HtmlPanelGrid hpg) { - this.gridPanel32 = hpg; - } - - private StaticText staticText38 = new StaticText(); - - public StaticText getStaticText38() { - return staticText38; - } - - public void setStaticText38(StaticText st) { - this.staticText38 = st; - } - - private StaticText stNomeAcidentado = new StaticText(); - - public StaticText getStNomeAcidentado() { - return stNomeAcidentado; - } - - public void setStNomeAcidentado(StaticText st) { - this.stNomeAcidentado = st; - } - - private StaticText staticText39 = new StaticText(); - - public StaticText getStaticText39() { - return staticText39; - } - - public void setStaticText39(StaticText st) { - this.staticText39 = st; - } - - private StaticText stDataNascimento = new StaticText(); - - public StaticText getStDataNascimento() { - return stDataNascimento; - } - - public void setStDataNascimento(StaticText st) { - this.stDataNascimento = st; - } - - private StaticText staticText40 = new StaticText(); - - public StaticText getStaticText40() { - return staticText40; - } - - public void setStaticText40(StaticText st) { - this.staticText40 = st; - } - - private StaticText stBI = new StaticText(); - - public StaticText getStBI() { - return stBI; - } - - public void setStBI(StaticText st) { - this.stBI = st; - } - - private StaticText staticText41 = new StaticText(); - - public StaticText getStaticText41() { - return staticText41; - } - - public void setStaticText41(StaticText st) { - this.staticText41 = st; - } - - private StaticText stMorada = new StaticText(); - - public StaticText getStMorada() { - return stMorada; - } - - public void setStMorada(StaticText st) { - this.stMorada = st; - } - - private StaticText staticText42 = new StaticText(); - - public StaticText getStaticText42() { - return staticText42; - } - - public void setStaticText42(StaticText st) { - this.staticText42 = st; - } - - private StaticText stCodPostal = new StaticText(); - - public StaticText getStCodPostal() { - return stCodPostal; - } - - public void setStCodPostal(StaticText st) { - this.stCodPostal = st; - } - - private StaticText staticText43 = new StaticText(); - - public StaticText getStaticText43() { - return staticText43; - } - - public void setStaticText43(StaticText st) { - this.staticText43 = st; - } - - private StaticText stContactoTelefonico = new StaticText(); - - public StaticText getStContactoTelefonico() { - return stContactoTelefonico; - } - - public void setStContactoTelefonico(StaticText st) { - this.stContactoTelefonico = st; - } - - private StaticText staticText44 = new StaticText(); - - public StaticText getStaticText44() { - return staticText44; - } - - public void setStaticText44(StaticText st) { - this.staticText44 = st; - } - - private StaticText stDataAdmissao = new StaticText(); - - public StaticText getStDataAdmissao() { - return stDataAdmissao; - } - - public void setStDataAdmissao(StaticText st) { - this.stDataAdmissao = st; - } - - private StaticText staticText45 = new StaticText(); - - public StaticText getStaticText45() { - return staticText45; - } - - public void setStaticText45(StaticText st) { - this.staticText45 = st; - } - - private StaticText stFuncao = new StaticText(); - - public StaticText getStFuncao() { - return stFuncao; - } - - public void setStFuncao(StaticText st) { - this.stFuncao = st; - } - - private StaticText staticText46 = new StaticText(); - - public StaticText getStaticText46() { - return staticText46; - } - - public void setStaticText46(StaticText st) { - this.staticText46 = st; - } - - private StaticText stTurno = new StaticText(); - - public StaticText getStTurno() { - return stTurno; - } - - public void setStTurno(StaticText st) { - this.stTurno = st; - } - /** - *

Construct a new Page bean instance.

- */ - public ViewAnaliseAcidenteTrabalho() { - } - - /** - *

Callback method that is called whenever a page is navigated to, - * either directly via a URL, or indirectly via page navigation. - * Customize this method to acquire resources that will be needed - * for event handlers and lifecycle methods, whether or not this - * page is performing post back processing.

- * - *

Note that, if the current request is a postback, the property - * values of the components do not represent any - * values submitted with this request. Instead, they represent the - * property values that were saved for this view when it was rendered.

- */ - public void init() { - // Perform initializations inherited from our superclass - super.init(); - // Perform application initialization that must complete - // *before* managed components are initialized - // TODO - add your own initialiation code here - - // - // Initialize automatically managed components - // *Note* - this logic should NOT be modified - try { - _init(); - } catch (Exception e) { - log("ViewAnaliseAcidenteTrabalho Initialization Failure", e); - throw e instanceof FacesException ? (FacesException) e: new FacesException(e); - } - - // - // Perform application initialization that must complete - // *after* managed components are initialized - // TODO - add your own initialization code here - lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); - initializePage(); - } - - /** - *

Callback method that is called after the component tree has been - * restored, but before any event processing takes place. This method - * will only be called on a postback request that - * is processing a form submit. Customize this method to allocate - * resources that will be required in your event handlers.

- */ - public void preprocess() { - } - - /** - *

Callback method that is called just before rendering takes place. - * This method will only be called for the page that - * will actually be rendered (and not, for example, on a page that - * handled a postback and then navigated to a different page). Customize - * this method to allocate resources that will be required for rendering - * this page.

- */ - public void prerender() { - } - - /** - *

Callback method that is called after rendering is completed for - * this request, if init() was called (regardless of whether - * or not this was the page that was actually rendered). Customize this - * method to release resources acquired in the init(), - * preprocess(), or prerender() methods (or - * acquired during execution of an event handler).

- */ - public void destroy() { - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected SessionBean1 getSessionBean1() { - return (SessionBean1)getBean("SessionBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected RequestBean1 getRequestBean1() { - return (RequestBean1)getBean("RequestBean1"); - } - - /** - *

Return a reference to the scoped data bean.

- */ - protected ApplicationBean1 getApplicationBean1() { - return (ApplicationBean1)getBean("ApplicationBean1"); - } - - public String lnkLogout_action() { - // TODO: Replace with your code - - javax.servlet.http.HttpSession session = - (javax.servlet.http.HttpSession) getExternalContext().getSession(true); - session.invalidate(); - return "login"; - } - - public String lnkNome_action() { - // TODO: Replace with your code - - return null; - } - - public String lnkDataNascimento_action() { - // TODO: Replace with your code - - return null; - } - - private void initializePage() - { - fillPage(); - fillImages(); - } - - private void fillPage() - { - AnaliseAcidente a = getSessionBean1().getCurrentAnalise(); - - fillSIPRP(a); - - AnalisesDataProvider adp = new AnalisesDataProvider(); - Acidentado ac = null; - try - { - ac = adp.getAcidentado(a.getAcidentado_id()); - //txtTrabalhador.setText(ac.getNome()); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - fillAcidentado(ac); - - fillDadosAcidenteSeg(a); - - fillDadosAcidenteRh(a); - - fillRecomendacoesHs(a); - - fillMedidasRh(a); - - fillMedico(a); - } - - private void fillSIPRP(AnaliseAcidente a) - { - UtilizadoresDataProvider udp = new UtilizadoresDataProvider(); - try - { - Utilizador u = udp.getUtilizador(a.getTecnico_saude_id()); - txtTecnicoSuperior.setText(Utils.unicodeToHTML(u.getNome())); - txtCap1.setText(u.getCap()); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - try - { - Utilizador u = udp.getUtilizador(a.getMedico_id()); - txtMedicoTrabalho.setText(Utils.unicodeToHTML(u.getNome())); - txtCedula1.setText(u.getNumero_cedula()); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - } - - private void fillAcidentado(Acidentado a) - { - stNomeAcidentado.setText(a.getNome()); - //stDataNascimento.setText(a.getData_nascimento()); - try - { - java.util.Date ddate = new java.util.Date(a.getData_nascimento().getTime()); - stDataNascimento.setText(utils.Utils.dateToYYYYMMDD(ddate)); - } - catch(Exception ex){}; - stBI.setText(a.getBilhete_identidade()); - stMorada.setText(a.getMorada()); - String cod_postal1 = ""; - String cod_postal2 = ""; - try - { - cod_postal1 = a.getCod_postal().substring(0, 4); - } - catch(Exception ex){} - try - { - cod_postal2 = a.getCod_postal().substring(5, 8); - } - catch(Exception ex){} - - //String cod_postal1 = a.getCod_postal().substring(0, 4); - //String cod_postal2 = a.getCod_postal().substring(5, 8); - String cod_postal = cod_postal1 + "-" + cod_postal2 + " " + a.getLocalidade(); - stCodPostal.setText(cod_postal); - stContactoTelefonico.setText(a.getContacto_telefonico()); - //stDataAdmissao1.setText(a.getData_admissao()); - try - { - java.util.Date ddate = new java.util.Date(a.getData_admissao().getTime()); - stDataAdmissao.setText(utils.Utils.dateToYYYYMMDD(ddate)); - } - catch(Exception ex){}; - stFuncao.setText(a.getFuncao()); - String turno_str = ""; - if(a.getTurno().matches("m")) - { - turno_str = "manhã"; - } - else if(a.getTurno().matches("t")) - { - turno_str += "tarde "; - } - if(a.getTurno().matches("n")) - { - turno_str += "noite"; - } - stTurno.setText(turno_str); - } - - private void fillDadosAcidenteSeg(AnaliseAcidente a) - { - AnalisesDataProvider adp = new AnalisesDataProvider(); - try - { - String nome_empresa = adp.getEmpresaNome(a.getEmpresa_id()); - txtEmpresa.setText(utils.Utils.unicodeToHTML(nome_empresa)); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - try - { - txtEstabelecimento.setText(adp.getEstabelecimentoNome(a.getEstabelecimento_id())); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - -// try -// { -// //Trabalhador t = adp.getTrabalhador(a.getTrabalhador_id()); -// Acidentado ac = adp.getAcidentado(a.getAcidentado_id()); -// //txtDataNascimento.setText(ac.getData_nascimento()); -// try -// { -// java.util.Date ddate = new java.util.Date(ac.getData_nascimento().getTime()); -// txtDataNascimento.setText(utils.Utils.dateToYYYYMMDD(ddate)); -// } -// catch(Exception ex){}; -// getSessionBean1().setAcidentado(ac); -// } -// catch(Exception ex) -// { -// ex.printStackTrace(); -// } - - txtTrabalhador.setText(a.getNome_acidentado()); -// txtNomeAcidentado.setText(a.getNome_acidentado()); - txtHorasTurno.setText(a.getHoras_turno().toString()); - txtSeccao.setText(a.getSeccao()); - txtLocal.setText(a.getLocal_trabalho()); - txtTarefa.setText(a.getTarefa()); - txtSubstancias.setText(a.getSubstancias()); - txtSuperior.setText(a.getSuperior_hierarquico()); - txtCondicoes.setText(a.getCondicoes()); - txtTestemunhas.setText(a.getTestemunhas()); - txtCausas.setText(a.getCausas()); - txtDescricao.setText(a.getDescricao()); - txtConclusoes.setText(a.getConclusoes()); - txtAccoes.setText(a.getAccoes()); - } - - private void fillDadosAcidenteRh(AnaliseAcidente a) - { - StaticText st = new StaticText(); - st.setId("stSHST"); - st.setEscape(false); - - StaticText st1 = new StaticText(); - st1.setId("stColaborador"); - st1.setEscape(false); - - StaticText st2 = new StaticText(); - st2.setId("stColaboradores"); - st2.setEscape(false); - - if(a.getFormacao_shst().matches("y")) - { - st.setText("O colaborador teve formação em SHST."); - gridSHST.getChildren().add(st); - } - else - { - st.setText("O colaborador não teve formação em SHST."); - gridSHST.getChildren().add(st); - HtmlPanelGrid grd = new HtmlPanelGrid(); - grd.setId("grdMotivo"); - grd.setColumns(2); - grd.setColumnClasses("gridColLeft5, gridColLeft95"); - StaticText s = new StaticText(); - s.setId("stMotivo"); - s.setEscape(false); - s.setText("Motivo: "); - grd.getChildren().add(s); - s = new StaticText(); - s.setId("stMotivo1"); - s.setEscape(false); - s.setText(a.getFormacao_shst_nao_porque()); - grd.getChildren().add(s); - gridSHST.getChildren().add(grd); - } - - - if(a.getOutros_acidentes_com_colaborador().matches("y")) - { - st1.setText("Verificaram-se outras ocurrências/inicidências no mesmo posto de trabalho com o colaborador acidentado."); - gridColaborador.getChildren().add(st1); - boolean booShow = false; - boolean booShow1 = false; - boolean booShow2 = false; - if(a.getNr_acidentes_com_colaborador() != null) - { - booShow = true; - booShow1 = true; - } - if(a.getNr_relatorio_acidente_colaborador1() != null || a.getNr_relatorio_acidente_colaborador2() != null || a.getNr_relatorio_acidente_colaborador3() != null || a.getNr_relatorio_acidente_colaborador4() != null) - { - booShow = true; - booShow2 = true; - } - - if(booShow) - { - HtmlPanelGrid grd = new HtmlPanelGrid(); - grd.setId("grdColaboradorS"); - grd.setColumns(2); - grd.setColumnClasses("gridColLeft15, gridColLeft85"); - if(booShow1) - { - PanelGroup pg = new PanelGroup(); - StaticText s = new StaticText(); - s.setId("s100"); - s.setEscape(false); - s.setText("Total:  "); - pg.getChildren().add(s); - s = new StaticText(); - s.setId("s101"); - s.setEscape(false); - s.setText(a.getNr_acidentes_com_colaborador().toString()); - pg.getChildren().add(s); - grd.getChildren().add(pg); - } - if(booShow2) - { - PanelGroup pg = new PanelGroup(); - StaticText s = new StaticText(); - s.setId("s102"); - s.setEscape(false); - s.setText("   Relatórios de acidente nº:  "); - pg.getChildren().add(s); - if(a.getNr_relatorio_acidente_colaborador1() != null) - { - if(a.getNr_relatorio_acidente_colaborador1().intValue() > 0) - { - s = new StaticText(); - s.setId("s103"); - s.setEscape(false); - s.setText(a.getNr_relatorio_acidente_colaborador1()); - pg.getChildren().add(s); - } - } - if(a.getNr_relatorio_acidente_colaborador2() != null) - { - if(a.getNr_relatorio_acidente_colaborador2().intValue() > 0) - { - s = new StaticText(); - s.setId("s104"); - s.setEscape(false); - s.setText("  " + a.getNr_relatorio_acidente_colaborador2()); - pg.getChildren().add(s); - } - - } - if(a.getNr_relatorio_acidente_colaborador3() != null) - { - if(a.getNr_relatorio_acidente_colaborador3().intValue() > 0) - { - s = new StaticText(); - s.setId("s105"); - s.setEscape(false); - s.setText("  " + a.getNr_relatorio_acidente_colaborador3()); - pg.getChildren().add(s); - } - } - if(a.getNr_relatorio_acidente_colaborador4() != null) - { - if(a.getNr_relatorio_acidente_colaborador4().intValue() > 0) - { - s = new StaticText(); - s.setId("s106"); - s.setEscape(false); - s.setText("  " + a.getNr_relatorio_acidente_colaborador4()); - pg.getChildren().add(s); - } - } - grd.getChildren().add(pg); - } - gridColaborador.getChildren().add(grd); - } - - } - else - { - st1.setText("Não se verificaram outras ocorrências/incidências no mesmo posto de trabalho com o colaborador acidentado."); - gridColaborador.getChildren().add(st1); - } - - if(a.getAcidentes_outros_colaboradores().matches("y")) - { - st2.setText("Verificaram-se ocorrências/incidentes semelhantes com outros colaboradores."); - gridColaboradores.getChildren().add(st2); - boolean booShow = false; - boolean booShow1 = false; - boolean booShow2 = false; - if(a.getNr_acidentes_outros_colaboradores() != null) - { - booShow = true; - booShow1 = true; - } - if(a.getNr_relatorio_acidente_outros_colaboradores1() != null || a.getNr_relatorio_acidente_outros_colaboradores2() != null || a.getNr_relatorio_acidente_outros_colaboradores3() != null || a.getNr_relatorio_acidente_outros_colaboradores4() != null) - { - booShow = true; - booShow2 = true; - } - - if(booShow) - { - HtmlPanelGrid grd = new HtmlPanelGrid(); - grd.setId("grdColaboradoresS"); - grd.setColumns(2); - grd.setColumnClasses("gridColLeft15, gridColLeft85"); - if(booShow1) - { - PanelGroup pg = new PanelGroup(); - StaticText s = new StaticText(); - s.setId("s200"); - s.setEscape(false); - s.setText("Total:  "); - pg.getChildren().add(s); - s = new StaticText(); - s.setId("s201"); - s.setEscape(false); - s.setText(a.getNr_acidentes_outros_colaboradores()); - pg.getChildren().add(s); - grd.getChildren().add(pg); - } - if(booShow2) - { - PanelGroup pg = new PanelGroup(); - StaticText s = new StaticText(); - s.setId("s202"); - s.setEscape(false); - s.setText("   Relatórios de acidente nº:  "); - pg.getChildren().add(s); - if(a.getNr_relatorio_acidente_outros_colaboradores1() != null) - { - if(a.getNr_relatorio_acidente_outros_colaboradores1().intValue() > 0) - { - s = new StaticText(); - s.setId("s203"); - s.setEscape(false); - s.setText(a.getNr_relatorio_acidente_outros_colaboradores1()); - pg.getChildren().add(s); - } - } - if(a.getNr_relatorio_acidente_outros_colaboradores2() != null) - { - if(a.getNr_relatorio_acidente_outros_colaboradores2().intValue() > 0) - { - s = new StaticText(); - s.setId("s204"); - s.setEscape(false); - s.setText("  " + a.getNr_relatorio_acidente_outros_colaboradores2()); - pg.getChildren().add(s); - } - } - if(a.getNr_relatorio_acidente_outros_colaboradores3() != null) - { - if(a.getNr_relatorio_acidente_outros_colaboradores3().intValue() > 0) - { - s = new StaticText(); - s.setId("s205"); - s.setEscape(false); - s.setText("  " + a.getNr_relatorio_acidente_outros_colaboradores3()); - pg.getChildren().add(s); - } - } - if(a.getNr_relatorio_acidente_outros_colaboradores4() != null) - { - if(a.getNr_relatorio_acidente_outros_colaboradores4().intValue() > 0) - { - s = new StaticText(); - s.setId("s206"); - s.setEscape(false); - s.setText("  " + a.getNr_relatorio_acidente_outros_colaboradores4()); - pg.getChildren().add(s); - } - } - grd.getChildren().add(pg); - } - gridColaboradores.getChildren().add(grd); - } - } - else - { - st2.setText("Não se verificaram ocurrências/inicidentes com outros colaboradores."); - gridColaboradores.getChildren().add(st1); - } - } - - private void fillRecomendacoesHs(AnaliseAcidente a) - { - AnalisesDataProvider adp = new AnalisesDataProvider(); - try - { - ArrayList list = adp.getRecomendacoesByAnalise(a.getId()); - ListIterator iter = list.listIterator(); - int seq = 1; - while(iter.hasNext()) - { - Recomendacao r = (Recomendacao) iter.next(); - HtmlPanelGrid grd = new HtmlPanelGrid(); - grd.setId("grdRecomendacaoView" + seq); - grd.setColumns(2); - grd.setColumnClasses("gridColLeft5, gridColLeft95"); - grd.setStyle("width: 100%"); - - StaticText st = new StaticText(); - st.setId("stNrRecomendacaoView" + seq); - st.setText(seq + " ."); - st.setStyle("width: 24px"); - grd.getChildren().add(st); - - st = new StaticText(); - st.setId("stRecomendacaoView" + seq); - st.setText(r.getRecomendacao()); - st.setStyle("width: 24px"); - grd.getChildren().add(st); - - gridRecomendacoesView.getChildren().add(grd); - seq++; - } - } - catch(Exception ex) - { - ex.printStackTrace(); - } - } - - private void fillMedidasRh(AnaliseAcidente a) - { - AnalisesDataProvider adp = new AnalisesDataProvider(); - try - { - ArrayList list = adp.getMedidasByAnalise(a.getId()); - ListIterator iter = list.listIterator(); - int seq = 1; - while(iter.hasNext()) - { - Medida m = (Medida) iter.next(); - HtmlPanelGrid grd = new HtmlPanelGrid(); - grd.setId("grdMedidaView" + seq); - grd.setColumns(2); - grd.setColumnClasses("gridColLeft5, gridColLeft95"); - grd.setStyle("width: 100%"); - - StaticText st = new StaticText(); - st.setId("stNrMedidaView" + seq); - st.setText(seq + " ."); - st.setStyle("width: 24px"); - grd.getChildren().add(st); - - st = new StaticText(); - st.setId("stMedidaView" + seq); - st.setText(m.getMedida()); - st.setStyle("width: 24px"); - grd.getChildren().add(st); - - gridMedidasView.getChildren().add(grd); - seq++; - } - } - catch(Exception ex) - { - ex.printStackTrace(); - } - } - - private void fillMedico(AnaliseAcidente a) - { - - PanelGroup pg = null; - StaticText st = null; - HtmlPanelGrid grd = null; - ImageComponent img = null; - //LESAO : - - if(a.getLesao_cabeca().matches("y")) - { - st = new StaticText(); - st.setId("stLesaoCabeca"); - st.setEscape(false); - st.setText("Cabeça"); - gridLesao.getChildren().add(st); - } - - if(a.getLesao_pescoco().matches("y")) - { - st = new StaticText(); - st.setId("stLesaoPescoco"); - st.setEscape(false); - st.setText("Pescoço"); - gridLesao.getChildren().add(st); - } - - if(a.getLesao_tronco().matches("y")) - { - st = new StaticText(); - st.setId("stLesaoTronco"); - st.setEscape(false); - st.setText("Tronco"); - gridLesao.getChildren().add(st); - } - - grd = new HtmlPanelGrid(); - grd.setId("gridLesaoMembros"); - grd.setColumns(2); - grd.setColumnClasses("gridColLeft"); - if(a.getLesao_membro_sup_dir().matches("y")) - { - st = new StaticText(); - st.setId("stLesaoMembroSupDir"); - st.setEscape(false); - st.setText("Membro Superior Direito"); - grd.getChildren().add(st); - st = new StaticText(); - st.setId("stEspecif1"); - st.setEscape(false); - st.setText(a.getEspecif1()); - grd.getChildren().add(st); - } - - if(a.getLesao_membro_sup_esq().matches("y")) - { - st = new StaticText(); - st.setId("stLesaoMembroSupEsq"); - st.setEscape(false); - st.setText("Membro Superior Esquerdo"); - grd.getChildren().add(st); - st = new StaticText(); - st.setId("stEspecif2"); - st.setEscape(false); - st.setText(a.getEspecif2()); - grd.getChildren().add(st); - } - - if(a.getLesao_membro_inf_dir().matches("y")) - { - st = new StaticText(); - st.setId("stLesaoMembroInfDir"); - st.setEscape(false); - st.setText("Membro Inferior Direito"); - grd.getChildren().add(st); - st = new StaticText(); - st.setId("stEspecif3"); - st.setEscape(false); - st.setText(a.getEspecif3()); - grd.getChildren().add(st); - } - - if(a.getLesao_membro_inf_esq().matches("y")) - { - st = new StaticText(); - st.setId("stLesaoMembroInfEsq"); - st.setEscape(false); - st.setText("Membro Inferior Esquerdo"); - grd.getChildren().add(st); - st = new StaticText(); - st.setId("stEspecif4"); - st.setEscape(false); - st.setText(a.getEspecif4()); - grd.getChildren().add(st); - } - if(grd.getChildren().size() > 0) - { - gridLesao.getChildren().add(grd); - } - - if(a.getTipo_lesao().trim().length() > 0 ) - { - pg = new PanelGroup(); - pg.setId("pgTipoLesao"); - st = new StaticText(); - st.setId("stTipoLesaoLbl"); - st.setEscape(false); - st.setText("Tipo de lesão:   "); - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stTipoLesao"); - st.setEscape(false); - st.setText(a.getTipo_lesao()); - pg.getChildren().add(st); - gridLesao.getChildren().add(pg); - } - - //INCAPACIDADE : - pg = new PanelGroup(); - pg.setId("pgTipoIncapacidade"); - st = new StaticText(); - st.setId("stTipoIncapacidadeLbl1"); - st.setEscape(false); - st.setStyle("font-weight: bold"); - st.setText("Tipo de incapacidade:  "); - if(a.getTipo_incapacidade().matches("t")) - { - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stTipoIncapacidade"); - st.setEscape(false); - st.setText("Temporária  "); - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stTipoIncapacidadeLbl2"); - st.setStyle("font-weight: bold"); - st.setEscape(false); - st.setText("   Coeficiente de incapacidade:  "); - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stCoefIncapacidade"); - st.setEscape(false); - st.setText(a.getCoef_incapacidade().toString() + "%"); - pg.getChildren().add(st); - } - else if(a.getTipo_incapacidade().matches("p")) - { - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stTipoIncapacidade"); - st.setEscape(false); - st.setText("Permanente  "); - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stTipoIncapacidadeLbl2"); - st.setStyle("font-weight: bold"); - st.setEscape(false); - st.setText("   Coeficiente de incapacidade:  "); - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stCoefIncapacidade"); - st.setEscape(false); - st.setText(a.getCoef_incapacidade().toString() + "%"); - pg.getChildren().add(st); - } - - if(pg.getChildren().size() > 0) - { - gridIncapacidade.getChildren().add(pg); - - } - - pg = new PanelGroup(); - pg.setId("pgAvaliacaoIncapacidade"); - if(a.getData_aval_incapacidade() != null) - { - st = new StaticText(); - st.setId("stDataAvalIncapacidadeLbl1"); - st.setStyle("font-weight: bold"); - st.setEscape(false); - st.setText("Avaliação de incapacidade realizada em  "); - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stDataAvalIncapacidade"); - st.setEscape(false); - //st.setText(a.getData_aval_incapacidade()); - try - { - java.util.Date ddate = new java.util.Date(a.getData_aval_incapacidade().getTime()); - st.setText(utils.Utils.dateToYYYYMMDD(ddate)); - } - catch(Exception ex){}; - pg.getChildren().add(st); - } - - - if(a.getData_rev_incapacidade() != null) - { - st = new StaticText(); - st.setId("stDataRevIncapacidadeLbl1"); - st.setStyle("font-weight: bold"); - st.setEscape(false); - st.setText("Revisão de incapacidade em  "); - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stDataRevIncapacidade"); - st.setEscape(false); - //st.setText(a.getData_rev_incapacidade()); - try - { - java.util.Date ddate = new java.util.Date(a.getData_rev_incapacidade().getTime()); - st.setText(utils.Utils.dateToYYYYMMDD(ddate)); - } - catch(Exception ex){}; - pg.getChildren().add(st); - } - - if(pg.getChildren().size() > 0) - { - gridIncapacidade.getChildren().add(pg); - } - - if(a.getPeriodo_incapacidade_a() != null || a.getPeriodo_incapacidade_de() != null) - { - pg = new PanelGroup(); - pg.setId("pgPeriodoIncapacidade"); - st = new StaticText(); - st.setId("stPeriodoIncapacidadeLbl1"); - st.setStyle("font-weight: bold"); - st.setEscape(false); - st.setText("Período de incapacidade temporária de  "); - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stPeriodoIncapacidadeDe"); - st.setEscape(false); - //st.setText(a.getPeriodo_incapacidade_de()); - try - { - java.util.Date ddate = new java.util.Date(a.getPeriodo_incapacidade_de().getTime()); - st.setText(utils.Utils.dateToYYYYMMDD(ddate)); - } - catch(Exception ex){}; - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stPeriodoIncapacidadeLbl2"); - st.setStyle("font-weight: bold"); - st.setEscape(false); - st.setText("  a  "); - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stPeriodoIncapacidadeA"); - st.setEscape(false); - //st.setText(a.getPeriodo_incapacidade_a()); - try - { - java.util.Date ddate = new java.util.Date(a.getPeriodo_incapacidade_a().getTime()); - st.setText(utils.Utils.dateToYYYYMMDD(ddate)); - } - catch(Exception ex){}; - pg.getChildren().add(st); - gridIncapacidade.getChildren().add(pg); - } - - - - //RESTRICOES - - if(a.getImg_flexao().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgFlexao"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - pg = new PanelGroup(); - pg.setId("pgImgFlexao"); - img = new ImageComponent(); - img.setId("imgRestricoes1000"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/fle1.gif"); - pg.getChildren().add(img); - img = new ImageComponent(); - img.setId("imgRestricoes1001"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/fle2.gif"); - pg.getChildren().add(img); - img = new ImageComponent(); - img.setId("imgRestricoes1002"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/fle3.gif"); - pg.getChildren().add(img); - img = new ImageComponent(); - img.setId("imgRestricoes1003"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/fle4.gif"); - pg.getChildren().add(img); - grd.getChildren().add(pg); - st = new StaticText(); - st.setId("stImgRestricaoLbl1"); - st.setEscape(false); - st.setText("Flexão"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_rot1().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgRot1"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes1005"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/rot1.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl2"); - st.setEscape(false); - st.setText("Flexão Lateral"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_rot2().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgRot2"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes1006"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/rot2.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl3"); - st.setEscape(false); - st.setText("Rotação"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_ext1().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgExt1"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes1007"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ext1.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl4"); - st.setEscape(false); - st.setText("Extensão"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_ext2().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgExt2"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - pg = new PanelGroup(); - pg.setId("pgImgExt2"); - img = new ImageComponent(); - img.setId("imgRestricoes1008"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ext2.gif"); - pg.getChildren().add(img); - img = new ImageComponent(); - img.setId("imgRestricoes1009"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ext3.gif"); - pg.getChildren().add(img); - img = new ImageComponent(); - img.setId("imgRestricoes1010"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ext4.gif"); - pg.getChildren().add(img); - grd.getChildren().add(pg); - st = new StaticText(); - st.setId("stImgRestricaoLbl5"); - st.setEscape(false); - st.setText("Flexão/Extensão Lateral + Rotação"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_cab1().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgCab1"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10011"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ca1.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl6"); - st.setEscape(false); - st.setText("Flexão"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_cab2().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgCab2"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10012"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ca2.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl7"); - st.setEscape(false); - st.setText("Extensão"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_cab3().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgCab3"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10013"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ca3.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl8"); - st.setEscape(false); - st.setText("Flexão Lateral"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_cab4().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgCab4"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10014"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ca4.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl9"); - st.setEscape(false); - st.setText("Rotação"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_ma1().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgMa1"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10015"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ma1.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl10"); - st.setEscape(false); - st.setText("Poronação"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_ma2().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgMa2"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10016"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ma2.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl11"); - st.setEscape(false); - st.setText("Supinação"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_ma3().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgMa3"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10017"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ma3.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl12"); - st.setEscape(false); - st.setText("Flexão"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_ma4().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgMa4"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10018"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ma4.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl13"); - st.setEscape(false); - st.setText("Extensão"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_ma5().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgMa5"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10019"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ma5.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl14"); - st.setEscape(false); - st.setText("Desvio Ulnar"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_ma6().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgMa6"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10020"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ma6.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl15"); - st.setEscape(false); - st.setText("Desvio Radial"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_ma7().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgMa7"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10021"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ma7.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl16"); - st.setEscape(false); - st.setText("Pinça Digital"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_ma8().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgMa8"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10022"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ma8.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl17"); - st.setEscape(false); - st.setText("Segurar objectos entre os dedos"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_ma9().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgMa9"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10023"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ma9.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl18"); - st.setEscape(false); - st.setText("Dedos em extensão"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getImg_ma10().matches("y")) - { - grd = new HtmlPanelGrid(); - grd.setId("grdImgMa10"); - grd.setColumns(1); - grd.setColumnClasses("gridColCenter"); - grd.setStyleClass("centerBlock"); - - img = new ImageComponent(); - img.setId("imgRestricoes10024"); - img.setWidth(IMAGE_WIDTH); - img.setHeight(IMAGE_HEIGHT); - img.setUrl("/resources/images/medico/ma10.gif"); - grd.getChildren().add(img); - st = new StaticText(); - st.setId("stImgRestricaoLbl19"); - st.setEscape(false); - st.setText("Pega palmar"); - grd.getChildren().add(st); - gridImagesRestricoes.getChildren().add(grd); - } - - if(a.getRestricao_carga() != null) - { - if(a.getRestricao_carga().intValue() > 0) - { - pg = new PanelGroup(); - st = new StaticText(); - st.setId("stRestricaoCargaLbl"); - st.setEscape(false); - st.setText("Movimentação e manipulação de cargas com mais de  "); - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stRestricaoCargaKgs"); - st.setEscape(false); - st.setText(a.getRestricao_carga().toString()); - pg.getChildren().add(st); - st = new StaticText(); - st.setId("stRestricaoCargaLbl1"); - st.setEscape(false); - st.setText("Kg"); - pg.getChildren().add(st); - gridOutrasRestricoes.getChildren().add(pg); - } - - if(a.getRestricao_motricidade().matches("y")) - { - st = new StaticText(); - st.setId("stRestricaoMotricidadeLbl"); - st.setEscape(false); - st.setText("Operações que requeiram motricidade fina."); - gridOutrasRestricoes.getChildren().add(st); - } - - if(a.getRestricao_conducao().matches("y")) - { - st = new StaticText(); - st.setId("stRestricaoConducaoLbl"); - st.setEscape(false); - st.setText("Condução/interacção com veículos ou outros equipamentos."); - gridOutrasRestricoes.getChildren().add(st); - } - - if(a.getRestricao_vibracoes().matches("y")) - { - st = new StaticText(); - st.setId("stRestricaoVibracoesLbl"); - st.setEscape(false); - st.setText("Utilizaçõo de equipamentos/ferramentas que impliquem exposição a vibrações ou impactos."); - gridOutrasRestricoes.getChildren().add(st); - } - - if(a.getRestricao_outras().trim().length() > 0) - { - st = new StaticText(); - st.setId("stRestricaoOutras"); - st.setEscape(false); - st.setText(a.getRestricao_outras()); - gridOutrasRestricoes.getChildren().add(st); - } - - if(a.getMed_observ().trim().length() > 0) - { - stObservacoes.setText(a.getMed_observ()); - } - } - - } - - private void fillImages() - { - ServletContext theApplicationsServletContext = - (ServletContext) this.getExternalContext().getContext(); - try - { - String imageFileFolder = theApplicationsServletContext.getRealPath(IMAGE_URL + "/" + getSessionBean1().getCurrentAnalise().getId()); - File f = new File(imageFileFolder); - if( f.exists() ) - { - File files[] = f.listFiles(); - - for(int i=0;i 1 AND estado < 6 ) OR (estado > 6 AND estado < 9) AND estabelecimento_id = " + estabelecimento_id; - - ResultSet rs = st.executeQuery(sql); - ArrayList list = fillAnaliseFields(rs); - return list; - } - - public ArrayList getAnalisesSeguimentoHsList(Integer estabelecimento_id) throws Exception - { - Statement st = createStatement(); - String sql = null; - - sql ="SELECT * FROM analises_acidentes WHERE estado < 3 OR (estado > 3 AND estado < 6) OR (estado = 6 AND ass_hs = 'y') OR (estado = 7) AND estabelecimento_id = " + estabelecimento_id; - - ResultSet rs = st.executeQuery(sql); - ArrayList list = fillAnaliseFields(rs); - return list; - } - - public ArrayList getAnalisesSeguimentoRhList(Integer estabelecimento_id) throws Exception - { - Statement st = createStatement(); - String sql = null; - - sql ="SELECT * FROM analises_acidentes WHERE estado = 1 OR estado = 3 OR (estado > 4 AND estado < 6) OR (estado = 6 AND estado_assinatura < 3) OR (estado = 8) AND estabelecimento_id = " + estabelecimento_id; - - ResultSet rs = st.executeQuery(sql); - ArrayList list = fillAnaliseFields(rs); - return list; - } - - public ArrayList getAnalisesSeguimentoMedList(Integer estabelecimento_id) throws Exception - { - Statement st = createStatement(); - String sql = null; - - sql ="SELECT * FROM analises_acidentes WHERE estado < 5 OR (estado = 6 AND estado_assinatura <> 2) OR (estado = 6 AND estado_assinatura = 2 AND ass_med = 'y') OR (estado > 6 AND estado < 9) AND estabelecimento_id = " + estabelecimento_id; - - ResultSet rs = st.executeQuery(sql); - ArrayList list = fillAnaliseFields(rs); - return list; - } - - public ArrayList getAnalisesConcluidasList(Integer estabelecimento_id) throws Exception - { - Statement st = createStatement(); - String sql ="SELECT * FROM analises_acidentes WHERE estado = 9 AND estabelecimento_id = " + estabelecimento_id; - ResultSet rs = st.executeQuery(sql); - ArrayList list = fillAnaliseFields(rs); - - return list; - } - - public ArrayList searchAanalisesConcluidasList(Integer estabelecimento_id, Integer ano, Integer mes, Integer dia, String nome) throws Exception - { -// Strings strings = new Strings(); - Calendar cal = Calendar.getInstance(); -// ArrayList list = new ArrayList(); -// Dblocal dblocal = new Dblocal(); -// dblocal.connect(); -// Statement stlocal = dblocal.createStatement(); - Statement st = createStatement(); - String sql = ""; - if(nome != null) - { - nome = nome.toUpperCase(); - } - - if( ano != null) - { - if( mes != null) - { - if( dia != null) - { - cal.set( cal.YEAR, ano.intValue() ); - cal.set( cal.MONTH, mes.intValue() -1 ); - cal.set( cal.DATE, dia.intValue() ); - java.sql.Date data_acidente = new java.sql.Date( cal.getTime().getTime() ); - if( nome != null) - { - sql = "SELECT * FROM analises_acidentes, acidentados WHERE acidentado_id = acidentados.id AND data_acidente = '" + data_acidente + "' AND nome LIKE '%" + nome + "%' AND estado = 9 AND estabelecimento_id = " + estabelecimento_id; - } - else - { - sql = "SELECT * FROM analises_acidentes WHERE data_acidente = '" + data_acidente + "' AND estado = 9 AND estabelecimento_id = " + estabelecimento_id; - } - } - else - { - cal.set( cal.YEAR, ano.intValue() ); - cal.set( cal.MONTH, mes.intValue() -1 ); - cal.set( cal.DATE, 1 ); - java.sql.Date data_acidente_from = new java.sql.Date( cal.getTime().getTime() ); - cal.set( cal.DATE, 31 ); - java.sql.Date data_acidente_to = new java.sql.Date( cal.getTime().getTime() ); - if( nome != null) - { - sql = "SELECT * FROM analises_acidentes, acidentados WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from + "' AND data_acidente <= '" + data_acidente_to + "' AND nome LIKE '%" + nome + "%' AND estado = 9 AND estabelecimento_id = " + estabelecimento_id; - } - else - { - sql = "SELECT * FROM analises_acidentes WHERE data_acidente >= '" + data_acidente_from + "' AND data_acidente <= '" + data_acidente_to + "' AND estado = 9 AND estabelecimento_id = " + estabelecimento_id; - } - } // dia - } // mes - else - { - cal.set( cal.YEAR, ano.intValue() ); - cal.set( cal.MONTH, 0 ); - cal.set( cal.DATE, 1 ); - java.sql.Date data_acidente_from = new java.sql.Date( cal.getTime().getTime() ); - cal.set( cal.MONTH, 11 ); - cal.set( cal.DATE, 31 ); - java.sql.Date data_acidente_to = new java.sql.Date( cal.getTime().getTime() ); - if( nome != null) - { - sql = "SELECT * FROM analises_acidentes, acidentados WHERE acidentado_id = acidentados.id AND data_acidente >= '" + data_acidente_from + "' AND data_acidente <= '" + data_acidente_to + "' AND nome LIKE '%" + nome + "%' AND estado = 9 AND estabelecimento_id = " + estabelecimento_id; - } - else - { - System.out.println("HERE c"); - sql = "SELECT * FROM analises_acidentes WHERE data_acidente >= '" + data_acidente_from + "' AND data_acidente <= '" + data_acidente_to + "' AND estado = 9 AND estabelecimento_id = " + estabelecimento_id; - } - } - } // ano - else - { - if( nome != null ) - { - sql = "SELECT * FROM analises_acidentes, acidentados WHERE acidentado_id = acidentados.id AND nome LIKE '%" + nome + "%' AND estado = 9 AND estabelecimento_id = " + estabelecimento_id; - } - else - { - sql = "SELECT * FROM analises_acidentes WHERE estado = 9 AND estabelecimento_id = " + estabelecimento_id; - } - } - ResultSet rs = st.executeQuery(sql); - ArrayList list = fillAnaliseFields(rs); - - return list; - } - - private ArrayList fillAnaliseFields(ResultSet rs) throws Exception - { - Dblocal dblocal = new Dblocal(); - dblocal.connect(); - Statement stlocal = dblocal.createStatement(); - - ArrayList list = new ArrayList(); - - rs.first(); - int nr = 0; - do - { - AnaliseAcidente a = new AnaliseAcidente(); - a.setId(new Integer(rs.getInt("id"))); - nr++; - a.setNr(new Integer(nr)); - a.setData_acidente(rs.getDate("data_acidente")); - a.setEmpresa_id(new Integer(rs.getInt("empresa_id"))); - a.setEstabelecimento_id(new Integer(rs.getInt("estabelecimento_id"))); - a.setEstado(new Integer(rs.getInt("estado"))); - a.setEstado_assinatura(new Integer(rs.getInt("estado_assinatura"))); - a.setFase(getFase(a.getEstado().intValue())); - a.setAcidentado_id(new Integer( rs.getInt("acidentado_id"))); - Acidentado ac = getAcidentado(a.getAcidentado_id()); - String sqllocal = "SELECT nome FROM trabalhadores WHERE id = " + ac.getTrabalhador_id(); - ResultSet rslocal = stlocal.executeQuery(sqllocal); - rslocal.first(); - String nome_acidentado = rslocal.getString("nome"); - a.setNome_acidentado(utils.Utils.unicodeToHTML(nome_acidentado)); - - a.setHoras_turno(new Integer(rs.getInt("horas_turno"))); - a.setSeccao(rs.getString("seccao")); - a.setLocal_trabalho(rs.getString("local_trabalho")); - a.setTarefa(rs.getString("tarefa")); - a.setSubstancias(rs.getString("substancias")); - a.setSuperior_hierarquico(rs.getString("superior_hierarquico")); - a.setCondicoes(rs.getString("condicoes")); - a.setTestemunhas(rs.getString("testemunhas")); - a.setCausas(rs.getString("causas")); - a.setDescricao(rs.getString("descricao")); - a.setConclusoes(rs.getString("conclusoes")); - a.setAccoes(rs.getString("accoes")); - - a.setHora_acidente(rs.getTime("hora_acidente")); - a.setFormacao_shst(rs.getString("formacao_shst")); - Object o = rs.getString("formacao_shst_nao_porque"); - if(o == null) - { - a.setFormacao_shst_nao_porque(""); - } - else - { - a.setFormacao_shst_nao_porque(rs.getString("formacao_shst_nao_porque")); - } - a.setOutros_acidentes_com_colaborador(rs.getString("outros_acidentes_com_colaborador")); - a.setNr_acidentes_com_colaborador(new Integer(rs.getInt("nr_acidentes_com_colaborador"))); - a.setNr_relatorio_acidente_colaborador1(new Integer(rs.getInt("nr_relatorio_acidente_colaborador1"))); - a.setNr_relatorio_acidente_colaborador2(new Integer(rs.getInt("nr_relatorio_acidente_colaborador2"))); - a.setNr_relatorio_acidente_colaborador3(new Integer(rs.getInt("nr_relatorio_acidente_colaborador3"))); - a.setNr_relatorio_acidente_colaborador4(new Integer(rs.getInt("nr_relatorio_acidente_colaborador4"))); - a.setAcidentes_outros_colaboradores(rs.getString("acidentes_outros_colaboradores")); - a.setNr_acidentes_outros_colaboradores(new Integer(rs.getInt("nr_acidentes_outros_colaboradores"))); - a.setNr_relatorio_acidente_outros_colaboradores1(new Integer(rs.getInt("nr_relatorio_acidente_outros_colaboradores1"))); - a.setNr_relatorio_acidente_outros_colaboradores2(new Integer(rs.getInt("nr_relatorio_acidente_outros_colaboradores2"))); - a.setNr_relatorio_acidente_outros_colaboradores3(new Integer(rs.getInt("nr_relatorio_acidente_outros_colaboradores3"))); - a.setNr_relatorio_acidente_outros_colaboradores4(new Integer(rs.getInt("nr_relatorio_acidente_outros_colaboradores4"))); - - a.setLesao_cabeca(rs.getString("lesao_cabeca")); - a.setLesao_pescoco(rs.getString("lesao_pescoco")); - a.setLesao_tronco(rs.getString("lesao_tronco")); - a.setLesao_membro_sup_dir(rs.getString("lesao_membro_sup_dir")); - a.setLesao_membro_sup_esq(rs.getString("lesao_membro_sup_esq")); - a.setLesao_membro_inf_dir(rs.getString("lesao_membro_inf_dir")); - a.setLesao_membro_inf_esq(rs.getString("lesao_membro_inf_esq")); - Object ob = rs.getString("especif1"); - if(ob == null) - { - a.setEspecif1(""); - } - else - { - a.setEspecif1(rs.getString("especif1")); - } - ob = rs.getString("especif2"); - if(ob == null) - { - a.setEspecif2(""); - } - else - { - a.setEspecif2(rs.getString("especif2")); - } - ob = rs.getString("especif3"); - if(ob == null) - { - a.setEspecif3(""); - } - else - { - a.setEspecif3(rs.getString("especif3")); - } - ob = rs.getString("especif4"); - if(ob == null) - { - a.setEspecif4(""); - } - else - { - a.setEspecif4(rs.getString("especif4")); - } - ob = rs.getString("tipo_lesao"); - if(ob == null) - { - a.setTipo_lesao(""); - } - else - { - a.setTipo_lesao(rs.getString("tipo_lesao")); - } - a.setTipo_incapacidade(rs.getString("tipo_incapacidade")); - a.setCoef_incapacidade(new Integer(( rs.getInt("coef_incapacidade") ))); - a.setData_aval_incapacidade(rs.getDate("data_aval_incapacidade")); - a.setData_rev_incapacidade(rs.getDate("data_rev_incapacidade")); - a.setPeriodo_incapacidade_de(rs.getDate("periodo_incapacidade_de")); - a.setPeriodo_incapacidade_a(rs.getDate("periodo_incapacidade_a")); - a.setImg_flexao(rs.getString("img_flexao")); - a.setImg_ext1(rs.getString("img_ext1")); - a.setImg_ext2(rs.getString("img_ext2")); - a.setImg_cab2(rs.getString("img_cab2")); - a.setImg_cab3(rs.getString("img_cab3")); - a.setImg_ma2(rs.getString("img_ma2")); - a.setImg_ma3(rs.getString("img_ma3")); - a.setImg_ma5(rs.getString("img_ma5")); - a.setImg_ma6(rs.getString("img_ma6")); - a.setImg_ma8(rs.getString("img_ma8")); - a.setImg_ma10(rs.getString("img_ma10")); - a.setImg_rot1(rs.getString("img_rot1")); - a.setImg_rot2(rs.getString("img_rot2")); - a.setImg_cab1(rs.getString("img_cab1")); - a.setImg_cab4(rs.getString("img_cab4")); - a.setImg_ma1(rs.getString("img_ma1")); - a.setImg_ma4(rs.getString("img_ma4")); - a.setImg_ma7(rs.getString("img_ma7")); - a.setImg_ma9(rs.getString("img_ma9")); - a.setRestricao_carga(new Integer( rs.getInt("restricao_carga") )); - a.setRestricao_motricidade(rs.getString("restricao_motricidade")); - a.setRestricao_conducao(rs.getString("restricao_conducao")); - a.setRestricao_vibracoes(rs.getString("restricao_vibracoes")); - ob = rs.getString("restricao_outras"); - if(ob == null) - { - a.setRestricao_outras(""); - } - else - { - a.setRestricao_outras(rs.getString("restricao_outras")); - } - ob = rs.getString("med_observ"); - if(ob == null) - { - a.setMed_observ(""); - } - else - { - a.setMed_observ(rs.getString("med_observ")); - } - a.setAnalise_nr(rs.getString("analise_nr")); - a.setMedico_id(new Integer(rs.getInt("medico_id"))); - a.setTecnico_saude_id(new Integer(rs.getInt("tecnico_saude_id"))); - - a.setAss_hs(rs.getString("ass_hs")); - a.setAss_seg(rs.getString("ass_seg")); - a.setAss_resp_seg(rs.getString("ass_resp_seg")); - a.setAss_med(rs.getString("ass_med")); - a.setAss_resp_rh(rs.getString("ass_resp_rh")); - list.add(a); - }while(rs.next()); - dblocal.close(); - - - return list; - } - - public Trabalhador searchTrabalhador(String nrMecanografico, String nome) throws Exception - { - Dblocal dblocal = new Dblocal(); - dblocal.connect(); - Statement stlocal = dblocal.createStatement(); - String sql = ""; - if(nrMecanografico != null) - { - sql = "SELECT * FROM trabalhadores WHERE numero_mecanografico = '" + nrMecanografico + "'"; - } - else if(nome != null) - { - sql = "SELECT * FROM trabalhadores WHERE nome LIKE '%" + nome + "%'"; - } - ResultSet rslocal = stlocal.executeQuery(sql); - rslocal.first(); - Trabalhador t = new Trabalhador(); - t.setId(new Integer(rslocal.getInt("id"))); - String nome = rslocal.getString("nome"); - t.setNome(utils.unicodeToHTML(nome)); - t.setData_nascimento(rslocal.getDate("data_nascimento")); - t.setFuncao(rslocal.getString("funcao_proposta")); - t.setData_admissao(rslocal.getDate("data_admissao")); - t.setNumero_mecanografico(rslocal.getString("numero_mecanografico")); - dblocal.close(); - } - - public ArrayList getTrabalhadoresListByEstabelecimento(Integer estabelecimento_id) throws Exception - { - Utils utils = new Utils(); - ArrayList list = new ArrayList(); - Dblocal dblocal = new Dblocal(); - dblocal.connect(); - Statement stlocal = dblocal.createStatement(); - String sql ="SELECT * FROM trabalhadores WHERE estabelecimento_id = " + estabelecimento_id; - ResultSet rslocal = stlocal.executeQuery(sql); - rslocal.first(); - int nr = 0; - do - { - Trabalhador t = new Trabalhador(); - t.setId(new Integer(rslocal.getInt("id"))); - String nome = rslocal.getString("nome"); - t.setNome(utils.unicodeToHTML(nome)); - t.setData_nascimento(rslocal.getDate("data_nascimento")); - t.setFuncao(rslocal.getString("funcao_proposta")); - t.setData_admissao(rslocal.getDate("data_admissao")); - list.add(t); - }while(rslocal.next()); - dblocal.close(); - - return list; - } - - public Trabalhador getTrabalhador(Integer id) throws Exception - { - Dblocal dblocal = new Dblocal(); - dblocal.connect(); - Statement stlocal = dblocal.createStatement(); - String sql ="SELECT * FROM trabalhadores WHERE id = " + id; - ResultSet rslocal = stlocal.executeQuery(sql); - rslocal.first(); - Trabalhador t = new Trabalhador(); - t.setId(new Integer(rslocal.getInt("id"))); - t.setNome(rslocal.getString("nome")); - t.setData_nascimento(rslocal.getDate("data_nascimento")); - t.setFuncao(rslocal.getString("funcao_proposta")); - t.setData_admissao(rslocal.getDate("data_admissao")); - dblocal.close(); - return t; - } - - public Acidentado getAcidentado(Integer acidentado_id) throws Exception - { - Strings strings = new Strings(); - Acidentado a = new Acidentado(); - Statement st = createStatement(); - String sql ="SELECT * FROM acidentados WHERE id = " + acidentado_id; - ResultSet rs = st.executeQuery(sql); - rs.first(); - a.setId(new Integer(rs.getInt("id"))); - a.setNome(rs.getString("nome")); - a.setData_nascimento(rs.getDate("data_nascimento")); - a.setBilhete_identidade(rs.getString("bilhete_identidade")); - a.setMorada(rs.getString("morada")); - a.setCod_postal(rs.getString("cod_postal")); - a.setLocalidade(rs.getString("localidade")); - a.setContacto_telefonico(rs.getString("contacto_telefonico")); - a.setData_admissao(rs.getDate("data_admissao")); - a.setTurno(rs.getString("turno")); - String funcao = rs.getString("funcao"); - a.setFuncao(utils.Utils.unicodeToHTML(funcao)); - a.setTrabalhador_id(new Integer(rs.getInt("trabalhador_id"))); - //a.setAnalise_acidente_id(new Integer("analise_acidente_id")); - return a; - } - - public String getEmpresaNome(Integer empresa_id) throws Exception - { - Dblocal dblocal = new Dblocal(); - dblocal.connect(); - Statement stlocal = dblocal.createStatement(); - String sql ="SELECT designacao_social FROM empresas WHERE id = " + empresa_id; - ResultSet rslocal = stlocal.executeQuery(sql); - rslocal.first(); - String nome = rslocal.getString("designacao_social"); - dblocal.close(); - return nome; - } - - - - public String getEstabelecimentoNome(Integer estabelecimento_id) throws Exception - { - Dblocal dblocal = new Dblocal(); - dblocal.connect(); - Statement stlocal = dblocal.createStatement(); - String sql ="SELECT nome FROM estabelecimentos WHERE id = " + estabelecimento_id; - ResultSet rslocal = stlocal.executeQuery(sql); - rslocal.first(); - String nome = rslocal.getString("nome"); - dblocal.close(); - return nome; - } - - public String getMedicoNome(Integer medico_id) throws Exception - { - Dblocal dblocal = new Dblocal(); - dblocal.connect(); - Statement stlocal = dblocal.createStatement(); - String sql ="SELECT nome FROM medicos WHERE id = " + medico_id; - ResultSet rslocal = stlocal.executeQuery(sql); - rslocal.first(); - String nome = rslocal.getString("nome"); - dblocal.close(); - return nome; - } - - public String getTecnicoSaudeNome(Integer tecnico_id) throws Exception - { - Dblocal dblocal = new Dblocal(); - dblocal.connect(); - Statement stlocal = dblocal.createStatement(); - String sql ="SELECT nome FROM marcacoes_tecnicos_hst WHERE id = " + tecnico_id; - ResultSet rslocal = stlocal.executeQuery(sql); - rslocal.first(); - String nome = rslocal.getString("nome"); - dblocal.close(); - return nome; - } - - - public Integer getMaxAcidentadoId() - { - Statement st = createStatement(); - String sql = "SELECT max(acidentados.id)+1 AS MAXACIDENTADOID FROM acidentados"; - try - { - ResultSet rs = st.executeQuery(sql); - rs.first(); - Integer newId = new Integer(rs.getInt("MAXACIDENTADOID")); - if(newId.intValue() == 0) - { - newId = new Integer(1); - } - return newId; - } - catch(Exception ex) - { - return new Integer(1); - } - } - - public Integer createAcidentado(Acidentado a) throws Exception - { - Statement st = createStatement(); - Integer newId = getMaxAcidentadoId(); - String sql = "INSERT INTO acidentados (id, nome, data_nascimento, bilhete_identidade, morada, cod_postal, localidade, contacto_telefonico, data_admissao, turno, funcao, trabalhador_id, numero_mecanografico) VALUES ("; - sql += newId + ", '"; - sql += a.getNome() + "', '"; - sql += a.getData_nascimento() + "', '"; - sql += a.getBilhete_identidade() + "', '"; - sql += a.getMorada() + "', '"; - sql += a.getCod_postal() + "', '"; - sql += a.getLocalidade() + "', '"; - sql += a.getContacto_telefonico() + "', '"; - sql += a.getData_admissao() + "', '"; - sql += a.getTurno() + "', '"; - sql += a.getFuncao() + "', "; - sql += a.getTrabalhador_id() + ", '"; - sql += a.getNumero_mecanografico() + "') " - //sql += a.getAnalise_acidente_id() + ")"; - System.out.println("SQL ACIDENTADO : " + sql); - st.execute(sql); - - return newId; - } - - public void updateAcidentado(Acidentado a) throws Exception - { - Statement st = createStatement(); - String sql = "UPDATE acidentados SET nome = '" + a.getNome() + "', "; - sql += "data_nascimento = '" + a.getData_nascimento() + "', "; - sql += "bilhete_identidade = '" + a.getBilhete_identidade() + "', "; - sql += "morada = '" + a.getMorada() + "', "; - sql += "cod_postal = '" + a.getCod_postal() + "', "; - sql += "localidade = '" + a.getLocalidade() + "', "; - sql += "contacto_telefonico = '" + a.getContacto_telefonico() + "', "; - sql += "data_admissao = '" + a.getData_admissao() + "', "; - sql += "turno = '" + a.getTurno() + "', "; - sql += "funcao = '" + a.getFuncao() + "', "; - sql += "trabalhador_id = " + a.getTrabalhador_id() + ", "; - sql += "numero_mecanografico = '" + a.getNumero_mecanografico() + "' "; - //sql += "analise_acidente_id = '" + a.getAnalise_acidente_id() + " "; - sql += "WHERE id = " + a.getId(); - //System.out.println("SQL : " + sql); - st.execute(sql); - } - - public Integer getMaxAnaliseId() - { - Statement st = createStatement(); - String sql = "SELECT max(analises_acidentes.id)+1 AS MAXANALISEID FROM analises_acidentes"; - try - { - ResultSet rs = st.executeQuery(sql); - rs.first(); - Integer newId = new Integer(rs.getInt("MAXANALISEID")); - if(newId.intValue() == 0 ) - { - newId = new Integer(1); - } - return newId; - } - catch(Exception ex) - { - return new Integer(1); - } - } - - - public Integer createAnalise(AnaliseAcidente a) throws Exception - { - - Statement st = createStatement(); - Integer newId = getMaxAnaliseId(); - - //calc analise_nr - java.util.Date now = new java.util.Date(); - Calendar cal = new GregorianCalendar(); - cal.setTime(now); - int ano = cal.get(Calendar.YEAR); - //Integer analise_nr = new Integer( ano * 10000 + newId.intValue() ); - String seq_str = new Integer(10000 + newId.intValue()).toString(); - String ano_str = new Integer(ano).toString(); - String analise_nr = ano_str.substring(2) + "/" + seq_str.substring(1); - //java.util.Date today = new java.util.Date(); - //java.sql.Date sqlToday = new java.sql.Date(today.getTime()); - String sql = "INSERT INTO analises_acidentes (id, data_acidente, acidentado_id, estado, empresa_id, estabelecimento_id, horas_turno, seccao, local_trabalho, tarefa, substancias, superior_hierarquico, condicoes, testemunhas, causas, descricao, conclusoes, accoes, hora_acidente, medico_id, tecnico_saude_id, analise_nr) VALUES ("; - sql += newId + ", '"; - sql += a.getData_acidente() + "', "; - sql += a.getAcidentado_id() + ", "; - sql += a.getEstado() + ", "; - sql += a.getEmpresa_id() + ", "; - sql += a.getEstabelecimento_id() + ", "; - sql += a.getHoras_turno() + ", '"; - sql += a.getSeccao() + "', '"; - sql += a.getLocal_trabalho() + "', '"; - sql += a.getTarefa() + "', '"; - sql += a.getSubstancias() + "', '"; - sql += a.getSuperior_hierarquico() + "', '"; - sql += a.getCondicoes() + "', '"; - sql += a.getTestemunhas() + "', '"; - sql += a.getCausas() + "', '"; - sql += a.getDescricao() + "', '"; - sql += a.getConclusoes() + "', '"; - sql += a.getAccoes() + "', '"; - sql += a.getHora_acidente() + "', "; - sql += a.getMedico_id() + ", "; - sql += a.getTecnico_saude_id() + ", '"; - sql += analise_nr + "')"; -// sql += a.getFormacao_shst() + "', '"; -// sql += a.getFormacao_shst_nao_porque() + "', '"; -// sql += a.getOutros_acidentes_com_colaborador() + "', "; -// sql += a.getNr_acidentes_com_colaborador() + ", "; -// sql += a.getNr_relatorio_acidente_colaborador1() + ", "; -// sql += a.getNr_relatorio_acidente_colaborador2() + ", "; -// sql += a.getNr_relatorio_acidente_colaborador3() + ", "; -// sql += a.getNr_relatorio_acidente_colaborador4() + ", '"; -// sql += a.getAcidentes_outros_colaboradores()+ "', "; -// sql += a.getNr_acidentes_outros_colaboradores()+ ", "; -// sql += a.getNr_relatorio_acidente_outros_colaboradores1() + ", "; -// sql += a.getNr_relatorio_acidente_outros_colaboradores2() + ", "; -// sql += a.getNr_relatorio_acidente_outros_colaboradores3() + ", "; -// sql += a.getNr_relatorio_acidente_outros_colaboradores4() + ")"; - System.out.println("SQL : " + sql); - st.execute(sql); - - return newId; - } - - public void updateAnalise(AnaliseAcidente a) throws Exception - { - if(a.getEspecif1().matches("null")) - { - a.setEspecif1(""); - } - if(a.getEspecif2().matches("null")) - { - a.setEspecif2(""); - } - if(a.getEspecif3().matches("null")) - { - a.setEspecif3(""); - } - if(a.getEspecif4().matches("null")) - { - a.setEspecif4(""); - } - if(a.getRestricao_outras().matches("null")) - { - a.setRestricao_outras(""); - } - if(a.getTipo_lesao().matches("null")) - { - a.setTipo_lesao(""); - } - if(a.getMed_observ().matches("null")) - { - a.setMed_observ(""); - } - if(a.getFormacao_shst_nao_porque().matches("null")) - { - a.setFormacao_shst_nao_porque(""); - } - Statement st = createStatement(); - String sql = "UPDATE analises_acidentes SET data_acidente = '" + a.getData_acidente() + "', "; - sql += "acidentado_id = " + a.getAcidentado_id() + ", "; - sql += "estado = " + a.getEstado() + ", "; - sql += "empresa_id = " + a.getEmpresa_id() + ", "; - sql += "estabelecimento_id = " + a.getEstabelecimento_id() + ", "; - sql += "horas_turno = " + a.getHoras_turno() + ", "; - sql += "seccao = '" + a.getSeccao() + "', "; - sql += "local_trabalho = '" + a.getLocal_trabalho() + "', "; - sql += "tarefa = '" + a.getTarefa() + "', "; - sql += "substancias = '" + a.getSubstancias() + "', "; - sql += "superior_hierarquico = '" + a.getSuperior_hierarquico() + "', "; - sql += "condicoes = '" + a.getCondicoes() + "', "; - sql += "testemunhas = '" + a.getTestemunhas() + "', "; - sql += "causas = '" + a.getCausas() + "', "; - sql += "descricao = '" + a.getDescricao() + "', "; - sql += "conclusoes = '" + a.getConclusoes() + "', "; - sql += "accoes = '" + a.getAccoes() + "', "; - sql += "hora_acidente = '" + a.getHora_acidente() + "', "; - sql += "formacao_shst = '" + a.getFormacao_shst() + "', "; - sql += "formacao_shst_nao_porque = '" + a.getFormacao_shst_nao_porque() + "', "; - sql += "outros_acidentes_com_colaborador = '" + a.getOutros_acidentes_com_colaborador() + "', "; - sql += "nr_acidentes_com_colaborador = " + a.getNr_acidentes_com_colaborador() + ", "; - sql += "nr_relatorio_acidente_colaborador1 = " + a.getNr_relatorio_acidente_colaborador1() + ", "; - sql += "nr_relatorio_acidente_colaborador2 = " + a.getNr_relatorio_acidente_colaborador2() + ", "; - sql += "nr_relatorio_acidente_colaborador3 = " + a.getNr_relatorio_acidente_colaborador3() + ", "; - sql += "nr_relatorio_acidente_colaborador4 = " + a.getNr_relatorio_acidente_colaborador4() + ", "; - sql += "acidentes_outros_colaboradores = '" + a.getAcidentes_outros_colaboradores() + "', "; - sql += "nr_acidentes_outros_colaboradores = " + a.getNr_acidentes_outros_colaboradores() + ", "; - sql += "nr_relatorio_acidente_outros_colaboradores1 = " + a.getNr_relatorio_acidente_outros_colaboradores1() + ", "; - sql += "nr_relatorio_acidente_outros_colaboradores2 = " + a.getNr_relatorio_acidente_outros_colaboradores2() + ", "; - sql += "nr_relatorio_acidente_outros_colaboradores3 = " + a.getNr_relatorio_acidente_outros_colaboradores3() + ", "; - sql += "nr_relatorio_acidente_outros_colaboradores4 = " + a.getNr_relatorio_acidente_outros_colaboradores4() + ", "; - sql += "lesao_cabeca = '" + a.getLesao_cabeca() + "', "; - sql += "lesao_pescoco = '" + a.getLesao_pescoco() + "', "; - sql += "lesao_tronco = '" + a.getLesao_tronco() + "', "; - sql += "lesao_membro_sup_dir = '" + a.getLesao_membro_sup_dir() + "', "; - sql += "lesao_membro_sup_esq = '" + a.getLesao_membro_sup_esq() + "', "; - sql += "lesao_membro_inf_dir = '" + a.getLesao_membro_inf_dir() + "', "; - sql += "lesao_membro_inf_esq = '" + a.getLesao_membro_inf_esq() + "', "; - sql += "especif1 = '" + a.getEspecif1() + "', "; - sql += "especif2 = '" + a.getEspecif2() + "', "; - sql += "especif3 = '" + a.getEspecif3() + "', "; - sql += "especif4 = '" + a.getEspecif4() + "', "; - sql += "tipo_lesao = '" + a.getTipo_lesao() + "', "; - sql += "tipo_incapacidade = '" + a.getTipo_incapacidade() + "', "; - sql += "coef_incapacidade = " + a.getCoef_incapacidade() + ", "; - if(a.getData_aval_incapacidade() == null) - { - sql += "data_aval_incapacidade = " + null + ", "; - } - else - { - sql += "data_aval_incapacidade = '" + a.getData_aval_incapacidade() + "', "; - } - if(a.getData_rev_incapacidade() == null) - { - sql += "data_rev_incapacidade = " + null + ", "; - } - else - { - sql += "data_rev_incapacidade = '" + a.getData_rev_incapacidade() + "', "; - } - if(a.getPeriodo_incapacidade_de() == null) - { - sql += "periodo_incapacidade_de = " + null + ", "; - } - else - { - sql += "periodo_incapacidade_de = '" + a.getPeriodo_incapacidade_de() + "', "; - } - if(a.getPeriodo_incapacidade_a() == null) - { - sql += "periodo_incapacidade_a = " + null + ", "; - } - else - { - sql += "periodo_incapacidade_a = '" + a.getPeriodo_incapacidade_a() + "', "; - } - sql += "img_flexao = '" + a.getImg_flexao() + "', "; - sql += "img_ext1 = '" + a.getImg_ext1() + "', "; - sql += "img_ext2 = '" + a.getImg_ext2() + "', "; - sql += "img_cab2 = '" + a.getImg_cab2() + "', "; - sql += "img_cab3 = '" + a.getImg_cab3() + "', "; - sql += "img_ma2 = '" + a.getImg_ma2() + "', "; - sql += "img_ma3 = '" + a.getImg_ma3() + "', "; - sql += "img_ma5 = '" + a.getImg_ma5() + "', "; - sql += "img_ma6 = '" + a.getImg_ma6() + "', "; - sql += "img_ma8 = '" + a.getImg_ma8() + "', "; - sql += "img_ma10 = '" + a.getImg_ma10() + "', "; - sql += "img_rot1 = '" + a.getImg_rot1() + "', "; - sql += "img_rot2 = '" + a.getImg_rot2() + "', "; - sql += "img_cab1 = '" + a.getImg_cab1() + "', "; - sql += "img_cab4 = '" + a.getImg_cab4() + "', "; - sql += "img_ma1 = '" + a.getImg_ma1() + "', "; - sql += "img_ma4 = '" + a.getImg_ma4() + "', "; - sql += "img_ma7 = '" + a.getImg_ma7() + "', "; - sql += "img_ma9 = '" + a.getImg_ma9() + "', "; - sql += "restricao_carga = " + a.getRestricao_carga() + ", "; - sql += "restricao_motricidade = '" + a.getRestricao_motricidade() + "', "; - sql += "restricao_conducao = '" + a.getRestricao_conducao() + "', "; - sql += "restricao_vibracoes = '" + a.getRestricao_vibracoes() + "', "; - sql += "restricao_outras = '" + a.getRestricao_outras() + "', "; - sql += "med_observ = '" + a.getMed_observ() + "', "; - sql += "estado_assinatura = " + a.getEstado_assinatura() + ", "; - sql += "ass_seg = '" + a.getAss_seg() + "', "; - sql += "ass_hs = '" + a.getAss_hs() + "', "; - sql += "ass_med = '" + a.getAss_med() + "' "; - sql += "WHERE id = " + a.getId(); - //System.out.println("SQL : " + sql); - st.execute(sql); - } - - public Integer getMaxRecomendacaoId() - { - Statement st = createStatement(); - String sql = "SELECT max(recomendacoes.id)+1 AS MAXRECOMENDACAOID FROM recomendacoes"; - try - { - ResultSet rs = st.executeQuery(sql); - rs.first(); - Integer newId = new Integer(rs.getInt("MAXRECOMENDACAOID")); - if(newId.intValue() == 0) - { - newId = new Integer(1); - } - return newId; - } - catch(Exception ex) - { - return new Integer(1); - } - } - - public Integer createRecomendacao(Recomendacao r) throws Exception - { - Statement st = createStatement(); - Integer newId = getMaxRecomendacaoId(); - String sql = "INSERT INTO recomendacoes (id, analise_id, recomendacao) VALUES ("; - sql += newId + ", "; - sql += r.getAnalise_id() + ", '"; - sql += r.getRecomendacao() + "')"; - st.execute(sql); - - return newId; - } - - public void updateRecomendacao(Recomendacao r) throws Exception - { - Statement st = createStatement(); - String sql = "UPDATE recomendacoes SET analise_id = " + r.getAnalise_id() + ", "; - sql += "recomendacao = '" + r.getRecomendacao() + "' "; - sql += "WHERE id = " + r.getId(); - //System.out.println("SQL : " + sql); - st.execute(sql); - } - - public void deleteRecomendacoesByAnalise(Integer analise_id) throws Exception - { - Statement st = createStatement(); - String sql = "DELETE FROM recomendacoes WHERE analise_id = " + analise_id; - st.execute(sql); - } - - public ArrayList getRecomendacoesByAnalise(Integer analiseId) throws Exception - { - ArrayList list = new ArrayList(); - Statement st = createStatement(); - String sql = "SELECT * FROM recomendacoes WHERE analise_id = " + analiseId; - //System.out.println("SQL : " + sql); - ResultSet rs = st.executeQuery(sql); - rs.first(); - do - { - Recomendacao r = new Recomendacao(); - r.setId(new Integer(rs.getInt("id"))); - r.setAnalise_id(new Integer(rs.getInt("analise_id"))); - r.setRecomendacao(rs.getString("recomendacao")); - list.add(r); - }while(rs.next()); - return list; - } - - public Integer getMaxMedidaId() - { - Statement st = createStatement(); - String sql = "SELECT max(medidas.id)+1 AS MAXMEDIDAID FROM medidas"; - try - { - ResultSet rs = st.executeQuery(sql); - rs.first(); - Integer newId = new Integer(rs.getInt("MAXMEDIDAID")); - if(newId.intValue() == 0) - { - newId = new Integer(1); - } - return newId; - } - catch(Exception ex) - { - return new Integer(1); - } - } - - public Integer createMedida(Medida m) throws Exception - { - Statement st = createStatement(); - Integer newId = getMaxMedidaId(); - String sql = "INSERT INTO medidas (id, analise_id, medida) VALUES ("; - sql += newId + ", "; - sql += m.getAnalise_id() + ", '"; - sql += m.getMedida() + "')"; - st.execute(sql); - - return newId; - } - - public void updateMedida(Medida m) throws Exception - { - Statement st = createStatement(); - String sql = "UPDATE medidas SET analise_id = " + m.getAnalise_id() + ", "; - sql += "medida = '" + m.getMedida() + "' "; - sql += "WHERE id = " + m.getId(); - //System.out.println("SQL : " + sql); - st.execute(sql); - } - - public void deleteMedidasByAnalise(Integer analise_id) throws Exception - { - Statement st = createStatement(); - String sql = "DELETE FROM medidas WHERE analise_id = " + analise_id; - st.execute(sql); - } - - public ArrayList getMedidasByAnalise(Integer analiseId) throws Exception - { - ArrayList list = new ArrayList(); - Statement st = createStatement(); - String sql = "SELECT * FROM medidas WHERE analise_id = " + analiseId; - //System.out.println("SQL : " + sql); - ResultSet rs = st.executeQuery(sql); - rs.first(); - do - { - Medida m = new Medida(); - m.setId(new Integer(rs.getInt("id"))); - m.setAnalise_id(new Integer(rs.getInt("analise_id"))); - m.setMedida(rs.getString("medida")); - list.add(m); - }while(rs.next()); - return list; - } - - - - public String getNumeroCedula(Integer medico_id) throws Exception - { - Dblocal dblocal = new Dblocal(); - dblocal.connect(); - Statement stlocal = dblocal.createStatement(); - String sql ="SELECT numero_cedula FROM medicos WHERE id = " + medico_id; - ResultSet rslocal = stlocal.executeQuery(sql); - rslocal.first(); - String numero_cedula = rslocal.getString("numero_cedula"); - dblocal.close(); - return numero_cedula; - } - - public com.sun.rave.web.ui.model.Option[] getTiposList() throws Exception - { - ArrayList list = new ArrayList(); - TipoUtilizador t = new TipoUtilizador(); - t.setId(new Integer(0)); - t.setTipo(new Integer(0)); - t.setDescricao(""); - list.add(t); - Statement st = createStatement(); - String sql ="SELECT * FROM tipos_utilizadores WHERE activo = 'y' ORDER BY ordem"; - ResultSet rs = st.executeQuery(sql); - rs.first(); - do - { - t = new TipoUtilizador(); - t.setId(new Integer(rs.getInt("id"))); - t.setTipo(new Integer(rs.getInt("tipo"))); - t.setDescricao(rs.getString("descricao")); - //t.setActivo(rs.getString("activo")); - //t.setOrdem(new Integer(rs.getInt("ordem"))); - list.add(t); - }while(rs.next()); - com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()]; - ListIterator iter = list.listIterator(); - int i = 0; - while(iter.hasNext()) - { - t = (TipoUtilizador) iter.next(); - - listOptions[i] = new Option(t.getTipo(), t.getDescricao()); - i++; - } - return listOptions; - } - - public com.sun.rave.web.ui.model.Option[] getEstabelecimentosList(Integer empresa_id) throws Exception - { - Dblocal dblocal = new Dblocal(); - dblocal.connect(); - Statement stlocal = dblocal.createStatement(); - ArrayList list = new ArrayList(); - Estabelecimento e = new Estabelecimento(); - e.setId(new Integer(0)); - e.setNome_plain(""); - list.add(e); - String sql ="SELECT * FROM estabelecimentos WHERE empresa_id = " + empresa_id; - ResultSet rslocal = stlocal.executeQuery(sql); - rslocal.first(); - do - { - e = new Estabelecimento(); - e.setId(new Integer(rslocal.getInt("id"))); - e.setNome_plain(rslocal.getString("nome_plain")); - //t.setActivo(rs.getString("activo")); - //t.setOrdem(new Integer(rs.getInt("ordem"))); - list.add(e); - }while(rslocal.next()); - com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()]; - ListIterator iter = list.listIterator(); - int i = 0; - while(iter.hasNext()) - { - e = (Estabelecimento) iter.next(); - - listOptions[i] = new Option(e.getId(), e.getNome_plain()); - i++; - } - dblocal.close(); - return listOptions; - } - - public com.sun.rave.web.ui.model.Option[] getMedicosList() throws Exception - { - Dblocal dblocal = new Dblocal(); - dblocal.connect(); - Statement stlocal = dblocal.createStatement(); - ArrayList list = new ArrayList(); - Medico m = new Medico(); - m.setId(new Integer(0)); - m.setNome(""); - list.add(m); - String sql ="SELECT * FROM medicos WHERE inactivo = 'n'"; - ResultSet rslocal = stlocal.executeQuery(sql); - rslocal.first(); - do - { - m = new Medico(); - m.setId(new Integer(rslocal.getInt("id"))); - m.setNome(rslocal.getString("nome")); - list.add(m); - }while(rslocal.next()); - com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()]; - ListIterator iter = list.listIterator(); - int i = 0; - while(iter.hasNext()) - { - m = (Medico) iter.next(); - - listOptions[i] = new Option(m.getId(), Utils.unicodeToHTML(m.getNome())); - i++; - } - dblocal.close(); - return listOptions; - } - - public com.sun.rave.web.ui.model.Option[] getTecnicosSaudeList() throws Exception - { - Dblocal dblocal = new Dblocal(); - dblocal.connect(); - Statement stlocal = dblocal.createStatement(); - ArrayList list = new ArrayList(); - TecnicoSaude t = new TecnicoSaude(); - t.setId(new Integer(0)); - t.setNome(""); - list.add(t); - String sql ="SELECT * FROM marcacoes_tecnicos_hst WHERE inactivo = 'n'"; - ResultSet rslocal = stlocal.executeQuery(sql); - rslocal.first(); - do - { - t = new TecnicoSaude(); - t.setId(new Integer(rslocal.getInt("id"))); - t.setNome(rslocal.getString("nome")); - list.add(t); - }while(rslocal.next()); - com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()]; - ListIterator iter = list.listIterator(); - int i = 0; - while(iter.hasNext()) - { - t = (TecnicoSaude) iter.next(); - - listOptions[i] = new Option(t.getId(), Utils.unicodeToHTML(t.getNome())); - i++; - } - dblocal.close(); - return listOptions; - } - - private String getFase(int estado) - { - if(estado == ESTADO_SEG) - { - return "Abertura"; - } - else if(estado == ESTADO_RH1) - { - return "Acompanhamento"; - } - else if(estado == ESTADO_HS) - { - return "Recomendações"; - } - else if(estado == ESTADO_RH2) - { - return "Medidas"; - } - else if(estado == ESTADO_MEDICO) - { - return "Consulta"; - } - else if(estado == ESTADO_ASSINATURAS) - { - return "Verificação"; - } - else if(estado == ESTADO_IMPRESSAO) - { - return "Impressão"; - } - else if(estado == ESTADO_FECHAR) - { - return "Conclusão"; - } - return null; - } - - private Statement createStatement() - { - Db db = new Db(); - return db.createStatement(); - } - -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/db/AnalisesSeguimentoDataProvider.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/db/AnalisesSeguimentoDataProvider.java deleted file mode 100644 index a5f9052a..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/db/AnalisesSeguimentoDataProvider.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * AnalisesSeguimentoDataProvider.java - * - * Created on September 20, 2007, 1:42 PM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package db; - -import com.sun.data.provider.impl.ObjectListDataProvider; - -/** - * - * @author lluis - */ -public class AnalisesSeguimentoDataProvider extends ObjectListDataProvider { - - /** Creates a new instance of AnalisesSeguimentoDataProvider */ - public AnalisesSeguimentoDataProvider() { - } - -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/db/Db.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/db/Db.java deleted file mode 100644 index 20590852..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/db/Db.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Db.java - * - * Created on September 19, 2007, 5:10 PM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package db; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.ResultSet; -import java.sql.Statement; -import javax.faces.context.FacesContext; -import javax.servlet.http.HttpSession; - -/** - * - * @author lluis - */ -public class Db { - String connectionURL = "jdbc:postgresql://storage:5432/siprp"; - String User = "postgres"; - String Pass = null; - Connection connection = null; - - /** Creates a new instance of Db */ - public Db() { - } - - public Connection connect() throws Exception - { - Class.forName("org.postgresql.Driver").newInstance(); - connection = DriverManager.getConnection(connectionURL, User, Pass); - HttpSession session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(true); - session.setAttribute("connection", connection); - return connection; - } - - public Statement createStatement() - { - HttpSession session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(false); - connection = (Connection) session.getAttribute("connection"); - Statement st; - try - { - st = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); - return st; - } - catch(Exception ex) - { - ex.printStackTrace(); - return null; - } - } -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/db/Dblocal.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/db/Dblocal.java deleted file mode 100644 index cb88d313..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/db/Dblocal.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Dblocal.java - * - * Created on September 20, 2007, 2:07 PM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package db; - -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.ResultSet; -import java.sql.Statement; -import javax.faces.context.FacesContext; -import javax.servlet.http.HttpSession; - -/** - * - * @author lluis - */ -public class Dblocal { - String connectionURL = "jdbc:postgresql://storage:5432/siprp_local"; - String User = "postgres"; - String Pass = null; - Connection connection = null; - - /** Creates a new instance of Dblocal */ - public Dblocal() { - } - - public Connection connect() throws Exception - { - Class.forName("org.postgresql.Driver").newInstance(); - connection = DriverManager.getConnection(connectionURL, User, Pass); - HttpSession session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(true); - session.setAttribute("connection_local", connection); - return connection; - } - - public Statement createStatement() - { - HttpSession session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(false); - connection = (Connection) session.getAttribute("connection_local"); - Statement st; - try - { - st = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); - return st; - } - catch(Exception ex) - { - ex.printStackTrace(); - return null; - } - } - - public void close() throws Exception - { - connection.close(); - } - -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/db/TrabalhadoresListDataProvider.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/db/TrabalhadoresListDataProvider.java deleted file mode 100644 index 0edc8ae4..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/db/TrabalhadoresListDataProvider.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * TrabalhadoresListDataProvider.java - * - * Created on September 26, 2007, 4:25 PM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package db; - -import com.sun.data.provider.impl.ObjectListDataProvider; - -/** - * - * @author lluis - */ -public class TrabalhadoresListDataProvider extends ObjectListDataProvider { - - /** Creates a new instance of TrabalhadoresListDataProvider */ - public TrabalhadoresListDataProvider() { - } - -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/db/UtilizadoresDataProvider.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/db/UtilizadoresDataProvider.java deleted file mode 100644 index 3464a514..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/db/UtilizadoresDataProvider.java +++ /dev/null @@ -1,275 +0,0 @@ -/* - * UtilizadoresDataProvider.java - * - * Created on September 20, 2007, 10:03 AM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package db; - -import analiseacidentestrabalho.Medico; -import analiseacidentestrabalho.Permissao; -import analiseacidentestrabalho.TecnicoSaude; -import analiseacidentestrabalho.Utilizador; -import com.sun.rave.web.ui.model.Option; -import java.sql.ResultSet; -import java.sql.Statement; -import java.util.ArrayList; -import java.util.ListIterator; -import utils.Utils; - -/** - * - * @author lluis - */ -public class UtilizadoresDataProvider { - - /** Creates a new instance of UtilizadoresDataProvider */ - public UtilizadoresDataProvider() { - } - - public Integer getMaxUserId() - { - Statement st = createStatement(); - String sql = "SELECT max(utilizadores.id)+1 AS MAXUSERID FROM utilizadores"; - try - { - ResultSet rs = st.executeQuery(sql); - rs.first(); - Integer newId = new Integer(rs.getInt("MAXUSERID")); - if(newId.intValue() == 0) - { - newId = new Integer(1); - } - return newId; - } - catch(Exception ex) - { - ex.printStackTrace(); - return new Integer(1); - } - } - - public Integer createNewUtilizador(Utilizador u) throws Exception - { - Statement st = createStatement(); - Integer newUserId = getMaxUserId(); - - String sql = "INSERT INTO utilizadores (id, login, password, email, empresa_id, estabelecimento_id, administrador, tipo, numero_cedula, cap, nome, medico_id, funcionario_hst_id, activo) VALUES (" + newUserId + ", '" + u.getLogin() + "', '" + u.getPassword() + "', '" + u.getEmail() + "', " + u.getEmpresa_id() + ", " + u.getEstabelecimento_id() + ", '" + u.getAdministrador() + "', " + u.getTipo() + ", '" + u.getNumero_cedula() + "', '" + u.getCap() + "', '" + u.getNome() + "', " + u.getMedico_id() + ", " + u.getFuncionario_hst_id() + ", '" + u.getActivo() + "')"; - System.out.println("SQL CREATE : " + sql); - st.execute(sql); - return newUserId; - } - - public void updateUtilizador(Utilizador u) throws Exception - { - Statement st = createStatement(); - String sql = "UPDATE utilizadores SET login = '" + u.getLogin() + "', password = '" + u.getPassword() + "', email = '" + u.getEmail() + "', empresa_id = " + u.getEmpresa_id() + ", estabelecimento_id = " + u.getEstabelecimento_id() + ", administrador = '" + u.getAdministrador() + "', tipo = " + u.getTipo() + ", numero_cedula = '" + u.getNumero_cedula() + "', cap = '" + u.getCap() + "', nome = '" + u.getNome() + "', medico_id = " + u.getMedico_id() + ", funcionario_hst_id = " + u.getFuncionario_hst_id() + ", activo = '" + u.getActivo() + "' WHERE id = " + u.getId(); - st.execute(sql); - } - - public void deleteUser(Integer userId) throws Exception - { - Statement st = createStatement(); - String sql = "UPDATE utilizadores SET activo = 'n' WHERE id = " + userId; - st.execute(sql); - } - - public Utilizador getUtilizador(String login) throws Exception - { - Utilizador u = new Utilizador(); - Statement st = createStatement(); - String sql = "SELECT * FROM utilizadores WHERE login = '" + login + "'"; - ResultSet rs = st.executeQuery(sql); - rs.first(); - u.setId(new Integer(rs.getInt("id"))); - u.setLogin(rs.getString("login")); - u.setPassword(rs.getString("password")); - u.setEmail(rs.getString("email")); - u.setEmpresa_id(new Integer(rs.getInt("empresa_id"))); - u.setEstabelecimento_id(new Integer(rs.getInt("estabelecimento_id"))); - u.setAdministrador(rs.getString("administrador")); - u.setTipo(new Integer(rs.getInt("tipo"))); - u.setNumero_cedula(rs.getString("numero_cedula")); - u.setCap(rs.getString("cap")); - u.setNome(rs.getString("nome")); - u.setMedico_id(new Integer(rs.getInt("medico_id"))); - u.setFuncionario_hst_id(new Integer(rs.getInt("funcionario_hst_id"))); - u.setActivo(rs.getString("activo")); - return u; - } - - public Utilizador getUtilizador(Integer id) throws Exception - { - Utilizador u = new Utilizador(); - Statement st = createStatement(); - String sql = "SELECT * FROM utilizadores WHERE id = " + id; - ResultSet rs = st.executeQuery(sql); - rs.first(); - u.setId(new Integer(rs.getInt("id"))); - u.setLogin(rs.getString("login")); - u.setPassword(rs.getString("password")); - u.setEmail(rs.getString("email")); - u.setEmpresa_id(new Integer(rs.getInt("empresa_id"))); - u.setEstabelecimento_id(new Integer(rs.getInt("estabelecimento_id"))); - u.setAdministrador(rs.getString("administrador")); - u.setTipo(new Integer(rs.getInt("tipo"))); - u.setNumero_cedula(rs.getString("numero_cedula")); - u.setCap(rs.getString("cap")); - u.setNome(rs.getString("nome")); - u.setMedico_id(new Integer(rs.getInt("medico_id"))); - u.setFuncionario_hst_id(new Integer(rs.getInt("funcionario_hst_id"))); - u.setActivo(rs.getString("activo")); - return u; - } - - public ArrayList getUtilizadoresListByTipo(Integer tipo) throws Exception - { - ArrayList list = new ArrayList(); - Statement st = createStatement(); - String sql = "SELECT * FROM utilizadores WHERE tipo = " + tipo; - ResultSet rs = st.executeQuery(sql); - rs.first(); - do - { - Utilizador u = new Utilizador(); - u.setId(new Integer(rs.getInt("id"))); - u.setLogin(rs.getString("login")); - u.setPassword(rs.getString("password")); - u.setEmail(rs.getString("email")); - u.setEmpresa_id(new Integer(rs.getInt("empresa_id"))); - u.setEstabelecimento_id(new Integer(rs.getInt("estabelecimento_id"))); - u.setAdministrador(rs.getString("administrador")); - u.setTipo(new Integer(rs.getInt("tipo"))); - u.setNumero_cedula(rs.getString("numero_cedula")); - u.setCap(rs.getString("cap")); - u.setNome(rs.getString("nome")); - u.setMedico_id(new Integer(rs.getInt("medico_id"))); - u.setFuncionario_hst_id(new Integer(rs.getInt("funcionario_hst_id"))); - u.setActivo(rs.getString("activo")); - list.add(u); - }while(rs.next()); - return list; - } - - public com.sun.rave.web.ui.model.Option[] getMedicosList() throws Exception - { -// Dblocal dblocal = new Dblocal(); -// dblocal.connect(); -// Statement stlocal = dblocal.createStatement(); - Statement st = createStatement(); - ArrayList list = new ArrayList(); - Medico m = new Medico(); - m.setId(new Integer(0)); - m.setNome(""); - list.add(m); - String sql ="SELECT * FROM utilizadores WHERE activo = 'y' AND tipo = 5"; - ResultSet rs = st.executeQuery(sql); - rs.first(); - do - { - m = new Medico(); - m.setId(new Integer(rs.getInt("id"))); - m.setNome(Utils.unicodeToHTML(rs.getString("nome"))); - list.add(m); - }while(rs.next()); - com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()]; - ListIterator iter = list.listIterator(); - int i = 0; - while(iter.hasNext()) - { - m = (Medico) iter.next(); - - listOptions[i] = new Option(m.getId(), Utils.unicodeToHTML(m.getNome())); - i++; - } -// dblocal.close(); - return listOptions; - } - - public com.sun.rave.web.ui.model.Option[] getTecnicosSaudeList() throws Exception - { -// Dblocal dblocal = new Dblocal(); -// dblocal.connect(); -// Statement stlocal = dblocal.createStatement(); - Statement st = createStatement(); - ArrayList list = new ArrayList(); - TecnicoSaude t = new TecnicoSaude(); - t.setId(new Integer(0)); - t.setNome(""); - list.add(t); - String sql ="SELECT * FROM utilizadores WHERE activo = 'y' AND tipo = 3"; - ResultSet rs = st.executeQuery(sql); - rs.first(); - do - { - t = new TecnicoSaude(); - t.setId(new Integer(rs.getInt("id"))); - t.setNome(Utils.unicodeToHTML(rs.getString("nome"))); - list.add(t); - }while(rs.next()); - com.sun.rave.web.ui.model.Option[] listOptions = new com.sun.rave.web.ui.model.Option[list.size()]; - ListIterator iter = list.listIterator(); - int i = 0; - while(iter.hasNext()) - { - t = (TecnicoSaude) iter.next(); - - listOptions[i] = new Option(t.getId(), Utils.unicodeToHTML(t.getNome())); - i++; - } -// dblocal.close(); - return listOptions; - } - - public Integer getMaxPermissaoId() - { - Statement st = createStatement(); - String sql = "SELECT max(permissoes.id)+1 AS MAXPERMISSAOID FROM permissoes"; - try - { - ResultSet rs = st.executeQuery(sql); - rs.first(); - Integer newId = new Integer(rs.getInt("MAXPERMISSAOID")); - if(newId.intValue() == 0) - { - newId = new Integer(1); - } - return newId; - } - catch(Exception ex) - { - ex.printStackTrace(); - return new Integer(1); - } - } - - public Integer createPermissao(Permissao p) throws Exception - { - Statement st = createStatement(); - Integer newId = getMaxPermissaoId(); - - String sql = "INSERT INTO permissoes (id, user_id, codigo_permissao) VALUES (" + newId + ", " + p.getUser_id() + ", " + p.getCodigo_permissao() + ")"; - st.execute(sql); - return newId; - } - - public Integer getPermissionCode(Integer userId) throws Exception - { - Statement st = createStatement(); - String sql = "SELECT * FROM permissoes WHERE user_id = " + userId; - ResultSet rs = st.executeQuery(sql); - rs.first(); - Integer permission = new Integer(rs.getInt("codigo_permissao")); - return permission; - } - - private Statement createStatement() - { - Db db = new Db(); - return db.createStatement(); - } - -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/pagestate/AnaliseAcidenteTrabalhoState.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/pagestate/AnaliseAcidenteTrabalhoState.java deleted file mode 100644 index f4aebc98..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/pagestate/AnaliseAcidenteTrabalhoState.java +++ /dev/null @@ -1,391 +0,0 @@ -/* - * AnaliseAcidenteTrabalhoState.java - * - * Created on September 27, 2007, 5:18 PM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package pagestate; - -/** - * - * @author lluis - */ -public class AnaliseAcidenteTrabalhoState { - private int estado; - private Object empresa; - private Object estabelecimento; - private Object trabalhador; - private Object data_nascimento; - - private Object bi; - private Object morada; - private Object cod_postal1; - private Object cod_postal2; - private Object localidade; - private Object contacto_telefonico; - private String turno; - - private Object horas_turno; - private Object seccao; - private Object local_trabalho; - private Integer hours; - private Integer minutes; - private Object tarefa; - private Object substancias; - - private Object superior_hierarquico; - private Object condicoes; - private Object testemunhas; - private Object causas; - private Object descricao; - private Object conclusoes; - private Object accoes; - - - private String formacao_shst; - private Object formacao_shsht_n_why; - private String acidentes_colaborador; - private Object nr_acidentes_colaborador; - private String acidentes_colaboradores; - private Object nr_acidentes_colaboradores; - - private Object nr_relatorio_acidentes_colaborador_1; - private Object nr_relatorio_acidentes_colaborador_2; - private Object nr_relatorio_acidentes_colaborador_3; - private Object nr_relatorio_acidentes_colaborador_4; - - private Object nr_relatorio_acidentes_colaboradores_1; - private Object nr_relatorio_acidentes_colaboradores_2; - private Object nr_relatorio_acidentes_colaboradores_3; - private Object nr_relatorio_acidentes_colaboradores_4; - - /** Creates a new instance of AnaliseAcidenteTrabalhoState */ - public AnaliseAcidenteTrabalhoState() { - } - - public Object getEstabelecimento() { - return estabelecimento; - } - - public void setEstabelecimento(Object estabelecimento) { - this.estabelecimento = estabelecimento; - } - - public Object getTrabalhador() { - return trabalhador; - } - - public void setTrabalhador(Object trabalhador) { - this.trabalhador = trabalhador; - } - - public Object getData_nascimento() { - return data_nascimento; - } - - public void setData_nascimento(Object data_nascimento) { - this.data_nascimento = data_nascimento; - } - - public Object getHoras_turno() { - return horas_turno; - } - - public void setHoras_turno(Object horas_turno) { - this.horas_turno = horas_turno; - } - - public Object getSeccao() { - return seccao; - } - - public void setSeccao(Object seccao) { - this.seccao = seccao; - } - - public Object getLocal_trabalho() { - return local_trabalho; - } - - public void setLocal_trabalho(Object local_trabalho) { - this.local_trabalho = local_trabalho; - } - - public Object getTarefa() { - return tarefa; - } - - public void setTarefa(Object tarefa) { - this.tarefa = tarefa; - } - - public Object getSubstancias() { - return substancias; - } - - public void setSubstancias(Object substancias) { - this.substancias = substancias; - } - - public Object getSuperior_hierarquico() { - return superior_hierarquico; - } - - public void setSuperior_hierarquico(Object superior_hierarquico) { - this.superior_hierarquico = superior_hierarquico; - } - - public Object getCondicoes() { - return condicoes; - } - - public void setCondicoes(Object condicoes) { - this.condicoes = condicoes; - } - - public Object getTestemunhas() { - return testemunhas; - } - - public void setTestemunhas(Object testemunhas) { - this.testemunhas = testemunhas; - } - - public Object getCausas() { - return causas; - } - - public void setCausas(Object causas) { - this.causas = causas; - } - - public Object getDescricao() { - return descricao; - } - - public void setDescricao(Object descricao) { - this.descricao = descricao; - } - - public Object getAccoes() { - return accoes; - } - - public void setAccoes(Object accoes) { - this.accoes = accoes; - } - - public Object getConclusoes() { - return conclusoes; - } - - public void setConclusoes(Object conclusoes) { - this.conclusoes = conclusoes; - } - - public Object getEmpresa() { - return empresa; - } - - public void setEmpresa(Object empresa) { - this.empresa = empresa; - } - - public int getEstado() { - return estado; - } - - public void setEstado(int estado) { - this.estado = estado; - } - - public Object getBi() { - return bi; - } - - public void setBi(Object bi) { - this.bi = bi; - } - - public Object getMorada() { - return morada; - } - - public void setMorada(Object morada) { - this.morada = morada; - } - - public Object getCod_postal1() { - return cod_postal1; - } - - public void setCod_postal1(Object cod_postal1) { - this.cod_postal1 = cod_postal1; - } - - public Object getCod_postal2() { - return cod_postal2; - } - - public void setCod_postal2(Object cod_postal2) { - this.cod_postal2 = cod_postal2; - } - - public Object getLocalidade() { - return localidade; - } - - public void setLocalidade(Object localidade) { - this.localidade = localidade; - } - - public Object getContacto_telefonico() { - return contacto_telefonico; - } - - public void setContacto_telefonico(Object contacto_telefonico) { - this.contacto_telefonico = contacto_telefonico; - } - - public String getTurno() { - return turno; - } - - public void setTurno(String turno) { - this.turno = turno; - } - - public Integer getHours() { - return hours; - } - - public void setHours(Integer hours) { - this.hours = hours; - } - - public Integer getMinutes() { - return minutes; - } - - public void setMinutes(Integer minutes) { - this.minutes = minutes; - } - - public String getFormacao_shst() { - return formacao_shst; - } - - public void setFormacao_shst(String formacao_shst) { - this.formacao_shst = formacao_shst; - } - - public Object getFormacao_shsht_n_why() { - return formacao_shsht_n_why; - } - - public void setFormacao_shsht_n_why(Object formacao_shsht_n_why) { - this.formacao_shsht_n_why = formacao_shsht_n_why; - } - - public String getAcidentes_colaborador() { - return acidentes_colaborador; - } - - public void setAcidentes_colaborador(String acidentes_colaborador) { - this.acidentes_colaborador = acidentes_colaborador; - } - - public Object getNr_acidentes_colaborador() { - return nr_acidentes_colaborador; - } - - public void setNr_acidentes_colaborador(Object nr_acidentes_colaborador) { - this.nr_acidentes_colaborador = nr_acidentes_colaborador; - } - - public String getAcidentes_colaboradores() { - return acidentes_colaboradores; - } - - public void setAcidentes_colaboradores(String acidentes_colaboradores) { - this.acidentes_colaboradores = acidentes_colaboradores; - } - - public Object getNr_acidentes_colaboradores() { - return nr_acidentes_colaboradores; - } - - public void setNr_acidentes_colaboradores(Object nr_acidentes_colaboradores) { - this.nr_acidentes_colaboradores = nr_acidentes_colaboradores; - } - - public Object getNr_relatorio_acidentes_colaborador_1() { - return nr_relatorio_acidentes_colaborador_1; - } - - public void setNr_relatorio_acidentes_colaborador_1(Object nr_relatorio_acidentes_colaborador_1) { - this.nr_relatorio_acidentes_colaborador_1 = nr_relatorio_acidentes_colaborador_1; - } - - public Object getNr_relatorio_acidentes_colaborador_2() { - return nr_relatorio_acidentes_colaborador_2; - } - - public void setNr_relatorio_acidentes_colaborador_2(Object nr_relatorio_acidentes_colaborador_2) { - this.nr_relatorio_acidentes_colaborador_2 = nr_relatorio_acidentes_colaborador_2; - } - - public Object getNr_relatorio_acidentes_colaborador_3() { - return nr_relatorio_acidentes_colaborador_3; - } - - public void setNr_relatorio_acidentes_colaborador_3(Object nr_relatorio_acidentes_colaborador_3) { - this.nr_relatorio_acidentes_colaborador_3 = nr_relatorio_acidentes_colaborador_3; - } - - public Object getNr_relatorio_acidentes_colaborador_4() { - return nr_relatorio_acidentes_colaborador_4; - } - - public void setNr_relatorio_acidentes_colaborador_4(Object nr_relatorio_acidentes_colaborador_4) { - this.nr_relatorio_acidentes_colaborador_4 = nr_relatorio_acidentes_colaborador_4; - } - - public Object getNr_relatorio_acidentes_colaboradores_1() { - return nr_relatorio_acidentes_colaboradores_1; - } - - public void setNr_relatorio_acidentes_colaboradores_1(Object nr_relatorio_acidentes_colaboradores_1) { - this.nr_relatorio_acidentes_colaboradores_1 = nr_relatorio_acidentes_colaboradores_1; - } - - public Object getNr_relatorio_acidentes_colaboradores_2() { - return nr_relatorio_acidentes_colaboradores_2; - } - - public void setNr_relatorio_acidentes_colaboradores_2(Object nr_relatorio_acidentes_colaboradores_2) { - this.nr_relatorio_acidentes_colaboradores_2 = nr_relatorio_acidentes_colaboradores_2; - } - - public Object getNr_relatorio_acidentes_colaboradores_3() { - return nr_relatorio_acidentes_colaboradores_3; - } - - public void setNr_relatorio_acidentes_colaboradores_3(Object nr_relatorio_acidentes_colaboradores_3) { - this.nr_relatorio_acidentes_colaboradores_3 = nr_relatorio_acidentes_colaboradores_3; - } - - public Object getNr_relatorio_acidentes_colaboradores_4() { - return nr_relatorio_acidentes_colaboradores_4; - } - - public void setNr_relatorio_acidentes_colaboradores_4(Object nr_relatorio_acidentes_colaboradores_4) { - this.nr_relatorio_acidentes_colaboradores_4 = nr_relatorio_acidentes_colaboradores_4; - } - - - -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/pdf/Pdf.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/pdf/Pdf.java deleted file mode 100644 index e02f8c17..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/pdf/Pdf.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Pdf.java - * - * Created on November 13, 2007, 11:33 AM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package pdf; - -import analiseacidentestrabalho.Acidentado; -import analiseacidentestrabalho.AnaliseAcidente; -import com.lowagie.text.Chunk; -import com.lowagie.text.Document; -import com.lowagie.text.Font; -import com.lowagie.text.FontFactory; -import com.lowagie.text.Paragraph; -import com.lowagie.text.Rectangle; -import com.lowagie.text.pdf.BaseFont; -import com.lowagie.text.pdf.PdfAction; -import com.lowagie.text.pdf.PdfPCell; -import com.lowagie.text.pdf.PdfPTable; -import com.lowagie.text.pdf.PdfWriter; -import db.AnalisesDataProvider; -import java.awt.Color; -import java.io.FileOutputStream; -import javax.faces.context.FacesContext; - -/** - * - * @author lluis - */ -public class Pdf { - - PdfPCell cell = null; - Paragraph p = null; - private final static int FONT_SIZE = 5; - /** Creates a new instance of Pdf */ - public Pdf() { - } - - public void generatePdf(String folder, AnaliseAcidente a) - { - PdfPTable table = null; - FacesContext ctx = FacesContext.getCurrentInstance(); - ////HttpServletResponse response = (HttpServletResponse)ctx.getExternalContext().getResponse(); - Document document = new Document(); - ////response.setContentType("application/pdf"); - - try - { - ////PdfWriter writer = PdfWriter.getInstance(document, response.getOutputStream()); - PdfWriter.getInstance(document, new FileOutputStream(folder + "/" + a.getId().toString() + ".pdf")); - document.open(); - //document.add(new Paragraph("Hello World")); - //document.add(new Paragraph(new Date().toString())); - - table = createTableEmpresa(a); - document.add(table); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - document.close(); - } - - private PdfPTable createTableHeader(AnaliseAcidente a) - { - PdfPTable table = new PdfPTable(3); - return table; - } - - private PdfPTable createTableEmpresa(AnaliseAcidente a) - { - String empresa_str = ""; - String estabelecimento_str = ""; - String trabalhador_str = ""; - AnalisesDataProvider adp = new AnalisesDataProvider(); - try - { - String nome_empresa = adp.getEmpresaNome(a.getEmpresa_id()); - empresa_str = utils.Utils.unicodeToHTML(nome_empresa); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - try - { - estabelecimento_str = adp.getEstabelecimentoNome(a.getEstabelecimento_id()); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - Acidentado ac = null; - try - { - ac = adp.getAcidentado(a.getAcidentado_id()); - trabalhador_str = ac.getNome(); - } - catch(Exception ex) - { - ex.printStackTrace(); - } - - //TableEvents event = new TableEvents(); - - float[] widths = { 1f, 4f }; - PdfPTable table = new PdfPTable(widths); - table.getDefaultCell().setBorder(Rectangle.LEFT | Rectangle.RIGHT | Rectangle.TOP | Rectangle.BOTTOM); - //PdfPCell cell = new PdfPCell(new Paragraph("header with colspan 3")); - //cell.setColspan(3); - //table.addCell(cell); - - - - - cell = new PdfPCell(new Paragraph("Empresa:", FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED, FONT_SIZE))); - cell.setBorder(Rectangle.NO_BORDER); - cell.setBackgroundColor(new Color(102, 133, 151)); - table.addCell(cell); - - cell = new PdfPCell(new Paragraph(empresa_str, FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED, FONT_SIZE, Font.NORMAL, new Color(255, 255, 255)) )); - cell.setBorder(Rectangle.NO_BORDER); - cell.setBackgroundColor(new Color(102, 133, 151)); - table.addCell(cell); - - cell = new PdfPCell(new Paragraph("Estabelecimento:", FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED, FONT_SIZE))); - cell.setBorder(Rectangle.NO_BORDER); - cell.setBackgroundColor(new Color(102, 133, 151)); - table.addCell(cell); - - cell = new PdfPCell(new Paragraph(estabelecimento_str, FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED, FONT_SIZE, Font.NORMAL, new Color(255, 255, 255)))); - cell.setBorder(Rectangle.NO_BORDER); - cell.setBackgroundColor(new Color(102, 133, 151)); - table.addCell(cell); - - cell = new PdfPCell(new Paragraph("Trabalhador:", FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED, FONT_SIZE))); - cell.setBorder(Rectangle.NO_BORDER); - cell.setBackgroundColor(new Color(102, 133, 151)); - - table.addCell(cell); - - cell = new PdfPCell(new Paragraph(trabalhador_str, FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED, FONT_SIZE, Font.NORMAL, new Color(255, 255, 255)))); - cell.setBorder(Rectangle.NO_BORDER); - cell.setBackgroundColor(new Color(102, 133, 151)); - table.addCell(cell); - table.getDefaultCell().setBackgroundColor(new Color(102, 133, 151)); - table.getDefaultCell().setPadding(0f); - table.setSpacingAfter(0f); - table.setSpacingBefore(0f); - return table; - } - - private PdfPTable createTableEmpresaHs(AnaliseAcidente a) - { - PdfPTable table = new PdfPTable(3); - return table; - } - - - - -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/utils/Strings.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/utils/Strings.java deleted file mode 100644 index 1fbfc2d0..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/utils/Strings.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Strings.java - * - * Created on October 8, 2007, 9:17 AM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package utils; - -/** - * - * @author lluis - */ -public class Strings { - public static String unicodeToHTML( String text ) - { - if( text == null || text.length() < 6 ) - { - return text; - } - - String output = text; - output = output.replace( "\\u0009", " " ); - output = output.replace( "\\u000a", "
" ); - - output = output.replace( "\\u00a0", " " ); - output = output.replace( "\\u00aa", "ª" ); - output = output.replace( "\\u00ba", "º" ); - - output = output.replace( "\\u00c0", "À" ); - output = output.replace( "\\u00c1", "Á" ); - output = output.replace( "\\u00c2", "Â" ); - output = output.replace( "\\u00c3", "Ã" ); - output = output.replace( "\\u00c7", "Ç" ); - output = output.replace( "\\u00c8", "È" ); - output = output.replace( "\\u00c9", "É" ); - - output = output.replace( "\\u00ca", "Ê" ); - output = output.replace( "\\u00cc", "Ì" ); - output = output.replace( "\\u00cd", "Í" ); - output = output.replace( "\\u00ce", "Î" ); - output = output.replace( "\\u00d2", "ò" ); - output = output.replace( "\\u00d3", "ó" ); - output = output.replace( "\\u00d4", "ô" ); - output = output.replace( "\\u00d5", "õ" ); - output = output.replace( "\\u00d9", "Ù" ); - output = output.replace( "\\u00da", "Ú" ); - output = output.replace( "\\u00db", "Û" ); - - output = output.replace( "\\u00e0", "à" ); - output = output.replace( "\\u00e1", "á" ); - output = output.replace( "\\u00e2", "â" ); - output = output.replace( "\\u00e3", "ã" ); - output = output.replace( "\\u00e7", "ç" ); - output = output.replace( "\\u00e8", "è" ); - output = output.replace( "\\u00e9", "é" ); - output = output.replace( "\\u00ea", "ê" ); - output = output.replace( "\\u00ec", "ì" ); - output = output.replace( "\\u00ed", "í" ); - output = output.replace( "\\u00ee", "î" ); - output = output.replace( "\\u00f2", "ò" ); - output = output.replace( "\\u00f3", "ó" ); - output = output.replace( "\\u00f4", "ô" ); - output = output.replace( "\\u00f5", "õ" ); - output = output.replace( "\\u00f9", "ù" ); - output = output.replace( "\\u00fa", "ú" ); - output = output.replace( "\\u00fb", "û" ); - - output = output.replace( "\\u0153", "œ" ); - - output = output.replace( "\\u2013", "-" ); - output = output.replace( "\\u2014", "-" ); - output = output.replace( "\\u2018|\\u2019", "'" ); - output = output.replace( "\\u201c|\\u201d", "\"" ); - - output = output.replace( "\\u2022", "*" ); - output = output.replace( "\\u2026", "..." ); - - return output; - } - - public static String textToUnicode( String text ) - { - String output = text; - output = output.replace( "À", "\\u00c0" ); - output = output.replace( "Á", "\\u00c1" ); - output = output.replace( "Â", "\\u00c2" ); - output = output.replace( "Ã", "\\u00c3" ); - output = output.replace( "Ç", "\\u00c7" ); - output = output.replace( "È", "\\u00c8" ); - output = output.replace( "É", "\\u00c9" ); - - output = output.replace( "Ê", "\\u00ca" ); - output = output.replace( "Ì", "\\u00cc" ); - output = output.replace( "Í", "\\u00cd" ); - output = output.replace( "Î", "\\u00ce" ); - output = output.replace( "ò", "\\u00d2" ); - output = output.replace( "ó", "\\u00d3" ); - output = output.replace( "ô", "\\u00d4" ); - output = output.replace( "õ", "\\u00d5" ); - output = output.replace( "Ù", "\\u00d9" ); - output = output.replace( "Ú", "\\u00da" ); - output = output.replace( "Û", "\\u00db" ); - - output = output.replace( "à", "\\u00e0" ); - output = output.replace( "á", "\\u00e1" ); - output = output.replace( "â", "\\u00e2" ); - output = output.replace( "ã", "\\u00e3" ); - output = output.replace( "ç", "\\u00e7" ); - output = output.replace( "è", "\\u00e8" ); - output = output.replace( "é", "\\u00e9" ); - output = output.replace( "ê", "\\u00ea" ); - output = output.replace( "ì", "\\u00ec" ); - output = output.replace( "í", "\\u00ed" ); - output = output.replace( "î", "\\u00ee" ); - output = output.replace( "ò", "\\u00f2" ); - output = output.replace( "ó", "\\u00f3" ); - output = output.replace( "ô", "\\u00f4" ); - output = output.replace( "õ", "\\u00f5" ); - output = output.replace( "ù", "\\u00f9" ); - output = output.replace( "ú", "\\u00fa" ); - output = output.replace( "û", "\\u00fb" ); - - return output; - } - - public static String RTFToUnicode( String text ) - { - if( text == null || text.length() < 4 ) - { - return text; - } - String output = text; - output = output.replaceAll( "\\'", "\\u00" ); - return output; - } - - public static String unicodeToRTF( String text ) - { - if( text == null || text.length() < 6 ) - { - return text; - } - String output = text; - output = output.replaceAll( "\\\\u00", "\\\\'" ); - return output; - } - -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/utils/Utils.java b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/utils/Utils.java deleted file mode 100644 index be0aabdb..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/src/java/utils/Utils.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Utils.java - * - * Created on October 12, 2007, 9:39 AM - * - * To change this template, choose Tools | Template Manager - * and open the template in the editor. - */ - -package utils; - -import java.text.SimpleDateFormat; -import java.util.Calendar; -import java.util.Date; -import java.util.GregorianCalendar; - -/** - * - * @author lluis - */ -public class Utils { - - /** Creates a new instance of Utils */ - public Utils() { - } - - public static String unicodeToHTML( String text ) - { - if( text == null || text.length() < 6 ) - { - return text; - } - - String output = text; - output = output.replace( "\\u0009", " " ); - output = output.replace( "\\u000a", "
" ); - - output = output.replace( "\\u00a0", " " ); - output = output.replace( "\\u00aa", "ª" ); - output = output.replace( "\\u00ba", "º" ); - - output = output.replace( "\\u00c0", "À" ); - output = output.replace( "\\u00c1", "Á" ); - output = output.replace( "\\u00c2", "Â" ); - output = output.replace( "\\u00c3", "Ã" ); - output = output.replace( "\\u00c7", "Ç" ); - output = output.replace( "\\u00c8", "È" ); - output = output.replace( "\\u00c9", "É" ); - - output = output.replace( "\\u00ca", "Ê" ); - output = output.replace( "\\u00cc", "Ì" ); - output = output.replace( "\\u00cd", "Í" ); - output = output.replace( "\\u00ce", "Î" ); - output = output.replace( "\\u00d2", "ò" ); - output = output.replace( "\\u00d3", "ó" ); - output = output.replace( "\\u00d4", "ô" ); - output = output.replace( "\\u00d5", "õ" ); - output = output.replace( "\\u00d9", "Ù" ); - output = output.replace( "\\u00da", "Ú" ); - output = output.replace( "\\u00db", "Û" ); - - output = output.replace( "\\u00e0", "à" ); - output = output.replace( "\\u00e1", "á" ); - output = output.replace( "\\u00e2", "â" ); - output = output.replace( "\\u00e3", "ã" ); - output = output.replace( "\\u00e7", "ç" ); - output = output.replace( "\\u00e8", "è" ); - output = output.replace( "\\u00e9", "é" ); - output = output.replace( "\\u00ea", "ê" ); - output = output.replace( "\\u00ec", "ì" ); - output = output.replace( "\\u00ed", "í" ); - output = output.replace( "\\u00ee", "î" ); - output = output.replace( "\\u00f2", "ò" ); - output = output.replace( "\\u00f3", "ó" ); - output = output.replace( "\\u00f4", "ô" ); - output = output.replace( "\\u00f5", "õ" ); - output = output.replace( "\\u00f9", "ù" ); - output = output.replace( "\\u00fa", "ú" ); - output = output.replace( "\\u00fb", "û" ); - - output = output.replace( "\\u0153", "œ" ); - - output = output.replace( "\\u2013", "-" ); - output = output.replace( "\\u2014", "-" ); - output = output.replace( "\\u2018|\\u2019", "'" ); - output = output.replace( "\\u201c|\\u201d", "\"" ); - - output = output.replace( "\\u2022", "*" ); - output = output.replace( "\\u2026", "..." ); - - return output; - } - - public static String getPageFrom(String referer) - { - String pageFrom = referer.substring(referer.lastIndexOf("/")+1); - return pageFrom; - } - - public static boolean isValidEmail(String email){ - boolean res = true; - - int indexOfAtChar=email.indexOf("@"); - - if(indexOfAtChar > 0) - { - int indexOfDotChar = - email.indexOf(".",indexOfAtChar); - if(indexOfDotChar > 0) - { - res = true; - } - else - { - res = false; - } - } - else{ - res = false; - } - return res; - } - - public static String dateToYYYYMMDD(Date ddate) - { - Calendar cal = new GregorianCalendar(); - cal.setTime(ddate); - SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd"); - String date_str = dateFormat.format(cal.getTime()); - return date_str; - } - -} diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/AnaliseAcidenteTrabalho.jsp b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/AnaliseAcidenteTrabalho.jsp deleted file mode 100644 index 905a46cb..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/AnaliseAcidenteTrabalho.jsp +++ /dev/null @@ -1,1190 +0,0 @@ - - - - - - - - - - - - - - º/*->aAAs>zxcv&nbsp; . - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/Dummy.jsp b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/Dummy.jsp deleted file mode 100644 index 3c8c070e..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/Dummy.jsp +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/Erro.jsp b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/Erro.jsp deleted file mode 100644 index 6c54bd5e..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/Erro.jsp +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/FichaUtilizador.jsp b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/FichaUtilizador.jsp deleted file mode 100644 index 419ce188..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/FichaUtilizador.jsp +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/Footer.jspf b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/Footer.jspf deleted file mode 100644 index f4eb9342..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/Footer.jspf +++ /dev/null @@ -1,12 +0,0 @@ - -
- - - - - - - - - -
diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/FormHS.jsp b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/FormHS.jsp deleted file mode 100644 index 31f98e17..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/FormHS.jsp +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/FormMedico.jsp b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/FormMedico.jsp deleted file mode 100644 index a99d509a..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/FormMedico.jsp +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/FormRH.jsp b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/FormRH.jsp deleted file mode 100644 index 92d5582e..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/FormRH.jsp +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/FormSeguranca.jsp b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/FormSeguranca.jsp deleted file mode 100644 index 645369c5..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/FormSeguranca.jsp +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/Header.jspf b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/Header.jspf deleted file mode 100644 index fd3167a8..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/Header.jspf +++ /dev/null @@ -1,8 +0,0 @@ - -
- - - - - -
diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/LoadImage.jsp b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/LoadImage.jsp deleted file mode 100644 index 412d4e27..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/LoadImage.jsp +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - -
- -
- - - - - - - - - - - - - - - - - - - - - - -
-
-
-
-
-
diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/Login.jsp b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/Login.jsp deleted file mode 100644 index 97e50fd9..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/Login.jsp +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
-
-
-
-
-
diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/META-INF/context.xml b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/META-INF/context.xml deleted file mode 100644 index e3929bc2..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/META-INF/context.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/RecuperarPassword.jsp b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/RecuperarPassword.jsp deleted file mode 100644 index 72cd236b..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/RecuperarPassword.jsp +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
-
-
-
-
-
diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/Top.jspf b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/Top.jspf deleted file mode 100644 index a35f7542..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/Top.jspf +++ /dev/null @@ -1,19 +0,0 @@ - -
- - - - - - - - - - - - - - - -
diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/ViewAnaliseAcidenteTrabalho.jsp b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/ViewAnaliseAcidenteTrabalho.jsp deleted file mode 100644 index a0ee7a26..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/ViewAnaliseAcidenteTrabalho.jsp +++ /dev/null @@ -1,302 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/WEB-INF/faces-config.xml b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/WEB-INF/faces-config.xml deleted file mode 100644 index 8f46eebf..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/WEB-INF/faces-config.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/WEB-INF/managed-beans.xml b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/WEB-INF/managed-beans.xml deleted file mode 100644 index cf67abaf..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/WEB-INF/managed-beans.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - SessionBean1 - analiseacidentestrabalho.SessionBean1 - session - - - Login - analiseacidentestrabalho.Login - request - - - ApplicationBean1 - analiseacidentestrabalho.ApplicationBean1 - application - - - RequestBean1 - analiseacidentestrabalho.RequestBean1 - request - - - RecuperarPassword - analiseacidentestrabalho.RecuperarPassword - request - - - Header - analiseacidentestrabalho.Header - request - - - Dummy - analiseacidentestrabalho.Dummy - request - - - Footer - analiseacidentestrabalho.Footer - request - - - FormSeguranca - analiseacidentestrabalho.FormSeguranca - request - - - Erro - analiseacidentestrabalho.Erro - request - - - Top - analiseacidentestrabalho.Top - request - - - LoadImage - analiseacidentestrabalho.LoadImage - request - - - AnaliseAcidenteTrabalho - analiseacidentestrabalho.AnaliseAcidenteTrabalho - request - - - ViewAnaliseAcidenteTrabalho - analiseacidentestrabalho.ViewAnaliseAcidenteTrabalho - request - - - FormRH - analiseacidentestrabalho.FormRH - request - - - FormHS - analiseacidentestrabalho.FormHS - request - - - FichaUtilizador - analiseacidentestrabalho.FichaUtilizador - request - - - FormMedico - analiseacidentestrabalho.FormMedico - request - - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/WEB-INF/navigation.xml b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/WEB-INF/navigation.xml deleted file mode 100644 index 1002faf6..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/WEB-INF/navigation.xml +++ /dev/null @@ -1,215 +0,0 @@ - - - - - /Login.jsp - - recuperar_password - /RecuperarPassword.jsp - - - erro - /Erro.jsp - - - form_seguranca - /FormSeguranca.jsp - - - form_rh - /FormRH.jsp - - - form_hs - /FormHS.jsp - - - form_medico - /FormMedico.jsp - - - create_user - /FichaUtilizador.jsp - - - - /RecuperarPassword.jsp - - login - /Login.jsp - - - - /FormSeguranca.jsp - - login - /Login.jsp - - - analise_acidente - /AnaliseAcidenteTrabalho.jsp - - - view_analise - /ViewAnaliseAcidenteTrabalho.jsp - - - user - /FichaUtilizador.jsp - - - - /FormRH.jsp - - login - /Login.jsp - - - analise_acidente - /AnaliseAcidenteTrabalho.jsp - - - view_analise - /ViewAnaliseAcidenteTrabalho.jsp - - - user - /FichaUtilizador.jsp - - - - /FormHS.jsp - - login - /Login.jsp - - - analise_acidente - /AnaliseAcidenteTrabalho.jsp - - - view_analise - /ViewAnaliseAcidenteTrabalho.jsp - - - user - /FichaUtilizador.jsp - - - - /FormMedico.jsp - - login - /Login.jsp - - - analise_acidente - /AnaliseAcidenteTrabalho.jsp - - - view_analise - /ViewAnaliseAcidenteTrabalho.jsp - - - user - /FichaUtilizador.jsp - - - - /AnaliseAcidenteTrabalho.jsp - - load_image - /LoadImage.jsp - - - form_seguranca - /FormSeguranca.jsp - - - form_rh - /FormRH.jsp - - - form_hs - /FormHS.jsp - - - form_medico - /FormMedico.jsp - - - user - /FichaUtilizador.jsp - - - login - /Login.jsp - - - - /LoadImage.jsp - - analise_acidente - /AnaliseAcidenteTrabalho.jsp - - - - /FichaUtilizador.jsp - - form_seguranca - /FormSeguranca.jsp - - - form_rh - /FormRH.jsp - - - form_hs - /FormHS.jsp - - - form_medico - /FormMedico.jsp - - - analise_acidente - /AnaliseAcidenteTrabalho.jsp - - - view_analise - /ViewAnaliseAcidenteTrabalho.jsp - - - login - /Login.jsp - - - - /ViewAnaliseAcidenteTrabalho.jsp - - login - /Login.jsp - - - user - /FichaUtilizador.jsp - - - form_seguranca - /FormSeguranca.jsp - - - form_rh - /FormRH.jsp - - - form_hs - /FormHS.jsp - - - form_medico - /FormMedico.jsp - - - diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/WEB-INF/web.xml b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/WEB-INF/web.xml deleted file mode 100644 index b23abf6d..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/WEB-INF/web.xml +++ /dev/null @@ -1,14 +0,0 @@ - -javax.faces.STATE_SAVING_METHODserverjavax.faces.CONFIG_FILES/WEB-INF/navigation.xml,/WEB-INF/managed-beans.xmlcom.sun.faces.validateXmltruecom.sun.faces.verifyObjectsfalseUploadFiltercom.sun.rave.web.ui.util.UploadFilter - The maximum allowed upload size in bytes. If this is set - to a negative value, there is no maximum. The default - value is 1000000. - maxSize1000000 - The size (in bytes) of an uploaded file which, if it is - exceeded, will cause the file to be written directly to - disk instead of stored in memory. Files smaller than or - equal to this size will be stored in memory. The default - value is 4096. - sizeThreshold4096UploadFilterFaces ServletFaces Servletjavax.faces.webapp.FacesServlet 1 ExceptionHandlerServletcom.sun.errorhandler.ExceptionHandlererrorHostlocalhosterrorPort24444ThemeServletcom.sun.rave.web.ui.theme.ThemeServletFaces Servlet/faces/*ExceptionHandlerServlet/error/ExceptionHandlerThemeServlet/theme/* - faces/Login.jsp - javax.servlet.ServletException/error/ExceptionHandlerjava.io.IOException/error/ExceptionHandlerjavax.faces.FacesException/error/ExceptionHandlercom.sun.rave.web.ui.appbase.ApplicationException/error/ExceptionHandler*.jspftrue diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/SIPRP_logo_small.jpg b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/SIPRP_logo_small.jpg deleted file mode 100644 index 240f2358..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/SIPRP_logo_small.jpg and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/black_spacer.gif b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/black_spacer.gif deleted file mode 100644 index d370e341..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/black_spacer.gif and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/logo_auchan_small.jpg b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/logo_auchan_small.jpg deleted file mode 100644 index 376eee0e..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/logo_auchan_small.jpg and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/logo_auchan_small1.jpg b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/logo_auchan_small1.jpg deleted file mode 100644 index f9e50690..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/logo_auchan_small1.jpg and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/logo_evolute_small.png b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/logo_evolute_small.png deleted file mode 100644 index 0198da2b..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/logo_evolute_small.png and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ca2.gif b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ca2.gif deleted file mode 100644 index 97c08970..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ca2.gif and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ca3.gif b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ca3.gif deleted file mode 100644 index 07b00dc5..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ca3.gif and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ext1.gif b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ext1.gif deleted file mode 100644 index 6278e9de..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ext1.gif and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ext2.gif b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ext2.gif deleted file mode 100644 index d50ab9f5..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ext2.gif and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ext3.gif b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ext3.gif deleted file mode 100644 index cb2a14e3..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ext3.gif and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/fle2.gif b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/fle2.gif deleted file mode 100644 index dbf9cb41..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/fle2.gif and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/fle3.gif b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/fle3.gif deleted file mode 100644 index 5406a2be..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/fle3.gif and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/fle4.gif b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/fle4.gif deleted file mode 100644 index 7342e330..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/fle4.gif and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ma10.gif b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ma10.gif deleted file mode 100644 index 94748d7b..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ma10.gif and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ma2.gif b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ma2.gif deleted file mode 100644 index a1f65bf0..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ma2.gif and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ma3.gif b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ma3.gif deleted file mode 100644 index 3ec7862b..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ma3.gif and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ma5.gif b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ma5.gif deleted file mode 100644 index c6719c98..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ma5.gif and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ma6.gif b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ma6.gif deleted file mode 100644 index f1b5170b..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ma6.gif and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ma8.gif b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ma8.gif deleted file mode 100644 index b98a9b2a..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/medico/ma8.gif and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/plus_more.gif b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/plus_more.gif deleted file mode 100644 index f10da648..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/images/plus_more.gif and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/plus_more.gif b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/plus_more.gif deleted file mode 100644 index f10da648..00000000 Binary files a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/plus_more.gif and /dev/null differ diff --git a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/stylesheet.css b/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/stylesheet.css deleted file mode 100644 index 66573d58..00000000 --- a/AnaliseAcidentesTrabalho/AnaliseAcidentesTrabalho/web/resources/stylesheet.css +++ /dev/null @@ -1,188 +0,0 @@ -/* Style rules to make data tables look better */ -body {background-color: #bbd400} -.list-header { - background-color: #eeeeee; - font-size: larger; - font-weight: bold; -} - -.list-paging-header { - background-color: white; -} - -.gridColLeft { - text-align : left; -} - -.gridColCenter { - text-align: center; -} - -.gridColRight { - text-align: right; -} - -.gridColRightBottom { - text-align: right; - vertical-align: bottom; -} - -.gridColLeft5{ - text-align: left; - width: 5%; -} - -.gridColLeft10{ - text-align: left; - width: 10%; -} - -.gridColLeft15{ - text-align: left; - width: 15%; -} - -.gridColLeft20{ - text-align: left; - width: 20%; -} - -.gridColLeft25{ - text-align: left; - width: 25%; -} - -.gridColLeft30{ - text-align: left; - width: 30%; -} - -.gridColLeft70{ - text-align: left; - width: 70%; -} - -.gridColLeft75{ - text-align: left; - width: 75%; -} - -.gridColLeft85{ - text-align: left; - width: 85%; -} - -.gridColLeft90{ - text-align: left; - width: 90%; -} - -.gridColLeft95{ - text-align: left; - width: 95%; -} - -.gridColRight85{ - text-align: right; - width: 85%; -} - -.gridBlockHeader{ - background-color : #668597; - text-align: left; -} - -.restricoes{ - border-spacing: 0; - padding: 0px; -} - -.assinaturas{ - border-spacing: 0; - padding: 0px; -} -.gridColRestricoes{ - border_bottom: solid 1px #000000; -} - -.gridLayoutTopCols { - vertical-align : top; - width : 50%; - border : solid 1px #000000; - background-color: #f6f4e8; -} - -.gridCellBordered { - border-bottom : solid 1px #000000; -} - -.footer { - bottom: 0; - height: 10%; - position: fixed; - right: 0; - top: 90%; - width: 100% -} - -.centerBlock{ - text-align: center; - left: 0; - right: 0; - margin-left: auto; - margin-right: auto;} - -.labelBold{ - font-weight : bold; -} - -.list-row-even { -} - -.list-row-odd { - background-color: #eeeeee; -} - -/* Style rules for message severity levels */ - -.infoMessage { - color: black; -} - -.warnMessage { - color: orange; - font-weight: bold; -} - -.errorMessage { - color: red; - font-weight: bold; -} - -.fatalMessage { - color: red; - font-style: italic; - font-weight: bold; -} - - -.labelTrabalhador { - color: #000000; -} - -.labelTrabalhador:hover { - font-weight: bold; - text-decoration : none; -} - -.labelCSS{ - font-weight : bold; -} - -.show{ - display : inline; -} - -.hide{ - display : none ; -} \ No newline at end of file