From 9884fd638507004028a3f7dfc9e6d325f8f5795d Mon Sep 17 00:00:00 2001 From: Diogo Neves Date: Fri, 11 Mar 2011 18:13:48 +0000 Subject: [PATCH] - estatisticas : filtrar por estabelecimento; - filtro por ano na listagem de analises de acidentes de trabalho; - as passagens de fase estao a enviar mails (desde que o email seja valido). git-svn-id: https://svn.coded.pt/svn/SIPRP@1635 bb69d46d-e84e-40c8-a05a-06db0d633741 --- .../nbproject/navigation.NavData | 4 +- .../java/analiseacidentestrabalho/Dummy.java | 131 +- .../EstatisticasProcesso.java | 50 + .../FichaUtilizador.java | 85 +- .../FormDirGerRh.java | 2483 ++++++------ .../FormDirSiprp.java | 2478 ++++++------ .../analiseacidentestrabalho/FormGestor.java | 2630 ++++++------- .../java/analiseacidentestrabalho/FormHS.java | 3236 ++++++++-------- .../analiseacidentestrabalho/FormMedico.java | 2927 ++++++++------- .../java/analiseacidentestrabalho/FormRH.java | 3164 ++++++++-------- .../FormSeguranca.java | 3333 +++++++++-------- .../GestaoUtilizadores.java | 142 +- .../java/analiseacidentestrabalho/Header.java | 38 +- .../analiseacidentestrabalho/LoadImage.java | 69 +- .../java/analiseacidentestrabalho/Login.java | 4 - .../RequestBean1.java | 24 +- .../ViewAnaliseAcidenteTrabalho.java | 76 +- .../src/java/app.properties | 16 + .../src/java/db/EstatisticasConstants.java | 3 +- .../db/providers/AnalisesDataProvider.java | 692 ++-- .../providers/EstatisticasDataProvider.java | 49 + .../src/java/utils/Utils.java | 38 + .../web/EstatisticasProcesso.jsp | 5 +- .../web/FormDirGerRh.jsp | 12 + .../web/FormDirSiprp.jsp | 10 +- .../web/FormGestor.jsp | 12 + trunk/AnaliseAcidentesTrabalho/web/FormHS.jsp | 196 +- .../web/FormMedico.jsp | 12 + trunk/AnaliseAcidentesTrabalho/web/FormRH.jsp | 10 +- .../web/FormSeguranca.jsp | 12 +- 30 files changed, 11584 insertions(+), 10357 deletions(-) diff --git a/trunk/AnaliseAcidentesTrabalho/nbproject/navigation.NavData b/trunk/AnaliseAcidentesTrabalho/nbproject/navigation.NavData index 73a9c770..df9fdf13 100644 --- a/trunk/AnaliseAcidentesTrabalho/nbproject/navigation.NavData +++ b/trunk/AnaliseAcidentesTrabalho/nbproject/navigation.NavData @@ -2,8 +2,8 @@ - + @@ -15,8 +15,8 @@ - + diff --git a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Dummy.java b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Dummy.java index 199b84af..eec74799 100644 --- a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Dummy.java +++ b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Dummy.java @@ -173,7 +173,6 @@ public class Dummy extends AbstractPageBean { super.init(); // Perform application initialization that must complete // *before* managed components are initialized - // TODO - add your own initialiation code here // // Initialize automatically managed components @@ -188,7 +187,6 @@ public class Dummy extends AbstractPageBean { // // Perform application initialization that must complete // *after* managed components are initialized - // TODO - add your own initialization code here } /** @@ -241,61 +239,50 @@ public class Dummy extends AbstractPageBean { /** *

Return a reference to the scoped data bean.

*/ - protected ApplicationBean1 getApplicationBean1() { + protected ApplicationBean1 getApplicationBean1() + { return (ApplicationBean1)getBean("ApplicationBean1"); } - 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. - + public String butCancelar_action() + { 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. - + public String butGravar_action() + { 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. - + public String butEnviar_action() + { 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. - + public String butImagem_action() + { return null; } - public String lnkMoreMed1_action() { - // TODO: Replace with your code - + public String lnkMoreMed1_action() + { return null; } - public String lnkNome_action() { - // TODO: Replace with your code - + public String lnkNome_action() + { return null; } - public String lnkDataNascimento_action() { - // TODO: Replace with your code - + public String lnkDataNascimento_action() + { return null; } - public String lnkEditUser_action() { - // TODO: Replace with your code - + public String lnkEditUser_action() + { return null; } @@ -305,44 +292,38 @@ public class Dummy extends AbstractPageBean { return null; } - public String butProcurarTrab_action() { - // TODO: Process the button click action. Return value is a navigation - // case name where null will return to the same page. - + public String butProcurarTrab_action() + { return null; } - public String lnkPOR_action() { - // TODO: Replace with your code - + public String lnkPOR_action() + { return null; } - public String lnkNomeTrabalhador_action() { - // TODO: Replace with your code - + public String lnkNomeTrabalhador_action() + { return null; } - public String lnkEstabelecimentoTrabalhador_action() { - // TODO: Replace with your code - + public String lnkEstabelecimentoTrabalhador_action() + { return null; } - public void drpTipo_processValueChange(ValueChangeEvent event) { - // TODO: Replace with your code - + public void drpTipo_processValueChange(ValueChangeEvent event) + { + } - public void drpNome_processValueChange(ValueChangeEvent event) { - // TODO: Replace with your code - + public void drpNome_processValueChange(ValueChangeEvent event) + { + } - public String hyperlink1_action() { - // TODO: Replace with your code - + public String hyperlink1_action() + { return null; } @@ -353,8 +334,8 @@ public class Dummy extends AbstractPageBean { -// public String lnkAjuda_action() { -// // TODO: Replace with your code +// public String lnkAjuda_action() +// { // ServletContext theApplicationsServletContext = // (ServletContext) this.getExternalContext().getContext(); // String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL); @@ -372,52 +353,48 @@ public class Dummy extends AbstractPageBean { // return null; // } - public String butVoltar_action() { - // TODO: Process the button click action. Return value is a navigation - // case name where null will return to the same page. - + public String butVoltar_action() + { return null; } - public String butEliminar_action() { - // TODO: Process the button click action. Return value is a navigation - // case name where null will return to the same page. - + public String butEliminar_action() + { return null; } - public String lnkPlanosActuacao_action() { - // TODO: Replace with your code + public String lnkPlanosActuacao_action() + { return null; } - public String lnkAnalisesAcidente_action() { - // TODO: Replace with your code + public String lnkAnalisesAcidente_action() + { return null; } - public String lnkNewUser_action() { - // TODO: Replace with your code + public String lnkNewUser_action() + { return null; } - public String lnkAjuda_action() { - // TODO: Replace with your code + public String lnkAjuda_action() + { return null; } - public String lnkGerirUtilizadores_action() { - // TODO: Replace with your code + public String lnkGerirUtilizadores_action() + { return null; } - public String lnkAnalises_action() { - // TODO: Replace with your code + public String lnkAnalises_action() + { return null; } - public String lnkPlanos_action() { - // TODO: Replace with your code + public String lnkPlanos_action() + { return null; } } diff --git a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/EstatisticasProcesso.java b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/EstatisticasProcesso.java index 7bd62a16..f227e7f2 100644 --- a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/EstatisticasProcesso.java +++ b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/EstatisticasProcesso.java @@ -20,6 +20,7 @@ import com.sun.rave.web.ui.component.TextField; import com.sun.rave.web.ui.model.Option; import db.EstatisticasConstants; import db.data.siprp.outer.SeccoesData; +import db.data.siprp_local.outer.EstabelecimentosData; import db.providers.EstatisticasDataProvider; import global.Global; import java.text.SimpleDateFormat; @@ -175,6 +176,18 @@ public class EstatisticasProcesso extends AbstractPageBean // this.textDepartamento = textDepartamento; // } + private DropDown dropEstabelecimentos = new DropDown(); + + public DropDown getDropEstabelecimentos() + { + return dropEstabelecimentos; + } + + public void setDropEstabelecimentos( DropDown dropEstabelecimentos ) + { + this.dropEstabelecimentos = dropEstabelecimentos; + } + private DropDown dropSeccoes = new DropDown(); public DropDown getDropSeccoes() { @@ -378,6 +391,12 @@ public class EstatisticasProcesso extends AbstractPageBean { dropSeccoes.setItems( seccoes ); } + + Option[] estabelecimentos = statsProvider.getEstabelecimentos(); + if ( estabelecimentos != null ) + { + dropEstabelecimentos.setItems( estabelecimentos ); + } } catch ( Exception e ) { @@ -503,6 +522,18 @@ public class EstatisticasProcesso extends AbstractPageBean // departamento = ( ( String ) textDepartamento.getText() ).trim(); // departamento = "".equals( departamento ) ? null : departamento; // } + + Integer estabelecimentoID = null; + if ( dropEstabelecimentos.getSelected() != null ) + { + String estabelecimento = ( String ) dropEstabelecimentos.getSelected(); + if ( estabelecimento != null ) + { + try { estabelecimentoID = Integer.parseInt( estabelecimento ); } + catch ( Exception e ) { } + } + } + Integer seccaoID = null; if ( dropSeccoes.getSelected() != null ) { @@ -569,6 +600,7 @@ public class EstatisticasProcesso extends AbstractPageBean searchProperties.put( EstatisticasConstants.KEY_HORA_OCORRENCIA, horaOcorrencia ); searchProperties.put( EstatisticasConstants.KEY_HORAS_TRABALHADAS, horasTrabalhadas ); // searchProperties.put( EstatisticasConstants.KEY_DEPARTAMENTO, departamento ); + searchProperties.put( EstatisticasConstants.KEY_ESTABELECIMENTO, estabelecimentoID ); searchProperties.put( EstatisticasConstants.KEY_SECCAO, seccaoID ); searchProperties.put( EstatisticasConstants.KEY_CAUSAS_ACIDENTE, causas ); searchProperties.put( EstatisticasConstants.KEY_TURNO_TRABALHO, turno ); @@ -725,7 +757,17 @@ public class EstatisticasProcesso extends AbstractPageBean String horaOcorrencia = ( String ) searchProperties.get( EstatisticasConstants.KEY_HORA_OCORRENCIA ); String horasTrabalhadas = ( String ) searchProperties.get( EstatisticasConstants.KEY_HORAS_TRABALHADAS ); // String departamento = ( String ) searchProperties.get( EstatisticasConstants.KEY_DEPARTAMENTO ); + Integer estabelecimentoID = ( Integer ) searchProperties.get( EstatisticasConstants.KEY_ESTABELECIMENTO ); Integer seccaoID = ( Integer ) searchProperties.get( EstatisticasConstants.KEY_SECCAO ); + String estabelecimento = null; + try + { + estabelecimento = EstatisticasDataProvider.getInstance().getEstabelecimentoByID( estabelecimentoID ); + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } String seccao = null; try { @@ -805,6 +847,14 @@ public class EstatisticasProcesso extends AbstractPageBean // columnValue.setCellValue( departamento ); // row++; + keyName = EstatisticasConstants.KEY_NAMES[ row ]; + currentRow = getRow( sheet, row ); + columnLabel = getCell( currentRow, 0 ); + columnLabel.setCellValue( keyName ); + columnValue = getCell( currentRow, 1 ); + columnValue.setCellValue( estabelecimento ); + row++; + keyName = EstatisticasConstants.KEY_NAMES[ row ]; currentRow = getRow( sheet, row ); columnLabel = getCell( currentRow, 0 ); diff --git a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FichaUtilizador.java b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FichaUtilizador.java index 1d005050..cc04d117 100644 --- a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FichaUtilizador.java +++ b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FichaUtilizador.java @@ -45,7 +45,8 @@ import utils.JSFUtils; * lifecycle methods and event handlers where you may add behavior * to respond to incoming events.

*/ -public class FichaUtilizador extends AbstractPageBean { +public class FichaUtilizador extends AbstractPageBean +{ // private int __placeholder; @@ -515,7 +516,8 @@ public class FichaUtilizador extends AbstractPageBean { private StaticText staticText12 = new StaticText(); - public StaticText getStaticText12() { + public StaticText getStaticText12() + { return staticText12; } @@ -654,7 +656,9 @@ public class FichaUtilizador extends AbstractPageBean { /** *

Construct a new Page bean instance.

*/ - public FichaUtilizador() { + public FichaUtilizador() + { + } /** @@ -669,13 +673,13 @@ public class FichaUtilizador extends AbstractPageBean { * values submitted with this request. Instead, they represent the * property values that were saved for this view when it was rendered.

*/ + @Override 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 @@ -690,7 +694,6 @@ public class FichaUtilizador extends AbstractPageBean { // // Perform application initialization that must complete // *after* managed components are initialized - // TODO - add your own initialization code here if ( ! getSessionBean1().isLoggedIn() ) { try @@ -848,7 +851,10 @@ public class FichaUtilizador extends AbstractPageBean { * is processing a form submit. Customize this method to allocate * resources that will be required in your event handlers.

*/ - public void preprocess() { + @Override + public void preprocess() + { + } /** @@ -859,7 +865,9 @@ public class FichaUtilizador extends AbstractPageBean { * this method to allocate resources that will be required for rendering * this page.

*/ - public void prerender() { + @Override + public void prerender() + { stCriarEditar.setText("EDITAR"); if(getSessionBean1().getModoEdicaoUtilizador().matches("new")) @@ -873,12 +881,10 @@ public class FichaUtilizador extends AbstractPageBean { lblCedula.setRendered(false); stCedula.setRendered(false); } - } if(getSessionBean1().getModoEdicaoUtilizador().matches("edit")) { - //drpNome.setRendered(true); - + //drpNome.setRendered(true); if(!isPostData) { showUser(); @@ -907,31 +913,38 @@ public class FichaUtilizador extends AbstractPageBean { * preprocess(), or prerender() methods (or * acquired during execution of an event handler).

*/ - public void destroy() { + @Override + public void destroy() + { + } /** *

Return a reference to the scoped data bean.

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

Return a reference to the scoped data bean.

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

Return a reference to the scoped data bean.

*/ - protected RequestBean1 getRequestBean1() { + protected RequestBean1 getRequestBean1() + { return (RequestBean1)getBean("RequestBean1"); } - public String lnkAnalisesAcidente_action() { + public String lnkAnalisesAcidente_action() + { //return navigate(); int tipo = getSessionBean1().getCurrentUser().getTipo().intValue(); if(tipo == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP) @@ -982,16 +995,13 @@ public class FichaUtilizador extends AbstractPageBean { } - 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. - + public String butCancelar_action() + { return navigate(); } - 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. + public String butGravar_action() + { if(validationOk()) { if(getSessionBean1().getModoEdicaoUtilizador().matches("new")) @@ -1027,14 +1037,12 @@ public class FichaUtilizador extends AbstractPageBean { { getSessionBean1().setMudarPassword(false); } - } - return null; } - public void drpTipo_processValueChange(ValueChangeEvent event) { - // TODO: Replace with your code + public void drpTipo_processValueChange(ValueChangeEvent event) + { drpNome.setVisible(true); Integer tipo = (Integer) drpTipo.getSelected(); boolean booGestor = false; @@ -1448,16 +1456,15 @@ public class FichaUtilizador extends AbstractPageBean { return u; } - public String lnkEditUser_action() { - // TODO: Replace with your code - + public String lnkEditUser_action() + { getSessionBean1().setModoEdicaoUtilizador("edit"); return "user"; } - public String butApagar_action() { - // TODO: Replace with your code - hidConfDelUser.setValue("apagar"); + public String butApagar_action() + { + hidConfDelUser.setValue("apagar"); return null; } @@ -1544,9 +1551,8 @@ public class FichaUtilizador extends AbstractPageBean { return null; } - public String lnkNewUser_action() { - // TODO: Replace with your code - + public String lnkNewUser_action() + { if(getSessionBean1().getCurrentUser().getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_GERAL_RH) { getSessionBean1().setNavFrom("FormDirGerRh"); @@ -1555,12 +1561,11 @@ public class FichaUtilizador extends AbstractPageBean { { getSessionBean1().setNavFrom("FormDirSiprp"); } - return "gestao_utilizadores"; } - public String lnkAjuda_action() { - // TODO: Replace with your code + public String lnkAjuda_action() + { // ServletContext theApplicationsServletContext = // (ServletContext) this.getExternalContext().getContext(); // String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL); @@ -1578,8 +1583,8 @@ public class FichaUtilizador extends AbstractPageBean { return null; } - public String lnkPlanosActuacao_action() { - // TODO: Replace with your code + public String lnkPlanosActuacao_action() + { Utilizador u = getSessionBean1().getCurrentUser(); // String curUser = "?user=" + u.getId().toString(); FacesContext fc = getFacesContext().getCurrentInstance(); diff --git a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormDirGerRh.java b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormDirGerRh.java index 57e6ab19..6b5da99a 100644 --- a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormDirGerRh.java +++ b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormDirGerRh.java @@ -53,1403 +53,1486 @@ import utils.Utils; * lifecycle methods and event handlers where you may add behavior * to respond to incoming events.

*/ -public class FormDirGerRh 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 HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid(); +public class FormDirGerRh 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 HtmlPanelGrid getGridLayoutTop1() { - return gridLayoutTop1; - } + public Page getPage1() + { + return page1; + } - public void setGridLayoutTop1(HtmlPanelGrid hpg) { - this.gridLayoutTop1 = hpg; - } + public void setPage1( Page p ) + { + this.page1 = p; + } + private Html html1 = new Html(); - private HtmlPanelGrid gridSeguimento1 = new HtmlPanelGrid(); + public Html getHtml1() + { + return html1; + } - public HtmlPanelGrid getGridSeguimento1() { - return gridSeguimento1; - } + public void setHtml1( Html h ) + { + this.html1 = h; + } + private Head head1 = new Head(); - public void setGridSeguimento1(HtmlPanelGrid hpg) { - this.gridSeguimento1 = hpg; - } + public Head getHead1() + { + return head1; + } - private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); + public void setHead1( Head h ) + { + this.head1 = h; + } + private Link link1 = new Link(); - public HtmlPanelGrid getGridPanel2() { - return gridPanel2; - } + public Link getLink1() + { + return link1; + } - public void setGridPanel2(HtmlPanelGrid hpg) { - this.gridPanel2 = hpg; - } + public void setLink1( Link l ) + { + this.link1 = l; + } + private Body body1 = new Body(); - private StaticText staticText2 = new StaticText(); + public Body getBody1() + { + return body1; + } - public StaticText getStaticText2() { - return staticText2; - } + public void setBody1( Body b ) + { + this.body1 = b; + } + private Form form1 = new Form(); - public void setStaticText2(StaticText st) { - this.staticText2 = st; - } + public Form getForm1() + { + return form1; + } - private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); + public void setForm1( Form f ) + { + this.form1 = f; + } + private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); - public HtmlPanelGrid getGridPanel3() { - return gridPanel3; - } + public HtmlPanelGrid getGridBase1() + { + return gridBase1; + } - public void setGridPanel3(HtmlPanelGrid hpg) { - this.gridPanel3 = hpg; - } + public void setGridBase1( HtmlPanelGrid hpg ) + { + this.gridBase1 = hpg; + } + private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); - private Table table1 = new Table(); + public HtmlPanelGrid getGridLayout1() + { + return gridLayout1; + } - public Table getTable1() { - return table1; - } + public void setGridLayout1( HtmlPanelGrid hpg ) + { + this.gridLayout1 = hpg; + } + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); - public void setTable1(Table t) { - this.table1 = t; - } + public HtmlPanelGrid getGridPanel1() + { + return gridPanel1; + } - private TableRowGroup tableRowGroup1 = new TableRowGroup(); + public void setGridPanel1( HtmlPanelGrid hpg ) + { + this.gridPanel1 = hpg; + } + private PanelGroup groupPanel1 = new PanelGroup(); - public TableRowGroup getTableRowGroup1() { - return tableRowGroup1; - } + public PanelGroup getGroupPanel1() + { + return groupPanel1; + } - public void setTableRowGroup1(TableRowGroup trg) { - this.tableRowGroup1 = trg; - } + public void setGroupPanel1( PanelGroup pg ) + { + this.groupPanel1 = pg; + } + private ImageComponent image1 = new ImageComponent(); - private TableColumn tableColumn1 = new TableColumn(); + public ImageComponent getImage1() + { + return image1; + } - public TableColumn getTableColumn1() { - return tableColumn1; - } + public void setImage1( ImageComponent ic ) + { + this.image1 = ic; + } + private ImageComponent image2 = new ImageComponent(); - public void setTableColumn1(TableColumn tc) { - this.tableColumn1 = tc; - } + public ImageComponent getImage2() + { + return image2; + } - private Hyperlink lnkDataAcidenteSeg = new Hyperlink(); + public void setImage2( ImageComponent ic ) + { + this.image2 = ic; + } + private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid(); - public Hyperlink getLnkDataAcidenteSeg() { - return lnkDataAcidenteSeg; - } + public HtmlPanelGrid getGridLayoutTop1() + { + return gridLayoutTop1; + } - public void setLnkDataAcidenteSeg(Hyperlink h) { - this.lnkDataAcidenteSeg = h; - } + public void setGridLayoutTop1( HtmlPanelGrid hpg ) + { + this.gridLayoutTop1 = hpg; + } + private HtmlPanelGrid gridSeguimento1 = new HtmlPanelGrid(); - private TableColumn tableColumn2 = new TableColumn(); + public HtmlPanelGrid getGridSeguimento1() + { + return gridSeguimento1; + } - public TableColumn getTableColumn2() { - return tableColumn2; - } + public void setGridSeguimento1( HtmlPanelGrid hpg ) + { + this.gridSeguimento1 = hpg; + } + private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); - public void setTableColumn2(TableColumn tc) { - this.tableColumn2 = tc; - } + public HtmlPanelGrid getGridPanel2() + { + return gridPanel2; + } - private Hyperlink lnkNrSeg = new Hyperlink(); + public void setGridPanel2( HtmlPanelGrid hpg ) + { + this.gridPanel2 = hpg; + } + private StaticText staticText2 = new StaticText(); - public Hyperlink getLnkNrSeg() { - return lnkNrSeg; - } + public StaticText getStaticText2() + { + return staticText2; + } - public void setLnkNrSeg(Hyperlink h) { - this.lnkNrSeg = h; - } + public void setStaticText2( StaticText st ) + { + this.staticText2 = st; + } + private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); - private TableColumn tableColumn3 = new TableColumn(); + public HtmlPanelGrid getGridPanel3() + { + return gridPanel3; + } - public TableColumn getTableColumn3() { - return tableColumn3; - } + public void setGridPanel3( HtmlPanelGrid hpg ) + { + this.gridPanel3 = hpg; + } + private Table table1 = new Table(); - public void setTableColumn3(TableColumn tc) { - this.tableColumn3 = tc; - } + public Table getTable1() + { + return table1; + } - private Hyperlink lnkPorSeg = new Hyperlink(); + public void setTable1( Table t ) + { + this.table1 = t; + } + private TableRowGroup tableRowGroup1 = new TableRowGroup(); - public Hyperlink getLnkPorSeg() { - return lnkPorSeg; - } + public TableRowGroup getTableRowGroup1() + { + return tableRowGroup1; + } - public void setLnkPorSeg(Hyperlink h) { - this.lnkPorSeg = h; - } + public void setTableRowGroup1( TableRowGroup trg ) + { + this.tableRowGroup1 = trg; + } + private TableColumn tableColumn1 = new TableColumn(); - private TableColumn tableColumn4 = new TableColumn(); + public TableColumn getTableColumn1() + { + return tableColumn1; + } - public TableColumn getTableColumn4() { - return tableColumn4; - } + public void setTableColumn1( TableColumn tc ) + { + this.tableColumn1 = tc; + } + private Hyperlink lnkDataAcidenteSeg = new Hyperlink(); - public void setTableColumn4(TableColumn tc) { - this.tableColumn4 = tc; - } + public Hyperlink getLnkDataAcidenteSeg() + { + return lnkDataAcidenteSeg; + } - private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink(); + public void setLnkDataAcidenteSeg( Hyperlink h ) + { + this.lnkDataAcidenteSeg = h; + } + private TableColumn tableColumn2 = new TableColumn(); - public Hyperlink getLnkNomeAcidentadoSeg() { - return lnkNomeAcidentadoSeg; - } + public TableColumn getTableColumn2() + { + return tableColumn2; + } - public void setLnkNomeAcidentadoSeg(Hyperlink h) { - this.lnkNomeAcidentadoSeg = h; - } + public void setTableColumn2( TableColumn tc ) + { + this.tableColumn2 = tc; + } + private Hyperlink lnkNrSeg = new Hyperlink(); - private TableColumn tableColumn5 = new TableColumn(); + public Hyperlink getLnkNrSeg() + { + return lnkNrSeg; + } - public TableColumn getTableColumn5() { - return tableColumn5; - } + public void setLnkNrSeg( Hyperlink h ) + { + this.lnkNrSeg = h; + } + private TableColumn tableColumn3 = new TableColumn(); - public void setTableColumn5(TableColumn tc) { - this.tableColumn5 = tc; - } + public TableColumn getTableColumn3() + { + return tableColumn3; + } - private Hyperlink lnkFaseSeg = new Hyperlink(); + public void setTableColumn3( TableColumn tc ) + { + this.tableColumn3 = tc; + } + private Hyperlink lnkPorSeg = new Hyperlink(); - public Hyperlink getLnkFaseSeg() { - return lnkFaseSeg; - } + public Hyperlink getLnkPorSeg() + { + return lnkPorSeg; + } - public void setLnkFaseSeg(Hyperlink h) { - this.lnkFaseSeg = h; - } + public void setLnkPorSeg( Hyperlink h ) + { + this.lnkPorSeg = h; + } + private TableColumn tableColumn4 = new TableColumn(); + public TableColumn getTableColumn4() + { + return tableColumn4; + } - private Hyperlink lnkEstabelecimentoSeg = new Hyperlink(); + public void setTableColumn4( TableColumn tc ) + { + this.tableColumn4 = tc; + } + private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink(); - public Hyperlink getLnkEstabelecimentoSeg() { - return lnkEstabelecimentoSeg; - } + public Hyperlink getLnkNomeAcidentadoSeg() + { + return lnkNomeAcidentadoSeg; + } - public void setLnkEstabelecimentoSeg(Hyperlink h) { - this.lnkEstabelecimentoSeg = h; - } + public void setLnkNomeAcidentadoSeg( Hyperlink h ) + { + this.lnkNomeAcidentadoSeg = h; + } + private TableColumn tableColumn5 = new TableColumn(); - private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid(); + public TableColumn getTableColumn5() + { + return tableColumn5; + } - public HtmlPanelGrid getGridConcluidos1() { - return gridConcluidos1; - } + public void setTableColumn5( TableColumn tc ) + { + this.tableColumn5 = tc; + } + private Hyperlink lnkFaseSeg = new Hyperlink(); - public void setGridConcluidos1(HtmlPanelGrid hpg) { - this.gridConcluidos1 = hpg; - } + public Hyperlink getLnkFaseSeg() + { + return lnkFaseSeg; + } - private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); + public void setLnkFaseSeg( Hyperlink h ) + { + this.lnkFaseSeg = h; + } + private Hyperlink lnkEstabelecimentoSeg = new Hyperlink(); - public HtmlPanelGrid getGridPanel4() { - return gridPanel4; - } + public Hyperlink getLnkEstabelecimentoSeg() + { + return lnkEstabelecimentoSeg; + } - public void setGridPanel4(HtmlPanelGrid hpg) { - this.gridPanel4 = hpg; - } + public void setLnkEstabelecimentoSeg( Hyperlink h ) + { + this.lnkEstabelecimentoSeg = h; + } + private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid(); - private StaticText staticText3 = new StaticText(); + public HtmlPanelGrid getGridConcluidos1() + { + return gridConcluidos1; + } - public StaticText getStaticText3() { - return staticText3; - } + public void setGridConcluidos1( HtmlPanelGrid hpg ) + { + this.gridConcluidos1 = hpg; + } + private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); - public void setStaticText3(StaticText st) { - this.staticText3 = st; - } + public HtmlPanelGrid getGridPanel4() + { + return gridPanel4; + } - private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); + public void setGridPanel4( HtmlPanelGrid hpg ) + { + this.gridPanel4 = hpg; + } + private StaticText staticText3 = new StaticText(); - public HtmlPanelGrid getGridPanel5() { - return gridPanel5; - } + public StaticText getStaticText3() + { + return staticText3; + } - public void setGridPanel5(HtmlPanelGrid hpg) { - this.gridPanel5 = hpg; - } + public void setStaticText3( StaticText st ) + { + this.staticText3 = st; + } + private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); - private PanelGroup groupPanel3 = new PanelGroup(); + public HtmlPanelGrid getGridPanel5() + { + return gridPanel5; + } - public PanelGroup getGroupPanel3() { - return groupPanel3; - } + public void setGridPanel5( HtmlPanelGrid hpg ) + { + this.gridPanel5 = hpg; + } + private PanelGroup groupPanel3 = new PanelGroup(); - public void setGroupPanel3(PanelGroup pg) { - this.groupPanel3 = pg; - } + public PanelGroup getGroupPanel3() + { + return groupPanel3; + } - private StaticText staticText4 = new StaticText(); + public void setGroupPanel3( PanelGroup pg ) + { + this.groupPanel3 = pg; + } + private StaticText staticText4 = new StaticText(); - public StaticText getStaticText4() { - return staticText4; - } + public StaticText getStaticText4() + { + return staticText4; + } - public void setStaticText4(StaticText st) { - this.staticText4 = st; - } + public void setStaticText4( StaticText st ) + { + this.staticText4 = st; + } + private DropDown drpAno = new DropDown(); - private DropDown drpAno = new DropDown(); + public DropDown getDrpAno() + { + return drpAno; + } - public DropDown getDrpAno() { - return drpAno; - } + public void setDrpAno( DropDown dd ) + { + this.drpAno = dd; + } + private PanelGroup groupPanel4 = new PanelGroup(); - public void setDrpAno(DropDown dd) { - this.drpAno = dd; - } + public PanelGroup getGroupPanel4() + { + return groupPanel4; + } - private PanelGroup groupPanel4 = new PanelGroup(); + public void setGroupPanel4( PanelGroup pg ) + { + this.groupPanel4 = pg; + } + private StaticText lblMes = new StaticText(); - public PanelGroup getGroupPanel4() { - return groupPanel4; - } + public StaticText getLblMes() + { + return lblMes; + } - public void setGroupPanel4(PanelGroup pg) { - this.groupPanel4 = pg; - } + public void setLblMes( StaticText st ) + { + this.lblMes = st; + } + private DropDown drpMes = new DropDown(); - private StaticText lblMes = new StaticText(); + public DropDown getDrpMes() + { + return drpMes; + } - public StaticText getLblMes() { - return lblMes; - } + public void setDrpMes( DropDown dd ) + { + this.drpMes = dd; + } + private PanelGroup groupPanel5 = new PanelGroup(); - public void setLblMes(StaticText st) { - this.lblMes = st; - } + public PanelGroup getGroupPanel5() + { + return groupPanel5; + } - private DropDown drpMes = new DropDown(); + public void setGroupPanel5( PanelGroup pg ) + { + this.groupPanel5 = pg; + } + private StaticText lblDia = new StaticText(); - public DropDown getDrpMes() { - return drpMes; - } + public StaticText getLblDia() + { + return lblDia; + } - public void setDrpMes(DropDown dd) { - this.drpMes = dd; - } + public void setLblDia( StaticText st ) + { + this.lblDia = st; + } + private DropDown drpDia = new DropDown(); - private PanelGroup groupPanel5 = new PanelGroup(); + public DropDown getDrpDia() + { + return drpDia; + } - public PanelGroup getGroupPanel5() { - return groupPanel5; - } + public void setDrpDia( DropDown dd ) + { + this.drpDia = dd; + } + private PanelGroup groupPanel6 = new PanelGroup(); - public void setGroupPanel5(PanelGroup pg) { - this.groupPanel5 = pg; - } + public PanelGroup getGroupPanel6() + { + return groupPanel6; + } - private StaticText lblDia = new StaticText(); + public void setGroupPanel6( PanelGroup pg ) + { + this.groupPanel6 = pg; + } + private StaticText staticText5 = new StaticText(); - public StaticText getLblDia() { - return lblDia; - } + public StaticText getStaticText5() + { + return staticText5; + } - public void setLblDia(StaticText st) { - this.lblDia = st; - } + public void setStaticText5( StaticText st ) + { + this.staticText5 = st; + } + private TextField txtPor = new TextField(); - private DropDown drpDia = new DropDown(); + public TextField getTxtPor() + { + return txtPor; + } - public DropDown getDrpDia() { - return drpDia; - } + public void setTxtPor( TextField tf ) + { + this.txtPor = tf; + } + private PanelGroup groupPanel7 = new PanelGroup(); - public void setDrpDia(DropDown dd) { - this.drpDia = dd; - } + public PanelGroup getGroupPanel7() + { + return groupPanel7; + } - private PanelGroup groupPanel6 = new PanelGroup(); + public void setGroupPanel7( PanelGroup pg ) + { + this.groupPanel7 = pg; + } + private StaticText staticText6 = new StaticText(); - public PanelGroup getGroupPanel6() { - return groupPanel6; - } + public StaticText getStaticText6() + { + return staticText6; + } - public void setGroupPanel6(PanelGroup pg) { - this.groupPanel6 = pg; - } + public void setStaticText6( StaticText st ) + { + this.staticText6 = st; + } + private TextField txtNome = new TextField(); - private StaticText staticText5 = new StaticText(); + public TextField getTxtNome() + { + return txtNome; + } - public StaticText getStaticText5() { - return staticText5; - } + public void setTxtNome( TextField tf ) + { + this.txtNome = tf; + } + private Button butPesquisar = new Button(); - public void setStaticText5(StaticText st) { - this.staticText5 = st; - } + public Button getButPesquisar() + { + return butPesquisar; + } - private TextField txtPor = new TextField(); + public void setButPesquisar( Button b ) + { + this.butPesquisar = b; + } + private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); - public TextField getTxtPor() { - return txtPor; - } + public HtmlPanelGrid getGridPanel6() + { + return gridPanel6; + } - public void setTxtPor(TextField tf) { - this.txtPor = tf; - } + public void setGridPanel6( HtmlPanelGrid hpg ) + { + this.gridPanel6 = hpg; + } + private Table table2 = new Table(); - private PanelGroup groupPanel7 = new PanelGroup(); + public Table getTable2() + { + return table2; + } - public PanelGroup getGroupPanel7() { - return groupPanel7; - } + public void setTable2( Table t ) + { + this.table2 = t; + } + private TableRowGroup tableRowGroup2 = new TableRowGroup(); - public void setGroupPanel7(PanelGroup pg) { - this.groupPanel7 = pg; - } + public TableRowGroup getTableRowGroup2() + { + return tableRowGroup2; + } - private StaticText staticText6 = new StaticText(); + public void setTableRowGroup2( TableRowGroup trg ) + { + this.tableRowGroup2 = trg; + } + private TableColumn tableColumn6 = new TableColumn(); - public StaticText getStaticText6() { - return staticText6; - } + public TableColumn getTableColumn6() + { + return tableColumn6; + } - public void setStaticText6(StaticText st) { - this.staticText6 = st; - } + public void setTableColumn6( TableColumn tc ) + { + this.tableColumn6 = tc; + } + private Hyperlink lnkDataConcluida = new Hyperlink(); - private TextField txtNome = new TextField(); + public Hyperlink getLnkDataConcluida() + { + return lnkDataConcluida; + } - public TextField getTxtNome() { - return txtNome; - } + public void setLnkDataConcluida( Hyperlink h ) + { + this.lnkDataConcluida = h; + } + private TableColumn tableColumn7 = new TableColumn(); - public void setTxtNome(TextField tf) { - this.txtNome = tf; - } + public TableColumn getTableColumn7() + { + return tableColumn7; + } - private Button butPesquisar = new Button(); + public void setTableColumn7( TableColumn tc ) + { + this.tableColumn7 = tc; + } + private Hyperlink lnkNrConcluida = new Hyperlink(); - public Button getButPesquisar() { - return butPesquisar; - } + public Hyperlink getLnkNrConcluida() + { + return lnkNrConcluida; + } - public void setButPesquisar(Button b) { - this.butPesquisar = b; - } + public void setLnkNrConcluida( Hyperlink h ) + { + this.lnkNrConcluida = h; + } + private TableColumn tableColumn8 = new TableColumn(); - private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); + public TableColumn getTableColumn8() + { + return tableColumn8; + } - public HtmlPanelGrid getGridPanel6() { - return gridPanel6; - } + public void setTableColumn8( TableColumn tc ) + { + this.tableColumn8 = tc; + } + private Hyperlink lnkPorConcluida = new Hyperlink(); - public void setGridPanel6(HtmlPanelGrid hpg) { - this.gridPanel6 = hpg; - } + public Hyperlink getLnkPorConcluida() + { + return lnkPorConcluida; + } - private Table table2 = new Table(); + public void setLnkPorConcluida( Hyperlink h ) + { + this.lnkPorConcluida = h; + } + private TableColumn tableColumn9 = new TableColumn(); - public Table getTable2() { - return table2; - } + public TableColumn getTableColumn9() + { + return tableColumn9; + } - public void setTable2(Table t) { - this.table2 = t; - } + public void setTableColumn9( TableColumn tc ) + { + this.tableColumn9 = tc; + } + private Hyperlink lnkNomeConcluida = new Hyperlink(); - private TableRowGroup tableRowGroup2 = new TableRowGroup(); + public Hyperlink getLnkNomeConcluida() + { + return lnkNomeConcluida; + } - public TableRowGroup getTableRowGroup2() { - return tableRowGroup2; - } + public void setLnkNomeConcluida( Hyperlink h ) + { + this.lnkNomeConcluida = h; + } + private TableColumn tableColumn10 = new TableColumn(); - public void setTableRowGroup2(TableRowGroup trg) { - this.tableRowGroup2 = trg; - } + public TableColumn getTableColumn10() + { + return tableColumn10; + } - private TableColumn tableColumn6 = new TableColumn(); + public void setTableColumn10( TableColumn tc ) + { + this.tableColumn10 = tc; + } + private Hyperlink lnkEstabConcluida = new Hyperlink(); - public TableColumn getTableColumn6() { - return tableColumn6; - } + public Hyperlink getLnkEstabConcluida() + { + return lnkEstabConcluida; + } - public void setTableColumn6(TableColumn tc) { - this.tableColumn6 = tc; - } + public void setLnkEstabConcluida( Hyperlink h ) + { + this.lnkEstabConcluida = h; + } + private StaticText txtSearchMsg = new StaticText(); + + public StaticText getTxtSearchMsg() + { + return txtSearchMsg; + } + + public void setTxtSearchMsg( StaticText st ) + { + this.txtSearchMsg = st; + } + private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); + + public HtmlPanelGrid getGridPanel7() + { + return gridPanel7; + } - private Hyperlink lnkDataConcluida = new Hyperlink(); + public void setGridPanel7( HtmlPanelGrid hpg ) + { + this.gridPanel7 = hpg; + } + private PanelGroup groupPanel8 = new PanelGroup(); - public Hyperlink getLnkDataConcluida() { - return lnkDataConcluida; - } + public PanelGroup getGroupPanel8() + { + return groupPanel8; + } - public void setLnkDataConcluida(Hyperlink h) { - this.lnkDataConcluida = h; - } + public void setGroupPanel8( PanelGroup pg ) + { + this.groupPanel8 = pg; + } + private StaticText staticText7 = new StaticText(); - private TableColumn tableColumn7 = new TableColumn(); + public StaticText getStaticText7() + { + return staticText7; + } - public TableColumn getTableColumn7() { - return tableColumn7; - } + public void setStaticText7( StaticText st ) + { + this.staticText7 = st; + } + private ImageComponent image3 = new ImageComponent(); - public void setTableColumn7(TableColumn tc) { - this.tableColumn7 = tc; - } + public ImageComponent getImage3() + { + return image3; + } - private Hyperlink lnkNrConcluida = new Hyperlink(); + public void setImage3( ImageComponent ic ) + { + this.image3 = ic; + } + private StaticText staticText8 = new StaticText(); - public Hyperlink getLnkNrConcluida() { - return lnkNrConcluida; - } + public StaticText getStaticText8() + { + return staticText8; + } - public void setLnkNrConcluida(Hyperlink h) { - this.lnkNrConcluida = h; - } + public void setStaticText8( StaticText st ) + { + this.staticText8 = st; + } + private TableColumn tableColumn11 = new TableColumn(); - private TableColumn tableColumn8 = new TableColumn(); + public TableColumn getTableColumn11() + { + return tableColumn11; + } - public TableColumn getTableColumn8() { - return tableColumn8; - } + public void setTableColumn11( TableColumn tc ) + { + this.tableColumn11 = tc; + } + private Hyperlink lnkDataAberturaSeg = new Hyperlink(); - public void setTableColumn8(TableColumn tc) { - this.tableColumn8 = tc; - } + public Hyperlink getLnkDataAberturaSeg() + { + return lnkDataAberturaSeg; + } - private Hyperlink lnkPorConcluida = new Hyperlink(); + public void setLnkDataAberturaSeg( Hyperlink h ) + { + this.lnkDataAberturaSeg = h; + } + private TableColumn tableColumn12 = new TableColumn(); - public Hyperlink getLnkPorConcluida() { - return lnkPorConcluida; - } + public TableColumn getTableColumn12() + { + return tableColumn12; + } - public void setLnkPorConcluida(Hyperlink h) { - this.lnkPorConcluida = h; - } + public void setTableColumn12( TableColumn tc ) + { + this.tableColumn12 = tc; + } + private TableColumn tableColumn13 = new TableColumn(); - private TableColumn tableColumn9 = new TableColumn(); + public TableColumn getTableColumn13() + { + return tableColumn13; + } - public TableColumn getTableColumn9() { - return tableColumn9; - } + public void setTableColumn13( TableColumn tc ) + { + this.tableColumn13 = tc; + } + private Hyperlink lnkDataAberturaConcluida = new Hyperlink(); - public void setTableColumn9(TableColumn tc) { - this.tableColumn9 = tc; - } + public Hyperlink getLnkDataAberturaConcluida() + { + return lnkDataAberturaConcluida; + } - private Hyperlink lnkNomeConcluida = new Hyperlink(); + public void setLnkDataAberturaConcluida( Hyperlink h ) + { + this.lnkDataAberturaConcluida = h; + } + private StaticText lblUser = new StaticText(); - public Hyperlink getLnkNomeConcluida() { - return lnkNomeConcluida; - } + public StaticText getLblUser() + { + return lblUser; + } - public void setLnkNomeConcluida(Hyperlink h) { - this.lnkNomeConcluida = h; - } + public void setLblUser( StaticText st ) + { + this.lblUser = st; + } + private Hyperlink lnkPlanosActuacao = new Hyperlink(); - private TableColumn tableColumn10 = new TableColumn(); + public Hyperlink getLnkPlanosActuacao() + { + return lnkPlanosActuacao; + } - public TableColumn getTableColumn10() { - return tableColumn10; - } + public void setLnkPlanosActuacao( Hyperlink h ) + { + this.lnkPlanosActuacao = h; + } + private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid(); - public void setTableColumn10(TableColumn tc) { - this.tableColumn10 = tc; - } + public HtmlPanelGrid getGridPanelFilterSeg() + { + return this.gridPanelFilterSeg; + } - private Hyperlink lnkEstabConcluida = new Hyperlink(); + public void setGridPanelFilterSeg( HtmlPanelGrid pg ) + { + this.gridPanelFilterSeg = pg; + } + private PanelGroup groupPanelFilterSeg = new PanelGroup(); - public Hyperlink getLnkEstabConcluida() { - return lnkEstabConcluida; - } + public PanelGroup getGroupPanelFilterSeg() + { + return this.groupPanelFilterSeg; + } - public void setLnkEstabConcluida(Hyperlink h) { - this.lnkEstabConcluida = h; - } + public void setGroupPanelFilterSeg( PanelGroup pg ) + { + this.groupPanelFilterSeg = pg; + } + private StaticText labelFilterNameSeg = new StaticText(); - private StaticText txtSearchMsg = new StaticText(); + public StaticText getLabelFilterNameSeg() + { + return this.labelFilterNameSeg; + } - public StaticText getTxtSearchMsg() { - return txtSearchMsg; - } + public void setLabelFilterNameSeg( StaticText st ) + { + this.labelFilterNameSeg = st; + } + private TextField textFilterNameSeg = new TextField(); - public void setTxtSearchMsg(StaticText st) { - this.txtSearchMsg = st; - } + public TextField getTextFilterNameSeg() + { + return this.textFilterNameSeg; + } - private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); + public void setTextFilterNameSeg( TextField tf ) + { + this.textFilterNameSeg = tf; + } + private StaticText labelFilterEstabelecimentoSeg = new StaticText(); - public HtmlPanelGrid getGridPanel7() { - return gridPanel7; - } + public StaticText getLabelFilterEstabelecimentoSeg() + { + return labelFilterEstabelecimentoSeg; + } - public void setGridPanel7(HtmlPanelGrid hpg) { - this.gridPanel7 = hpg; - } + public void setLabelFilterEstabelecimentoSeg( StaticText labelFilterEstabelecimentoSeg ) + { + this.labelFilterEstabelecimentoSeg = labelFilterEstabelecimentoSeg; + } + private TextField textFilterEstabelecimentoSeg = new TextField(); - private PanelGroup groupPanel8 = new PanelGroup(); + public TextField getTextFilterEstabelecimentoSeg() + { + return textFilterEstabelecimentoSeg; + } - public PanelGroup getGroupPanel8() { - return groupPanel8; - } + public void setTextFilterEstabelecimentoSeg( TextField textFilterEstabelecimentoSeg ) + { + this.textFilterEstabelecimentoSeg = textFilterEstabelecimentoSeg; + } + private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar(); - public void setGroupPanel8(PanelGroup pg) { - this.groupPanel8 = pg; - } + public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg() + { + return this.calFilterDateSeg; + } - private StaticText staticText7 = new StaticText(); + public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c ) + { + this.calFilterDateSeg = c; + } + private TextField textFilterPORSeg = new TextField(); - public StaticText getStaticText7() { - return staticText7; - } + public TextField getTextFilterPORSeg() + { + return textFilterPORSeg; + } - public void setStaticText7(StaticText st) { - this.staticText7 = st; - } + public void setTextFilterPORSeg( TextField textFilterPORSeg ) + { + this.textFilterPORSeg = textFilterPORSeg; + } + private Button buttonFilterSeg = new Button(); - private ImageComponent image3 = new ImageComponent(); + public Button getButtonFilterSeg() + { + return this.buttonFilterSeg; + } - public ImageComponent getImage3() { - return image3; - } + public void setButtonFilterSeg( Button b ) + { + this.buttonFilterSeg = b; + } + private TextField textFilterEstabelecimentoConc = new TextField(); - public void setImage3(ImageComponent ic) { - this.image3 = ic; - } + public TextField getTextFilterEstabelecimentoConc() + { + return textFilterEstabelecimentoConc; + } - private StaticText staticText8 = new StaticText(); + public void setTextFilterEstabelecimentoConc( TextField textFilterEstabelecimentoConc ) + { + this.textFilterEstabelecimentoConc = textFilterEstabelecimentoConc; + } + private DropDown dropCurrentYear = new DropDown(); - public StaticText getStaticText8() { - return staticText8; - } + public DropDown getDropCurrentYear() + { + return dropCurrentYear; + } - public void setStaticText8(StaticText st) { - this.staticText8 = st; - } + public void setDropCurrentYear( DropDown dropCurrentYear ) + { + this.dropCurrentYear = dropCurrentYear; + } + private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" ); + //
- private TableColumn tableColumn11 = new TableColumn(); + /** + *

Construct a new Page bean instance.

+ */ + public FormDirGerRh() + { + } - public TableColumn getTableColumn11() { - return tableColumn11; - } + /** + *

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.

+ */ + @Override + public void init() + { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized - public void setTableColumn11(TableColumn tc) { - this.tableColumn11 = tc; - } + if ( !getSessionBean1().isLoggedIn() ) + { + try + { + getExternalContext().redirect( "Login.jsp" ); + } + catch ( Exception e ) + { + // . . . handle exception . . . + } + } - private Hyperlink lnkDataAberturaSeg = new Hyperlink(); - public Hyperlink getLnkDataAberturaSeg() { - return lnkDataAberturaSeg; - } + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try + { + _init(); + } + catch ( Exception e ) + { + log( "FormDirGerRh Initialization Failure", e ); + throw e instanceof FacesException ? ( FacesException ) e : new FacesException( e ); + } - public void setLnkDataAberturaSeg(Hyperlink h) { - this.lnkDataAberturaSeg = h; - } + // + // Perform application initialization that must complete + // *after* managed components are initialized + } - private TableColumn tableColumn12 = new TableColumn(); + /** + *

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.

+ */ + @Override + public void preprocess() + { + } - public TableColumn getTableColumn12() { - return tableColumn12; - } + private void fillInitialForm() + { + Integer fromYear = getSelectedYear(); - public void setTableColumn12(TableColumn tc) { - this.tableColumn12 = tc; - } + try + { + table1.setRendered( true ); - private TableColumn tableColumn13 = new TableColumn(); + ArrayList seguimentoList = AnalisesDataProvider.getInstance().getAnalisesSeguimentoDirGerRhList( fromYear ); + getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); + } + catch ( Exception ex ) + { + table1.setRendered( false ); + ErrorLogger.logException( ex ); + } - public TableColumn getTableColumn13() { - return tableColumn13; - } + try + { + table2.setRendered( true ); - public void setTableColumn13(TableColumn tc) { - this.tableColumn13 = tc; - } + ArrayList concluidasList = AnalisesDataProvider.getInstance().getAnalisesConcluidasList( null, fromYear ); + getSessionBean1().getAnalisesConcluidasDataProvider().setList( concluidasList ); + } + catch ( Exception ex ) + { + table2.setRendered( false ); + ErrorLogger.logException( ex ); + } + } - private Hyperlink lnkDataAberturaConcluida = new Hyperlink(); + /** + *

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.

+ */ + @Override + public void prerender() + { + System.out.println( "=== FORM_DIR_GER_RH ===" ); + lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); - public Hyperlink getLnkDataAberturaConcluida() { - return lnkDataAberturaConcluida; - } + HttpServletRequest request = ( HttpServletRequest ) getExternalContext().getRequest(); + String referer = request.getRequestURI(); + String pageFrom = Utils.getPageFrom( referer ); + if ( !pageFrom.matches( "FormDirGerRh.jsp" ) ) + { + fillCurrentYearDrop(); + fillInitialForm(); - public void setLnkDataAberturaConcluida(Hyperlink h) { - this.lnkDataAberturaConcluida = h; - } - private StaticText lblUser = new StaticText(); + fillAnoDropDown(); + } + } - public StaticText getLblUser() { - return lblUser; - } + /** + *

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).

+ */ + @Override + public void destroy() + { + } - public void setLblUser(StaticText st) { - this.lblUser = st; - } - private Hyperlink lnkPlanosActuacao = new Hyperlink(); + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() + { + return ( SessionBean1 ) getBean( "SessionBean1" ); + } - public Hyperlink getLnkPlanosActuacao() { - return lnkPlanosActuacao; - } + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() + { + return ( RequestBean1 ) getBean( "RequestBean1" ); + } - public void setLnkPlanosActuacao(Hyperlink h) { - this.lnkPlanosActuacao = h; - } - + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() + { + return ( ApplicationBean1 ) getBean( "ApplicationBean1" ); + } - private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid(); - public HtmlPanelGrid getGridPanelFilterSeg() + public String lnkAnalisesAcidente_action() { - return this.gridPanelFilterSeg; + return null; } - public void setGridPanelFilterSeg( HtmlPanelGrid pg ) + + public String lnkNewUser_action() { - this.gridPanelFilterSeg = pg; + return null; } - private PanelGroup groupPanelFilterSeg = new PanelGroup(); - public PanelGroup getGroupPanelFilterSeg() + public String lnkEditUser_action() { - return this.groupPanelFilterSeg; + getSessionBean1().setNavFrom( "FormDirGerRh" ); + getSessionBean1().setModoEdicaoUtilizador( "edit" ); + return "user"; } - public void setGroupPanelFilterSeg( PanelGroup pg ) + + public String lnkLogout_action() { - this.groupPanelFilterSeg = pg; + Utils.doLogout( getExternalContext(), true ); + return null; } - private StaticText labelFilterNameSeg = new StaticText(); - public StaticText getLabelFilterNameSeg() + public String lnkDataAcidenteSeg_action() { - return this.labelFilterNameSeg; + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirGerRh" ); + return "view_analise"; } - public void setLabelFilterNameSeg( StaticText st ) + + public String lnkDataAberturaSeg_action() { - this.labelFilterNameSeg = st; + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirGerRh" ); + return "view_analise"; } - private TextField textFilterNameSeg = new TextField(); - public TextField getTextFilterNameSeg() + public String lnkNrSeg_action() { - return this.textFilterNameSeg; + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirGerRh" ); + return "view_analise"; } - public void setTextFilterNameSeg( TextField tf ) + + public String lnkPorSeg_action() { - this.textFilterNameSeg = tf; + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirGerRh" ); + return "view_analise"; } - private StaticText labelFilterEstabelecimentoSeg = new StaticText(); - public StaticText getLabelFilterEstabelecimentoSeg() { - return labelFilterEstabelecimentoSeg; + public String lnkNomeAcidentadoSeg_action() + { + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirGerRh" ); + return "view_analise"; } - public void setLabelFilterEstabelecimentoSeg(StaticText labelFilterEstabelecimentoSeg) { - this.labelFilterEstabelecimentoSeg = labelFilterEstabelecimentoSeg; + + public String lnkFaseSeg_action() + { + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirGerRh" ); + return "view_analise"; } - private TextField textFilterEstabelecimentoSeg = new TextField(); + public String lnkEstabelecimentoSeg_action() + { + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirGerRh" ); + return "view_analise"; + } - public TextField getTextFilterEstabelecimentoSeg() { - return textFilterEstabelecimentoSeg; + private AnaliseAcidente getTableSeguimentoRowData() + { + RowKey rk = tableRowGroup1.getRowKey(); + int k = Integer.parseInt( rk.getRowId() ); + AnalisesSeguimentoDataProvider provider = ( AnalisesSeguimentoDataProvider ) tableRowGroup1.getSourceData(); + ArrayList list = ( ArrayList ) provider.getList(); + AnaliseAcidente a = ( AnaliseAcidente ) list.get( k ); + return a; } - public void setTextFilterEstabelecimentoSeg(TextField textFilterEstabelecimentoSeg) { - this.textFilterEstabelecimentoSeg = textFilterEstabelecimentoSeg; + + public void drpAno_processValueChange( ValueChangeEvent event ) + { + 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(); + } } - private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar(); - public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg() + public void drpMes_processValueChange( ValueChangeEvent event ) { - return this.calFilterDateSeg; + Object mes = event.getNewValue(); + if ( mes == null ) + { + lblDia.setVisible( false ); + drpDia.setVisible( false ); + } + else + { + lblDia.setVisible( true ); + drpDia.setVisible( true ); + //fillDiaDropDown(); + } } - public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c ) + + public void drpDia_processValueChange( ValueChangeEvent event ) { - this.calFilterDateSeg = c; } - private TextField textFilterPORSeg = new TextField(); + public String butPesquisar_action() + { + Object obAno = null; + Object obMes = null; + Object obDia = null; + try + { + obAno = drpAno.getSelected(); + obMes = drpMes.getSelected(); + obDia = drpDia.getSelected(); + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } - public TextField getTextFilterPORSeg() { - return textFilterPORSeg; + 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 por = null; + if ( txtPor.getText() != null ) + { + por = ( String ) txtPor.getText(); + if ( por.trim().length() == 0 ) + { + por = null; + } + } + + String nome = null; + if ( txtNome.getText() != null ) + { + nome = ( String ) txtNome.getText(); + if ( nome.trim().length() == 0 ) + { + nome = null; + } + } + + String estabelecimento = null; + if ( textFilterEstabelecimentoConc.getText() != null ) + { + estabelecimento = (( String ) textFilterEstabelecimentoConc.getText()).trim(); + if ( estabelecimento.length() == 0 ) + { + estabelecimento = null; + } + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList()); + ArrayList concluidasList = adp.searchAnalisesConcluidasList( + null, ano, mes, dia, por, nome, estabelecimento, getSelectedYear() ); + + table2.setRendered( true ); + txtSearchMsg.setRendered( false ); + getSessionBean1().getAnalisesConcluidasDataProvider().setList( concluidasList ); + } + catch ( Exception ex ) + { + table2.setRendered( false ); + txtSearchMsg.setRendered( true ); + txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); + ErrorLogger.logException( ex ); + } + return null; } - public void setTextFilterPORSeg(TextField textFilterPORSeg) { - this.textFilterPORSeg = textFilterPORSeg; + public String lnkDataConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirGerRh" ); + return "view_analise"; } - - private Button buttonFilterSeg = new Button(); - public Button getButtonFilterSeg() + public String lnkDataAberturaConcluida_action() { - return this.buttonFilterSeg; + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirGerRh" ); + return "view_analise"; } - public void setButtonFilterSeg( Button b ) + + public String lnkNrConcluida_action() { - this.buttonFilterSeg = b; + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirGerRh" ); + return "view_analise"; } - private TextField textFilterEstabelecimentoConc = new TextField(); + public String lnkPorConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirGerRh" ); + return "view_analise"; + } - public TextField getTextFilterEstabelecimentoConc() { - return textFilterEstabelecimentoConc; + public String lnkNomeConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirGerRh" ); + return "view_analise"; } - public void setTextFilterEstabelecimentoConc(TextField textFilterEstabelecimentoConc) { - this.textFilterEstabelecimentoConc = textFilterEstabelecimentoConc; + public String lnkEstabConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirGerRh" ); + return "view_analise"; } - private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" ); - //
- - - /** - *

Construct a new Page bean instance.

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

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 - - if (!getSessionBean1().isLoggedIn()) { - try { - getExternalContext().redirect("Login.jsp"); - } catch(Exception e) { - // . . . handle exception . . . - } - } - - - // - // Initialize automatically managed components - // *Note* - this logic should NOT be modified - try { - _init(); - } catch (Exception e) { - log("FormDirGerRh 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() { - System.out.println("=== FORM_DIR_GER_RH ==="); - lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); - - HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest(); - String referer = request.getRequestURI(); - String pageFrom = Utils.getPageFrom(referer); - if(!pageFrom.matches("FormDirGerRh.jsp")) - { - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - //lblActivos.setRendered(true); - table1.setRendered(true); - - ArrayList seguimentoList = adp.getAnalisesSeguimentoDirGerRhList(); - getSessionBean1().getAnalisesSeguimentoDataProvider().setList(seguimentoList); - } - catch(Exception ex) - { - //lblActivos.setRendered(false); - table1.setRendered(false); - ErrorLogger.logException( ex ); - } - - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - //lblActivos.setRendered(true); - table2.setRendered(true); - - ArrayList concluidasList = adp.getAnalisesConcluidasList(null); - getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); - } - catch(Exception ex) - { - //lblActivos.setRendered(false); - table2.setRendered(false); - ErrorLogger.logException( ex ); - } - 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 lnkAnalisesAcidente_action() { - // TODO: Replace with your code - - return null; - } - - public String lnkNewUser_action() { - // TODO: Replace with your code - - return null; - } - - public String lnkEditUser_action() { - // TODO: Replace with your code - - getSessionBean1().setNavFrom("FormDirGerRh"); - getSessionBean1().setModoEdicaoUtilizador("edit"); - return "user"; - } - - public String lnkLogout_action() + private AnaliseAcidente getTableConcluidasRowData() { - Utils.doLogout( getExternalContext(), true ); - return null; - } - - public String lnkDataAcidenteSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirGerRh"); - return "view_analise"; - - } - - public String lnkDataAberturaSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirGerRh"); - return "view_analise"; - } - - public String lnkNrSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirGerRh"); - return "view_analise"; - - } - - public String lnkPorSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirGerRh"); - return "view_analise"; - - } - - public String lnkNomeAcidentadoSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirGerRh"); - return "view_analise"; - - } - - public String lnkFaseSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirGerRh"); - return "view_analise"; - - } - - - public String lnkEstabelecimentoSeg_action() { - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirGerRh"); - return "view_analise"; - } - - private AnaliseAcidente getTableSeguimentoRowData() - { - RowKey rk = tableRowGroup1.getRowKey(); - int k = Integer.parseInt(rk.getRowId()); - AnalisesSeguimentoDataProvider provider = (AnalisesSeguimentoDataProvider) tableRowGroup1.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) - { - ErrorLogger.logException( ex ); - } - - 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 por = null; - if(txtPor.getText() != null) - { - por = (String) txtPor.getText(); - if(por.trim().length() == 0) - { - por = null; - } - } - - String nome = null; - if(txtNome.getText() != null) - { - nome = (String) txtNome.getText(); - if(nome.trim().length() == 0) - { - nome = null; - } - } + RowKey rk = tableRowGroup2.getRowKey(); + int k = Integer.parseInt( rk.getRowId() ); + AnalisesConcluidasDataProvider provider = ( AnalisesConcluidasDataProvider ) tableRowGroup2.getSourceData(); + ArrayList list = ( ArrayList ) provider.getList(); + AnaliseAcidente a = ( AnaliseAcidente ) list.get( k ); + return a; + } - String estabelecimento = null; - if ( textFilterEstabelecimentoConc.getText() != null ) - { - estabelecimento = (( String ) textFilterEstabelecimentoConc.getText()).trim(); - if( estabelecimento.length() == 0 ) - { - estabelecimento = null; - } - } - - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList()); - ArrayList concluidasList = adp.searchAanalisesConcluidasList( - null, ano, mes, dia, por, nome, estabelecimento ); - - table2.setRendered(true); - txtSearchMsg.setRendered(false); - getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); - } - catch(Exception ex) - { - table2.setRendered(false); - txtSearchMsg.setRendered(true); - txtSearchMsg.setText("Não foram encontrados registos para a sua pesquisa !"); - ErrorLogger.logException( ex ); - } - - return null; - } - - public String lnkDataConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirGerRh"); - return "view_analise"; - - } - - public String lnkDataAberturaConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirGerRh"); - return "view_analise"; - } - - public String lnkNrConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirGerRh"); - return "view_analise"; - - } - - public String lnkPorConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirGerRh"); - return "view_analise"; - - } - - public String lnkNomeConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirGerRh"); - return "view_analise"; - - } - - public String lnkEstabConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirGerRh"); - return "view_analise"; - - } - - private AnaliseAcidente getTableConcluidasRowData() - { - RowKey rk = tableRowGroup2.getRowKey(); - int k = Integer.parseInt(rk.getRowId()); - AnalisesConcluidasDataProvider provider = (AnalisesConcluidasDataProvider) tableRowGroup2.getSourceData(); - ArrayList list = (ArrayList) provider.getList(); - AnaliseAcidente a = (AnaliseAcidente)list.get(k); - return a; - } - - - public String lnkGerirUtilizadores_action() { - // TODO: Replace with your code - - getSessionBean1().setNavFrom("FormDirGerRh"); - //getSessionBean1().setModoEdicaoUtilizador("new"); - return "gestao_utilizadores"; - - } - - private void fillAnoDropDown() - { + public String lnkGerirUtilizadores_action() + { + getSessionBean1().setNavFrom( "FormDirGerRh" ); + //getSessionBean1().setModoEdicaoUtilizador("new"); + return "gestao_utilizadores"; + + } + + private void fillAnoDropDown() + { // ArrayList anosList = new ArrayList(); // for(int ano=2007; ano<2051; ano++) // { // anosList.add(new Integer(ano)); // } - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - ArrayList anosList = adp.getAnosListFromAnalises(); - 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) ); - - } - catch(Exception ex) - { - ErrorLogger.logException( ex ); - } - - } - - - 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) ); - } - + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList anosList = adp.getAnosListFromAnalises(); + 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) ); + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } + } + + 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 lnkAjuda_action() { - // TODO: Replace with your code + public String lnkAjuda_action() + { // ServletContext theApplicationsServletContext = // (ServletContext) this.getExternalContext().getContext(); // String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL); @@ -1464,15 +1547,15 @@ public class FormDirGerRh extends AbstractPageBean { // { // ErrorLogger.logException( ex ); // } - return null; - } + return null; + } - public String lnkPlanosActuacao_action() { - // TODO: Replace with your code - Utilizador u = getSessionBean1().getCurrentUser(); + public String lnkPlanosActuacao_action() + { + Utilizador u = getSessionBean1().getCurrentUser(); // String curUser = "?user=" + u.getId().toString(); - FacesContext fc = getFacesContext().getCurrentInstance(); - Global.redirectToPlanos(fc, u); + FacesContext fc = getFacesContext().getCurrentInstance(); + Global.redirectToPlanos( fc, u ); // Utilizador u = getSessionBean1().getCurrentUser(); // String curUser = "?user=" + u.getId().toString(); // FacesContext fc = getFacesContext().getCurrentInstance(); @@ -1484,8 +1567,8 @@ public class FormDirGerRh extends AbstractPageBean { // { // ErrorLogger.logException( ex ); // } - return null; - } + return null; + } public String buttonFilterSeg_action() { @@ -1499,22 +1582,22 @@ public class FormDirGerRh extends AbstractPageBean { String POR = null; if ( textFilterPORSeg.getText() != null ) { - POR = ( ( String ) textFilterPORSeg.getText() ).trim(); + POR = (( String ) textFilterPORSeg.getText()).trim(); if ( POR.length() == 0 ) { POR = null; } } - String nome = null; - if ( textFilterNameSeg.getText() != null ) - { - nome = (( String ) textFilterNameSeg.getText()).trim(); - if( nome.length() == 0 ) - { - nome = null; - } - } + String nome = null; + if ( textFilterNameSeg.getText() != null ) + { + nome = (( String ) textFilterNameSeg.getText()).trim(); + if ( nome.length() == 0 ) + { + nome = null; + } + } String estabelecimento = null; if ( textFilterEstabelecimentoSeg.getText() != null ) @@ -1526,26 +1609,66 @@ public class FormDirGerRh extends AbstractPageBean { } } - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - ArrayList seguimentoList = adp.searchAnalisesSeguimentoDirGerRh( nome, estabelecimento, visitaDateStr, POR ); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList seguimentoList = adp.searchAnalisesSeguimentoDirGerRh( + nome, estabelecimento, visitaDateStr, POR, getSelectedYear() ); table1.setRendered( true ); - txtSearchMsg.setRendered( false ); - getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); - } - catch( Exception e ) - { + txtSearchMsg.setRendered( false ); + getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); + } + catch ( Exception e ) + { table1.setRendered( false ); - txtSearchMsg.setRendered( true ); - txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); + txtSearchMsg.setRendered( true ); + txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); ErrorLogger.logException( e ); - } + } return null; } + public void dropCurrentYear_valueChangeListener( ValueChangeEvent event ) + { + Object oldValue = event.getOldValue(); + Object newValue = event.getNewValue(); + + if ( newValue != null && newValue instanceof Integer ) + { + Integer newYear = ( Integer ) newValue; + Integer oldYear = oldValue != null && oldValue instanceof Integer ? ( Integer ) oldValue : null; + if ( oldYear == null || !newYear.equals( oldYear ) ) + { + fillInitialForm(); + } + } + } + + private Integer getSelectedYear() + { + Integer result = null; + if ( dropCurrentYear != null ) + { + Object selected = dropCurrentYear.getSelected(); + if ( selected != null && selected instanceof Integer ) + { + result = ( Integer ) selected; + } + } + return result; + } + + private void fillCurrentYearDrop() + { + Integer selectedYear = getSelectedYear(); + + Option[] opts = Utils.getYearDropValues(); + dropCurrentYear.setItems( opts ); + + dropCurrentYear.setSelected( selectedYear != null ? selectedYear : opts.length > 0 ? opts[ 0].getValue() : null ); + } } diff --git a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormDirSiprp.java b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormDirSiprp.java index 6731b771..394cccf6 100755 --- a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormDirSiprp.java +++ b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormDirSiprp.java @@ -53,1426 +53,1499 @@ import utils.Utils; * lifecycle methods and event handlers where you may add behavior * to respond to incoming events.

*/ -public class FormDirSiprp 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 HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid(); - - public HtmlPanelGrid getGridLayoutTop1() { - return gridLayoutTop1; - } +public class FormDirSiprp 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 void setGridLayoutTop1(HtmlPanelGrid hpg) { - this.gridLayoutTop1 = hpg; - } + public Page getPage1() + { + return page1; + } - private HtmlPanelGrid gridSeguimento1 = new HtmlPanelGrid(); + public void setPage1( Page p ) + { + this.page1 = p; + } + private Html html1 = new Html(); - public HtmlPanelGrid getGridSeguimento1() { - return gridSeguimento1; - } + public Html getHtml1() + { + return html1; + } - public void setGridSeguimento1(HtmlPanelGrid hpg) { - this.gridSeguimento1 = hpg; - } + public void setHtml1( Html h ) + { + this.html1 = h; + } + private Head head1 = new Head(); - private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); + public Head getHead1() + { + return head1; + } - public HtmlPanelGrid getGridPanel4() { - return gridPanel4; - } + public void setHead1( Head h ) + { + this.head1 = h; + } + private Link link1 = new Link(); - public void setGridPanel4(HtmlPanelGrid hpg) { - this.gridPanel4 = hpg; - } + public Link getLink1() + { + return link1; + } - private StaticText staticText4 = new StaticText(); + public void setLink1( Link l ) + { + this.link1 = l; + } + private Body body1 = new Body(); - public StaticText getStaticText4() { - return staticText4; - } + public Body getBody1() + { + return body1; + } - public void setStaticText4(StaticText st) { - this.staticText4 = st; - } + public void setBody1( Body b ) + { + this.body1 = b; + } + private Form form1 = new Form(); - private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); + public Form getForm1() + { + return form1; + } - public HtmlPanelGrid getGridPanel5() { - return gridPanel5; - } + public void setForm1( Form f ) + { + this.form1 = f; + } + private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); - public void setGridPanel5(HtmlPanelGrid hpg) { - this.gridPanel5 = hpg; - } + public HtmlPanelGrid getGridBase1() + { + return gridBase1; + } - private Table table2 = new Table(); + public void setGridBase1( HtmlPanelGrid hpg ) + { + this.gridBase1 = hpg; + } + private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); - public Table getTable2() { - return table2; - } + public HtmlPanelGrid getGridLayout1() + { + return gridLayout1; + } - public void setTable2(Table t) { - this.table2 = t; - } + public void setGridLayout1( HtmlPanelGrid hpg ) + { + this.gridLayout1 = hpg; + } + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); - private TableRowGroup tableRowGroup2 = new TableRowGroup(); + public HtmlPanelGrid getGridPanel1() + { + return gridPanel1; + } - public TableRowGroup getTableRowGroup2() { - return tableRowGroup2; - } + public void setGridPanel1( HtmlPanelGrid hpg ) + { + this.gridPanel1 = hpg; + } + private PanelGroup groupPanel1 = new PanelGroup(); - public void setTableRowGroup2(TableRowGroup trg) { - this.tableRowGroup2 = trg; - } + public PanelGroup getGroupPanel1() + { + return groupPanel1; + } - private TableColumn tableColumn6 = new TableColumn(); + public void setGroupPanel1( PanelGroup pg ) + { + this.groupPanel1 = pg; + } + private ImageComponent image1 = new ImageComponent(); - public TableColumn getTableColumn6() { - return tableColumn6; - } + public ImageComponent getImage1() + { + return image1; + } - public void setTableColumn6(TableColumn tc) { - this.tableColumn6 = tc; - } + public void setImage1( ImageComponent ic ) + { + this.image1 = ic; + } + private ImageComponent image2 = new ImageComponent(); - private Hyperlink lnkDataAcidenteSeg = new Hyperlink(); + public ImageComponent getImage2() + { + return image2; + } - public Hyperlink getLnkDataAcidenteSeg() { - return lnkDataAcidenteSeg; - } + public void setImage2( ImageComponent ic ) + { + this.image2 = ic; + } + private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid(); - public void setLnkDataAcidenteSeg(Hyperlink h) { - this.lnkDataAcidenteSeg = h; - } + public HtmlPanelGrid getGridLayoutTop1() + { + return gridLayoutTop1; + } - private TableColumn tableColumn7 = new TableColumn(); + public void setGridLayoutTop1( HtmlPanelGrid hpg ) + { + this.gridLayoutTop1 = hpg; + } + private HtmlPanelGrid gridSeguimento1 = new HtmlPanelGrid(); - public TableColumn getTableColumn7() { - return tableColumn7; - } + public HtmlPanelGrid getGridSeguimento1() + { + return gridSeguimento1; + } - public void setTableColumn7(TableColumn tc) { - this.tableColumn7 = tc; - } + public void setGridSeguimento1( HtmlPanelGrid hpg ) + { + this.gridSeguimento1 = hpg; + } + private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); - private Hyperlink lnkNrSeg = new Hyperlink(); + public HtmlPanelGrid getGridPanel4() + { + return gridPanel4; + } - public Hyperlink getLnkNrSeg() { - return lnkNrSeg; - } + public void setGridPanel4( HtmlPanelGrid hpg ) + { + this.gridPanel4 = hpg; + } + private StaticText staticText4 = new StaticText(); - public void setLnkNrSeg(Hyperlink h) { - this.lnkNrSeg = h; - } + public StaticText getStaticText4() + { + return staticText4; + } - private TableColumn tableColumn8 = new TableColumn(); + public void setStaticText4( StaticText st ) + { + this.staticText4 = st; + } + private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); - public TableColumn getTableColumn8() { - return tableColumn8; - } + public HtmlPanelGrid getGridPanel5() + { + return gridPanel5; + } - public void setTableColumn8(TableColumn tc) { - this.tableColumn8 = tc; - } + public void setGridPanel5( HtmlPanelGrid hpg ) + { + this.gridPanel5 = hpg; + } + private Table table2 = new Table(); - private Hyperlink lnkPorSeg = new Hyperlink(); + public Table getTable2() + { + return table2; + } - public Hyperlink getLnkPorSeg() { - return lnkPorSeg; - } + public void setTable2( Table t ) + { + this.table2 = t; + } + private TableRowGroup tableRowGroup2 = new TableRowGroup(); - public void setLnkPorSeg(Hyperlink h) { - this.lnkPorSeg = h; - } + public TableRowGroup getTableRowGroup2() + { + return tableRowGroup2; + } - private TableColumn tableColumn9 = new TableColumn(); + public void setTableRowGroup2( TableRowGroup trg ) + { + this.tableRowGroup2 = trg; + } + private TableColumn tableColumn6 = new TableColumn(); - public TableColumn getTableColumn9() { - return tableColumn9; - } + public TableColumn getTableColumn6() + { + return tableColumn6; + } - public void setTableColumn9(TableColumn tc) { - this.tableColumn9 = tc; - } + public void setTableColumn6( TableColumn tc ) + { + this.tableColumn6 = tc; + } + private Hyperlink lnkDataAcidenteSeg = new Hyperlink(); - private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink(); + public Hyperlink getLnkDataAcidenteSeg() + { + return lnkDataAcidenteSeg; + } - public Hyperlink getLnkNomeAcidentadoSeg() { - return lnkNomeAcidentadoSeg; - } + public void setLnkDataAcidenteSeg( Hyperlink h ) + { + this.lnkDataAcidenteSeg = h; + } + private TableColumn tableColumn7 = new TableColumn(); - public void setLnkNomeAcidentadoSeg(Hyperlink h) { - this.lnkNomeAcidentadoSeg = h; - } + public TableColumn getTableColumn7() + { + return tableColumn7; + } - private TableColumn tableColumn10 = new TableColumn(); + public void setTableColumn7( TableColumn tc ) + { + this.tableColumn7 = tc; + } + private Hyperlink lnkNrSeg = new Hyperlink(); - public TableColumn getTableColumn10() { - return tableColumn10; - } + public Hyperlink getLnkNrSeg() + { + return lnkNrSeg; + } - public void setTableColumn10(TableColumn tc) { - this.tableColumn10 = tc; - } + public void setLnkNrSeg( Hyperlink h ) + { + this.lnkNrSeg = h; + } + private TableColumn tableColumn8 = new TableColumn(); - private Hyperlink lnkFaseSeg = new Hyperlink(); + public TableColumn getTableColumn8() + { + return tableColumn8; + } - public Hyperlink getLnkFaseSeg() { - return lnkFaseSeg; - } + public void setTableColumn8( TableColumn tc ) + { + this.tableColumn8 = tc; + } + private Hyperlink lnkPorSeg = new Hyperlink(); - public void setLnkFaseSeg(Hyperlink h) { - this.lnkFaseSeg = h; - } + public Hyperlink getLnkPorSeg() + { + return lnkPorSeg; + } - private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid(); + public void setLnkPorSeg( Hyperlink h ) + { + this.lnkPorSeg = h; + } + private TableColumn tableColumn9 = new TableColumn(); - public HtmlPanelGrid getGridConcluidos1() { - return gridConcluidos1; - } + public TableColumn getTableColumn9() + { + return tableColumn9; + } - public void setGridConcluidos1(HtmlPanelGrid hpg) { - this.gridConcluidos1 = hpg; - } + public void setTableColumn9( TableColumn tc ) + { + this.tableColumn9 = tc; + } + private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink(); - private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); + public Hyperlink getLnkNomeAcidentadoSeg() + { + return lnkNomeAcidentadoSeg; + } - public HtmlPanelGrid getGridPanel6() { - return gridPanel6; - } + public void setLnkNomeAcidentadoSeg( Hyperlink h ) + { + this.lnkNomeAcidentadoSeg = h; + } + private TableColumn tableColumn10 = new TableColumn(); - public void setGridPanel6(HtmlPanelGrid hpg) { - this.gridPanel6 = hpg; - } + public TableColumn getTableColumn10() + { + return tableColumn10; + } - private StaticText staticText5 = new StaticText(); + public void setTableColumn10( TableColumn tc ) + { + this.tableColumn10 = tc; + } + private Hyperlink lnkFaseSeg = new Hyperlink(); - public StaticText getStaticText5() { - return staticText5; - } + public Hyperlink getLnkFaseSeg() + { + return lnkFaseSeg; + } - public void setStaticText5(StaticText st) { - this.staticText5 = st; - } + public void setLnkFaseSeg( Hyperlink h ) + { + this.lnkFaseSeg = h; + } + private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid(); - private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); + public HtmlPanelGrid getGridConcluidos1() + { + return gridConcluidos1; + } - public HtmlPanelGrid getGridPanel7() { - return gridPanel7; - } + public void setGridConcluidos1( HtmlPanelGrid hpg ) + { + this.gridConcluidos1 = hpg; + } + private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); - public void setGridPanel7(HtmlPanelGrid hpg) { - this.gridPanel7 = hpg; - } + public HtmlPanelGrid getGridPanel6() + { + return gridPanel6; + } - private PanelGroup groupPanel3 = new PanelGroup(); + public void setGridPanel6( HtmlPanelGrid hpg ) + { + this.gridPanel6 = hpg; + } + private StaticText staticText5 = new StaticText(); - public PanelGroup getGroupPanel3() { - return groupPanel3; - } + public StaticText getStaticText5() + { + return staticText5; + } - public void setGroupPanel3(PanelGroup pg) { - this.groupPanel3 = pg; - } + public void setStaticText5( StaticText st ) + { + this.staticText5 = st; + } + private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); - private StaticText staticText6 = new StaticText(); + public HtmlPanelGrid getGridPanel7() + { + return gridPanel7; + } - public StaticText getStaticText6() { - return staticText6; - } + public void setGridPanel7( HtmlPanelGrid hpg ) + { + this.gridPanel7 = hpg; + } + private PanelGroup groupPanel3 = new PanelGroup(); - public void setStaticText6(StaticText st) { - this.staticText6 = st; - } + public PanelGroup getGroupPanel3() + { + return groupPanel3; + } - private DropDown drpAno = new DropDown(); + public void setGroupPanel3( PanelGroup pg ) + { + this.groupPanel3 = pg; + } + private StaticText staticText6 = new StaticText(); - public DropDown getDrpAno() { - return drpAno; - } + public StaticText getStaticText6() + { + return staticText6; + } - public void setDrpAno(DropDown dd) { - this.drpAno = dd; - } + public void setStaticText6( StaticText st ) + { + this.staticText6 = st; + } + private DropDown drpAno = new DropDown(); - private PanelGroup groupPanel4 = new PanelGroup(); + public DropDown getDrpAno() + { + return drpAno; + } - public PanelGroup getGroupPanel4() { - return groupPanel4; - } + public void setDrpAno( DropDown dd ) + { + this.drpAno = dd; + } + private PanelGroup groupPanel4 = new PanelGroup(); - public void setGroupPanel4(PanelGroup pg) { - this.groupPanel4 = pg; - } + public PanelGroup getGroupPanel4() + { + return groupPanel4; + } - private StaticText lblMes = new StaticText(); + public void setGroupPanel4( PanelGroup pg ) + { + this.groupPanel4 = pg; + } + private StaticText lblMes = new StaticText(); - public StaticText getLblMes() { - return lblMes; - } + public StaticText getLblMes() + { + return lblMes; + } - public void setLblMes(StaticText st) { - this.lblMes = st; - } + public void setLblMes( StaticText st ) + { + this.lblMes = st; + } + private DropDown drpMes = new DropDown(); - private DropDown drpMes = new DropDown(); + public DropDown getDrpMes() + { + return drpMes; + } - public DropDown getDrpMes() { - return drpMes; - } + public void setDrpMes( DropDown dd ) + { + this.drpMes = dd; + } + private PanelGroup groupPanel5 = new PanelGroup(); - public void setDrpMes(DropDown dd) { - this.drpMes = dd; - } + public PanelGroup getGroupPanel5() + { + return groupPanel5; + } - private PanelGroup groupPanel5 = new PanelGroup(); + public void setGroupPanel5( PanelGroup pg ) + { + this.groupPanel5 = pg; + } + private StaticText lblDia = new StaticText(); - public PanelGroup getGroupPanel5() { - return groupPanel5; - } + public StaticText getLblDia() + { + return lblDia; + } - public void setGroupPanel5(PanelGroup pg) { - this.groupPanel5 = pg; - } + public void setLblDia( StaticText st ) + { + this.lblDia = st; + } + private DropDown drpDia = new DropDown(); - private StaticText lblDia = new StaticText(); + public DropDown getDrpDia() + { + return drpDia; + } - public StaticText getLblDia() { - return lblDia; - } + public void setDrpDia( DropDown dd ) + { + this.drpDia = dd; + } + private PanelGroup groupPanel6 = new PanelGroup(); - public void setLblDia(StaticText st) { - this.lblDia = st; - } + public PanelGroup getGroupPanel6() + { + return groupPanel6; + } - private DropDown drpDia = new DropDown(); + public void setGroupPanel6( PanelGroup pg ) + { + this.groupPanel6 = pg; + } + private StaticText staticText7 = new StaticText(); - public DropDown getDrpDia() { - return drpDia; - } + public StaticText getStaticText7() + { + return staticText7; + } - public void setDrpDia(DropDown dd) { - this.drpDia = dd; - } + public void setStaticText7( StaticText st ) + { + this.staticText7 = st; + } + private TextField txtPor = new TextField(); - private PanelGroup groupPanel6 = new PanelGroup(); + public TextField getTxtPor() + { + return txtPor; + } - public PanelGroup getGroupPanel6() { - return groupPanel6; - } + public void setTxtPor( TextField tf ) + { + this.txtPor = tf; + } + private PanelGroup groupPanel7 = new PanelGroup(); - public void setGroupPanel6(PanelGroup pg) { - this.groupPanel6 = pg; - } + public PanelGroup getGroupPanel7() + { + return groupPanel7; + } - private StaticText staticText7 = new StaticText(); + public void setGroupPanel7( PanelGroup pg ) + { + this.groupPanel7 = pg; + } + private StaticText staticText8 = new StaticText(); - public StaticText getStaticText7() { - return staticText7; - } + public StaticText getStaticText8() + { + return staticText8; + } - public void setStaticText7(StaticText st) { - this.staticText7 = st; - } + public void setStaticText8( StaticText st ) + { + this.staticText8 = st; + } + private TextField txtNome = new TextField(); - private TextField txtPor = new TextField(); + public TextField getTxtNome() + { + return txtNome; + } - public TextField getTxtPor() { - return txtPor; - } + public void setTxtNome( TextField tf ) + { + this.txtNome = tf; + } + private Button butPesquisar = new Button(); - public void setTxtPor(TextField tf) { - this.txtPor = tf; - } + public Button getButPesquisar() + { + return butPesquisar; + } - private PanelGroup groupPanel7 = new PanelGroup(); + public void setButPesquisar( Button b ) + { + this.butPesquisar = b; + } + private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); - public PanelGroup getGroupPanel7() { - return groupPanel7; - } + public HtmlPanelGrid getGridPanel8() + { + return gridPanel8; + } - public void setGroupPanel7(PanelGroup pg) { - this.groupPanel7 = pg; - } + public void setGridPanel8( HtmlPanelGrid hpg ) + { + this.gridPanel8 = hpg; + } + private Table table3 = new Table(); - private StaticText staticText8 = new StaticText(); + public Table getTable3() + { + return table3; + } - public StaticText getStaticText8() { - return staticText8; - } + public void setTable3( Table t ) + { + this.table3 = t; + } + private TableRowGroup tableRowGroup3 = new TableRowGroup(); - public void setStaticText8(StaticText st) { - this.staticText8 = st; - } + public TableRowGroup getTableRowGroup3() + { + return tableRowGroup3; + } - private TextField txtNome = new TextField(); + public void setTableRowGroup3( TableRowGroup trg ) + { + this.tableRowGroup3 = trg; + } + private TableColumn tableColumn11 = new TableColumn(); - public TextField getTxtNome() { - return txtNome; - } + public TableColumn getTableColumn11() + { + return tableColumn11; + } - public void setTxtNome(TextField tf) { - this.txtNome = tf; - } + public void setTableColumn11( TableColumn tc ) + { + this.tableColumn11 = tc; + } + private Hyperlink lnkDataConcluida = new Hyperlink(); - private Button butPesquisar = new Button(); + public Hyperlink getLnkDataConcluida() + { + return lnkDataConcluida; + } - public Button getButPesquisar() { - return butPesquisar; - } + public void setLnkDataConcluida( Hyperlink h ) + { + this.lnkDataConcluida = h; + } + private TableColumn tableColumn12 = new TableColumn(); - public void setButPesquisar(Button b) { - this.butPesquisar = b; - } + public TableColumn getTableColumn12() + { + return tableColumn12; + } - private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); + public void setTableColumn12( TableColumn tc ) + { + this.tableColumn12 = tc; + } + private Hyperlink lnkNrConcluida = new Hyperlink(); - public HtmlPanelGrid getGridPanel8() { - return gridPanel8; - } + public Hyperlink getLnkNrConcluida() + { + return lnkNrConcluida; + } - public void setGridPanel8(HtmlPanelGrid hpg) { - this.gridPanel8 = hpg; - } + public void setLnkNrConcluida( Hyperlink h ) + { + this.lnkNrConcluida = h; + } + private TableColumn tableColumn13 = new TableColumn(); - private Table table3 = new Table(); + public TableColumn getTableColumn13() + { + return tableColumn13; + } - public Table getTable3() { - return table3; - } + public void setTableColumn13( TableColumn tc ) + { + this.tableColumn13 = tc; + } + private Hyperlink lnkPorConcluida = new Hyperlink(); - public void setTable3(Table t) { - this.table3 = t; - } + public Hyperlink getLnkPorConcluida() + { + return lnkPorConcluida; + } - private TableRowGroup tableRowGroup3 = new TableRowGroup(); + public void setLnkPorConcluida( Hyperlink h ) + { + this.lnkPorConcluida = h; + } + private TableColumn tableColumn14 = new TableColumn(); - public TableRowGroup getTableRowGroup3() { - return tableRowGroup3; - } + public TableColumn getTableColumn14() + { + return tableColumn14; + } - public void setTableRowGroup3(TableRowGroup trg) { - this.tableRowGroup3 = trg; - } + public void setTableColumn14( TableColumn tc ) + { + this.tableColumn14 = tc; + } + private Hyperlink lnkNomeConcluida = new Hyperlink(); - private TableColumn tableColumn11 = new TableColumn(); + public Hyperlink getLnkNomeConcluida() + { + return lnkNomeConcluida; + } - public TableColumn getTableColumn11() { - return tableColumn11; - } + public void setLnkNomeConcluida( Hyperlink h ) + { + this.lnkNomeConcluida = h; + } + private TableColumn tableColumn15 = new TableColumn(); - public void setTableColumn11(TableColumn tc) { - this.tableColumn11 = tc; - } + public TableColumn getTableColumn15() + { + return tableColumn15; + } - private Hyperlink lnkDataConcluida = new Hyperlink(); + public void setTableColumn15( TableColumn tc ) + { + this.tableColumn15 = tc; + } + private Hyperlink lnkEstabConcluida = new Hyperlink(); - public Hyperlink getLnkDataConcluida() { - return lnkDataConcluida; - } + public Hyperlink getLnkEstabConcluida() + { + return lnkEstabConcluida; + } - public void setLnkDataConcluida(Hyperlink h) { - this.lnkDataConcluida = h; - } + public void setLnkEstabConcluida( Hyperlink h ) + { + this.lnkEstabConcluida = h; + } + private StaticText txtSearchMsg = new StaticText(); - private TableColumn tableColumn12 = new TableColumn(); + public StaticText getTxtSearchMsg() + { + return txtSearchMsg; + } - public TableColumn getTableColumn12() { - return tableColumn12; - } + public void setTxtSearchMsg( StaticText st ) + { + this.txtSearchMsg = st; + } + private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid(); - public void setTableColumn12(TableColumn tc) { - this.tableColumn12 = tc; - } + public HtmlPanelGrid getGridPanel9() + { + return gridPanel9; + } - private Hyperlink lnkNrConcluida = new Hyperlink(); + public void setGridPanel9( HtmlPanelGrid hpg ) + { + this.gridPanel9 = hpg; + } + private PanelGroup groupPanel8 = new PanelGroup(); - public Hyperlink getLnkNrConcluida() { - return lnkNrConcluida; - } + public PanelGroup getGroupPanel8() + { + return groupPanel8; + } - public void setLnkNrConcluida(Hyperlink h) { - this.lnkNrConcluida = h; - } + public void setGroupPanel8( PanelGroup pg ) + { + this.groupPanel8 = pg; + } + private StaticText staticText9 = new StaticText(); - private TableColumn tableColumn13 = new TableColumn(); + public StaticText getStaticText9() + { + return staticText9; + } - public TableColumn getTableColumn13() { - return tableColumn13; - } + public void setStaticText9( StaticText st ) + { + this.staticText9 = st; + } + private ImageComponent image3 = new ImageComponent(); - public void setTableColumn13(TableColumn tc) { - this.tableColumn13 = tc; - } + public ImageComponent getImage3() + { + return image3; + } - private Hyperlink lnkPorConcluida = new Hyperlink(); + public void setImage3( ImageComponent ic ) + { + this.image3 = ic; + } + private StaticText staticText10 = new StaticText(); - public Hyperlink getLnkPorConcluida() { - return lnkPorConcluida; - } + public StaticText getStaticText10() + { + return staticText10; + } - public void setLnkPorConcluida(Hyperlink h) { - this.lnkPorConcluida = h; - } + public void setStaticText10( StaticText st ) + { + this.staticText10 = st; + } + private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); - private TableColumn tableColumn14 = new TableColumn(); + public HtmlPanelGrid getGridPanel2() + { + return gridPanel2; + } - public TableColumn getTableColumn14() { - return tableColumn14; - } + public void setGridPanel2( HtmlPanelGrid hpg ) + { + this.gridPanel2 = hpg; + } + private StaticText txtMsg1 = new StaticText(); - public void setTableColumn14(TableColumn tc) { - this.tableColumn14 = tc; - } + public StaticText getTxtMsg1() + { + return txtMsg1; + } - private Hyperlink lnkNomeConcluida = new Hyperlink(); + public void setTxtMsg1( StaticText st ) + { + this.txtMsg1 = st; + } + private TableColumn tableColumn1 = new TableColumn(); - public Hyperlink getLnkNomeConcluida() { - return lnkNomeConcluida; - } + public TableColumn getTableColumn1() + { + return tableColumn1; + } - public void setLnkNomeConcluida(Hyperlink h) { - this.lnkNomeConcluida = h; - } + public void setTableColumn1( TableColumn tc ) + { + this.tableColumn1 = tc; + } + private Hyperlink lnkDataAberturaSeg1 = new Hyperlink(); - private TableColumn tableColumn15 = new TableColumn(); + public Hyperlink getLnkDataAberturaSeg1() + { + return lnkDataAberturaSeg1; + } - public TableColumn getTableColumn15() { - return tableColumn15; - } + public void setLnkDataAberturaSeg1( Hyperlink h ) + { + this.lnkDataAberturaSeg1 = h; + } + private TableColumn tableColumn2 = new TableColumn(); - public void setTableColumn15(TableColumn tc) { - this.tableColumn15 = tc; - } + public TableColumn getTableColumn2() + { + return tableColumn2; + } - private Hyperlink lnkEstabConcluida = new Hyperlink(); + public void setTableColumn2( TableColumn tc ) + { + this.tableColumn2 = tc; + } + private Hyperlink lnkDataAberturaConcluida1 = new Hyperlink(); - public Hyperlink getLnkEstabConcluida() { - return lnkEstabConcluida; - } + public Hyperlink getLnkDataAberturaConcluida1() + { + return lnkDataAberturaConcluida1; + } - public void setLnkEstabConcluida(Hyperlink h) { - this.lnkEstabConcluida = h; - } + public void setLnkDataAberturaConcluida1( Hyperlink h ) + { + this.lnkDataAberturaConcluida1 = h; + } + private TableColumn tableColumn3 = new TableColumn(); - private StaticText txtSearchMsg = new StaticText(); + public TableColumn getTableColumn3() + { + return tableColumn3; + } - public StaticText getTxtSearchMsg() { - return txtSearchMsg; - } + public void setTableColumn3( TableColumn tc ) + { + this.tableColumn3 = tc; + } + private Hyperlink lnkEstabelecimentoSeg1 = new Hyperlink(); - public void setTxtSearchMsg(StaticText st) { - this.txtSearchMsg = st; - } + public Hyperlink getLnkEstabelecimentoSeg1() + { + return lnkEstabelecimentoSeg1; + } - private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid(); + public void setLnkEstabelecimentoSeg1( Hyperlink h ) + { + this.lnkEstabelecimentoSeg1 = h; + } + private Hyperlink lnkPlanosActuacao = new Hyperlink(); - public HtmlPanelGrid getGridPanel9() { - return gridPanel9; - } + public Hyperlink getLnkPlanosActuacao() + { + return lnkPlanosActuacao; + } - public void setGridPanel9(HtmlPanelGrid hpg) { - this.gridPanel9 = hpg; - } + public void setLnkPlanosActuacao( Hyperlink h ) + { + this.lnkPlanosActuacao = h; + } + private StaticText lblUser = new StaticText(); - private PanelGroup groupPanel8 = new PanelGroup(); + public StaticText getLblUser() + { + return lblUser; + } - public PanelGroup getGroupPanel8() { - return groupPanel8; - } + public void setLblUser( StaticText st ) + { + this.lblUser = st; + } + public TableColumn tableColumnDesactivarAnalise = new TableColumn(); - public void setGroupPanel8(PanelGroup pg) { - this.groupPanel8 = pg; - } + public TableColumn getTableColumnDesactivarAnalise() + { + return tableColumnDesactivarAnalise; + } - private StaticText staticText9 = new StaticText(); + public void setTableColumnDesactivarAnalise( TableColumn tableColumnDesactivarAnalise ) + { + this.tableColumnDesactivarAnalise = tableColumnDesactivarAnalise; + } + public Button buttonDesactivarAnalise = new Button(); - public StaticText getStaticText9() { - return staticText9; - } + public Button getButtonDesactivarAnalise() + { + return buttonDesactivarAnalise; + } - public void setStaticText9(StaticText st) { - this.staticText9 = st; - } + public void setButtonDesactivarAnalise( Button buttonDesactivarAnalise ) + { + this.buttonDesactivarAnalise = buttonDesactivarAnalise; + } + //
+ private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid(); - private ImageComponent image3 = new ImageComponent(); + public HtmlPanelGrid getGridPanelFilterSeg() + { + return this.gridPanelFilterSeg; + } - public ImageComponent getImage3() { - return image3; - } + public void setGridPanelFilterSeg( HtmlPanelGrid pg ) + { + this.gridPanelFilterSeg = pg; + } + private PanelGroup groupPanelFilterSeg = new PanelGroup(); - public void setImage3(ImageComponent ic) { - this.image3 = ic; - } + public PanelGroup getGroupPanelFilterSeg() + { + return this.groupPanelFilterSeg; + } - private StaticText staticText10 = new StaticText(); + public void setGroupPanelFilterSeg( PanelGroup pg ) + { + this.groupPanelFilterSeg = pg; + } + private StaticText labelFilterNameSeg = new StaticText(); - public StaticText getStaticText10() { - return staticText10; - } + public StaticText getLabelFilterNameSeg() + { + return this.labelFilterNameSeg; + } - public void setStaticText10(StaticText st) { - this.staticText10 = st; - } + public void setLabelFilterNameSeg( StaticText st ) + { + this.labelFilterNameSeg = st; + } + private TextField textFilterNameSeg = new TextField(); - private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); + public TextField getTextFilterNameSeg() + { + return this.textFilterNameSeg; + } - public HtmlPanelGrid getGridPanel2() { - return gridPanel2; - } + public void setTextFilterNameSeg( TextField tf ) + { + this.textFilterNameSeg = tf; + } + private StaticText labelFilterEstabelecimentoSeg = new StaticText(); - public void setGridPanel2(HtmlPanelGrid hpg) { - this.gridPanel2 = hpg; - } + public StaticText getLabelFilterEstabelecimentoSeg() + { + return labelFilterEstabelecimentoSeg; + } - private StaticText txtMsg1 = new StaticText(); + public void setLabelFilterEstabelecimentoSeg( StaticText labelFilterEstabelecimentoSeg ) + { + this.labelFilterEstabelecimentoSeg = labelFilterEstabelecimentoSeg; + } + private TextField textFilterEstabelecimentoSeg = new TextField(); - public StaticText getTxtMsg1() { - return txtMsg1; - } + public TextField getTextFilterEstabelecimentoSeg() + { + return textFilterEstabelecimentoSeg; + } - public void setTxtMsg1(StaticText st) { - this.txtMsg1 = st; - } + public void setTextFilterEstabelecimentoSeg( TextField textFilterEstabelecimentoSeg ) + { + this.textFilterEstabelecimentoSeg = textFilterEstabelecimentoSeg; + } + private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar(); - private TableColumn tableColumn1 = new TableColumn(); + public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg() + { + return this.calFilterDateSeg; + } - public TableColumn getTableColumn1() { - return tableColumn1; - } + public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c ) + { + this.calFilterDateSeg = c; + } + private TextField textFilterPORSeg = new TextField(); - public void setTableColumn1(TableColumn tc) { - this.tableColumn1 = tc; - } + public TextField getTextFilterPORSeg() + { + return textFilterPORSeg; + } - private Hyperlink lnkDataAberturaSeg1 = new Hyperlink(); + public void setTextFilterPORSeg( TextField textFilterPORSeg ) + { + this.textFilterPORSeg = textFilterPORSeg; + } + private Button buttonFilterSeg = new Button(); - public Hyperlink getLnkDataAberturaSeg1() { - return lnkDataAberturaSeg1; - } + public Button getButtonFilterSeg() + { + return this.buttonFilterSeg; + } - public void setLnkDataAberturaSeg1(Hyperlink h) { - this.lnkDataAberturaSeg1 = h; - } + public void setButtonFilterSeg( Button b ) + { + this.buttonFilterSeg = b; + } + private TextField textFilterEstabelecimentoConc = new TextField(); - private TableColumn tableColumn2 = new TableColumn(); + public TextField getTextFilterEstabelecimentoConc() + { + return textFilterEstabelecimentoConc; + } - public TableColumn getTableColumn2() { - return tableColumn2; - } + public void setTextFilterEstabelecimentoConc( TextField textFilterEstabelecimentoConc ) + { + this.textFilterEstabelecimentoConc = textFilterEstabelecimentoConc; + } + private DropDown dropCurrentYear = new DropDown(); - public void setTableColumn2(TableColumn tc) { - this.tableColumn2 = tc; - } + public DropDown getDropCurrentYear() + { + return dropCurrentYear; + } - private Hyperlink lnkDataAberturaConcluida1 = new Hyperlink(); + public void setDropCurrentYear( DropDown dropCurrentYear ) + { + this.dropCurrentYear = dropCurrentYear; + } + private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" ); - public Hyperlink getLnkDataAberturaConcluida1() { - return lnkDataAberturaConcluida1; - } + public FormDirSiprp() + { + } - public void setLnkDataAberturaConcluida1(Hyperlink h) { - this.lnkDataAberturaConcluida1 = h; - } + @Override + public void init() + { + super.init(); - private TableColumn tableColumn3 = new TableColumn(); + try + { + _init(); + } + catch ( Exception e ) + { + log( "FormDirSiprp Initialization Failure", e ); + throw e instanceof FacesException ? ( FacesException ) e : new FacesException( e ); + } + } - public TableColumn getTableColumn3() { - return tableColumn3; - } + @Override + public void preprocess() + { + txtMsg1.setText( getSessionBean1().getMsg() ); + getSessionBean1().setMsg( "" ); + } - public void setTableColumn3(TableColumn tc) { - this.tableColumn3 = tc; - } + private void fillInitialForm() + { + Integer fromYear = getSelectedYear(); - private Hyperlink lnkEstabelecimentoSeg1 = new Hyperlink(); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + table2.setRendered( true ); - public Hyperlink getLnkEstabelecimentoSeg1() { - return lnkEstabelecimentoSeg1; - } + ArrayList seguimentoList = adp.getAnalisesSeguimentoDirSiprpList( fromYear ); + getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); + } + catch ( Exception ex ) + { + table2.setRendered( false ); + ErrorLogger.logException( ex ); + } - public void setLnkEstabelecimentoSeg1(Hyperlink h) { - this.lnkEstabelecimentoSeg1 = h; - } - private Hyperlink lnkPlanosActuacao = new Hyperlink(); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + table3.setRendered( true ); - public Hyperlink getLnkPlanosActuacao() { - return lnkPlanosActuacao; - } + ArrayList concluidasList = adp.getAnalisesConcluidasList( null, fromYear ); + getSessionBean1().getAnalisesConcluidasDataProvider().setList( concluidasList ); + } + catch ( Exception ex ) + { + table3.setRendered( false ); + ErrorLogger.logException( ex ); + } + } - public void setLnkPlanosActuacao(Hyperlink h) { - this.lnkPlanosActuacao = h; - } - private StaticText lblUser = new StaticText(); + @Override + public void prerender() + { + System.out.println( "=== FORM_DIR_SIPRP ===" ); - public StaticText getLblUser() { - return lblUser; - } + Utilizador currentUser = getSessionBean1().getCurrentUser(); + lblUser.setText( currentUser == null ? "" : currentUser.getLogin() ); - public void setLblUser(StaticText st) { - this.lblUser = st; - } + HttpServletRequest request = ( HttpServletRequest ) getExternalContext().getRequest(); + String referer = request.getRequestURI(); + String pageFrom = Utils.getPageFrom( referer ); + if ( (!pageFrom.matches( "FormDirSiprp.jsp" )) || getSessionBean1().isFromAnaliseDeletion() ) + { + fillCurrentYearDrop(); + fillInitialForm(); - public TableColumn tableColumnDesactivarAnalise = new TableColumn(); + fillAnoDropDown(); + } - public TableColumn getTableColumnDesactivarAnalise() { - return tableColumnDesactivarAnalise; + //Column para desactivar plano - mostra se o utilizador for DIRECTOR SIPRP +// System.out.println( "\n\nRendering 'desactivar' ... " + buttonDesactivarAnalise.isRendered() ); + int uType = currentUser == null ? -1 : currentUser.getTipo().intValue(); +// System.out.println( "\tuserType : " + uType ); + boolean renderOrNot = uType == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP; +// System.out.println( "\trenderOrNot : " + renderOrNot + " ( " + Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP + " )" ); + tableColumnDesactivarAnalise.setRendered( renderOrNot ); + buttonDesactivarAnalise.setRendered( renderOrNot ); } - public void setTableColumnDesactivarAnalise(TableColumn tableColumnDesactivarAnalise) { - this.tableColumnDesactivarAnalise = tableColumnDesactivarAnalise; + @Override + public void destroy() + { } - public Button buttonDesactivarAnalise = new Button(); - - public Button getButtonDesactivarAnalise() { - return buttonDesactivarAnalise; + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() + { + return ( ApplicationBean1 ) getBean( "ApplicationBean1" ); } - public void setButtonDesactivarAnalise(Button buttonDesactivarAnalise) { - this.buttonDesactivarAnalise = buttonDesactivarAnalise; + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() + { + return ( RequestBean1 ) getBean( "RequestBean1" ); } - - - //
- - - - private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid(); - public HtmlPanelGrid getGridPanelFilterSeg() + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { - return this.gridPanelFilterSeg; + return ( SessionBean1 ) getBean( "SessionBean1" ); } - public void setGridPanelFilterSeg( HtmlPanelGrid pg ) + + public String lnkEditUser_action() { - this.gridPanelFilterSeg = pg; + getSessionBean1().setNavFrom( "FormDirSiprp" ); + getSessionBean1().setModoEdicaoUtilizador( "edit" ); + return "user"; } - private PanelGroup groupPanelFilterSeg = new PanelGroup(); - public PanelGroup getGroupPanelFilterSeg() + public String lnkLogout_action() { - return this.groupPanelFilterSeg; + Utils.doLogout( getExternalContext(), true ); + return null; } - public void setGroupPanelFilterSeg( PanelGroup pg ) + + public String lnkDataAcidente_action() { - this.groupPanelFilterSeg = pg; + return null; } - private StaticText labelFilterNameSeg = new StaticText(); - public StaticText getLabelFilterNameSeg() + public String lnkNr_action() { - return this.labelFilterNameSeg; + return null; } - public void setLabelFilterNameSeg( StaticText st ) + + public String lnkPor_action() { - this.labelFilterNameSeg = st; + return null; } - private TextField textFilterNameSeg = new TextField(); - public TextField getTextFilterNameSeg() + public String lnkNomeAcidentado_action() { - return this.textFilterNameSeg; + return null; } - public void setTextFilterNameSeg( TextField tf ) + + public String lnkFase_action() { - this.textFilterNameSeg = tf; + return null; } - private StaticText labelFilterEstabelecimentoSeg = new StaticText(); - public StaticText getLabelFilterEstabelecimentoSeg() { - return labelFilterEstabelecimentoSeg; - } - public void setLabelFilterEstabelecimentoSeg(StaticText labelFilterEstabelecimentoSeg) { - this.labelFilterEstabelecimentoSeg = labelFilterEstabelecimentoSeg; + public String lnkDataAcidenteSeg_action() + { + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirSiprp" ); + return "view_analise"; } - private TextField textFilterEstabelecimentoSeg = new TextField(); - - public TextField getTextFilterEstabelecimentoSeg() { - return textFilterEstabelecimentoSeg; - } - public void setTextFilterEstabelecimentoSeg(TextField textFilterEstabelecimentoSeg) { - this.textFilterEstabelecimentoSeg = textFilterEstabelecimentoSeg; - } - - private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar(); - public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg() + public String lnkDataAberturaSeg_action() { - return this.calFilterDateSeg; + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirSiprp" ); + return "view_analise"; } - public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c ) + + public String lnkNrSeg_action() { - this.calFilterDateSeg = c; + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirSiprp" ); + return "view_analise"; } - private TextField textFilterPORSeg = new TextField(); - - public TextField getTextFilterPORSeg() { - return textFilterPORSeg; + public String lnkPorSeg_action() + { + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirSiprp" ); + return "view_analise"; } - public void setTextFilterPORSeg(TextField textFilterPORSeg) { - this.textFilterPORSeg = textFilterPORSeg; + public String lnkNomeAcidentadoSeg_action() + { + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirSiprp" ); + return "view_analise"; } - - private Button buttonFilterSeg = new Button(); - public Button getButtonFilterSeg() + public String lnkFaseSeg_action() { - return this.buttonFilterSeg; + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirSiprp" ); + return "view_analise"; } - public void setButtonFilterSeg( Button b ) + + public String lnkEstabelecimentoSeg_action() { - this.buttonFilterSeg = b; + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirSiprp" ); + return "view_analise"; } - private TextField textFilterEstabelecimentoConc = new TextField(); - - public TextField getTextFilterEstabelecimentoConc() { - return textFilterEstabelecimentoConc; + 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 setTextFilterEstabelecimentoConc(TextField textFilterEstabelecimentoConc) { - this.textFilterEstabelecimentoConc = textFilterEstabelecimentoConc; + public void drpAno_processValueChange( ValueChangeEvent event ) + { + 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(); + } } - - private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" ); + public void drpMes_processValueChange( ValueChangeEvent event ) + { + Object mes = event.getNewValue(); + if ( mes == null ) + { + lblDia.setVisible( false ); + drpDia.setVisible( false ); + } + else + { + lblDia.setVisible( true ); + drpDia.setVisible( true ); + //fillDiaDropDown(); + } + } - public FormDirSiprp() + public void drpDia_processValueChange( ValueChangeEvent event ) { + } - } - - @Override - public void init() + public String butPesquisar_action() { - super.init(); - - try + Object obAno = null; + Object obMes = null; + Object obDia = null; + try { - _init(); - } - catch ( Exception e ) + obAno = drpAno.getSelected(); + obMes = drpMes.getSelected(); + obDia = drpDia.getSelected(); + } + catch ( Exception ex ) { - log("FormDirSiprp Initialization Failure", e); - throw e instanceof FacesException ? (FacesException) e: new FacesException(e); - } - } - - @Override - public void preprocess() - { - txtMsg1.setText( getSessionBean1().getMsg() ); - getSessionBean1().setMsg( "" ); - } + ErrorLogger.logException( ex ); + } + Integer ano = null; + Integer mes = null; + Integer dia = null; - @Override - public void prerender() - { - System.out.println("=== FORM_DIR_SIPRP ==="); + if ( obAno != null ) + { + ano = ( Integer ) obAno; + } - Utilizador currentUser = getSessionBean1().getCurrentUser(); - lblUser.setText( currentUser == null ? "" : currentUser.getLogin() ); - - HttpServletRequest request = ( HttpServletRequest ) getExternalContext().getRequest(); - String referer = request.getRequestURI(); - String pageFrom = Utils.getPageFrom( referer ); - if ( ( ! pageFrom.matches( "FormDirSiprp.jsp" ) ) || getSessionBean1().isFromAnaliseDeletion() ) + if ( obMes != null ) { - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - //lblActivos.setRendered(true); - table2.setRendered( true ); + mes = ( Integer ) obMes; + } - ArrayList seguimentoList = adp.getAnalisesSeguimentoDirSiprpList(); - getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); - } - catch ( Exception ex ) + if ( obDia != null ) + { + dia = ( Integer ) obDia; + } + + String por = null; + if ( txtPor.getText() != null ) + { + por = ( String ) txtPor.getText(); + if ( por.trim().length() == 0 ) { - //lblActivos.setRendered(false); - table2.setRendered( false ); - ErrorLogger.logException( ex ); + por = null; } + } - try + String nome = null; + if ( txtNome.getText() != null ) + { + nome = ( String ) txtNome.getText(); + if ( nome.trim().length() == 0 ) { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - //lblActivos.setRendered(true); - table3.setRendered( true ); - - ArrayList concluidasList = adp.getAnalisesConcluidasList( null ); - getSessionBean1().getAnalisesConcluidasDataProvider().setList( concluidasList ); + nome = null; } - catch ( Exception ex ) + } + + String estabelecimento = null; + if ( textFilterEstabelecimentoConc.getText() != null ) + { + estabelecimento = (( String ) textFilterEstabelecimentoConc.getText()).trim(); + if ( estabelecimento.length() == 0 ) { - //lblActivos.setRendered(false); - table3.setRendered( false ); - ErrorLogger.logException( ex ); + estabelecimento = null; } - fillAnoDropDown(); - } + } - //Column para desactivar plano - mostra se o utilizador for DIRECTOR SIPRP -// System.out.println( "\n\nRendering 'desactivar' ... " + buttonDesactivarAnalise.isRendered() ); - int uType = currentUser == null ? -1 : currentUser.getTipo().intValue(); -// System.out.println( "\tuserType : " + uType ); - boolean renderOrNot = uType == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP; -// System.out.println( "\trenderOrNot : " + renderOrNot + " ( " + Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP + " )" ); - tableColumnDesactivarAnalise.setRendered( renderOrNot ); - buttonDesactivarAnalise.setRendered( renderOrNot ); - } - + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - @Override - 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"); - } - - public String lnkEditUser_action() { - // TODO: Replace with your code - - getSessionBean1().setNavFrom("FormDirSiprp"); - getSessionBean1().setModoEdicaoUtilizador("edit"); - return "user"; - } - - public String lnkLogout_action() + ArrayList concluidasList = adp.searchAnalisesConcluidasList( + null, ano, mes, dia, por, nome, estabelecimento, getSelectedYear() ); + + 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 !" ); + ErrorLogger.logException( ex ); + } + + return null; + } + + public String lnkDataConcluida_action() { - Utils.doLogout( getExternalContext(), true ); - return null; - } - - public String lnkDataAcidente_action() { - // TODO: Replace with your code - - return null; - } - - public String lnkNr_action() { - // TODO: Replace with your code - - return null; - } - - public String lnkPor_action() { - // TODO: Replace with your code - - return null; - } - - public String lnkNomeAcidentado_action() { - // TODO: Replace with your code - - return null; - } - - public String lnkFase_action() { - // TODO: Replace with your code - - return null; - } - - public String lnkDataAcidenteSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirSiprp"); - return "view_analise"; - } - - public String lnkDataAberturaSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirSiprp"); - return "view_analise"; - } - - public String lnkNrSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirSiprp"); - return "view_analise"; - } - - public String lnkPorSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirSiprp"); - return "view_analise"; - } - - public String lnkNomeAcidentadoSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirSiprp"); - return "view_analise"; - } - - public String lnkFaseSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirSiprp"); - return "view_analise"; - } - - public String lnkEstabelecimentoSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirSiprp"); - 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) - { - ErrorLogger.logException( ex ); - } - - 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 por = null; - if(txtPor.getText() != null) - { - por = (String) txtPor.getText(); - if(por.trim().length() == 0) - { - por = null; - } - } - - String nome = null; - if(txtNome.getText() != null) - { - nome = (String) txtNome.getText(); - if(nome.trim().length() == 0) - { - nome = null; - } - } + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirSiprp" ); + return "view_analise"; + } - String estabelecimento = null; - if ( textFilterEstabelecimentoConc.getText() != null ) - { - estabelecimento = (( String ) textFilterEstabelecimentoConc.getText()).trim(); - if( estabelecimento.length() == 0 ) - { - estabelecimento = null; - } - } - - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList()); - ArrayList concluidasList = adp.searchAanalisesConcluidasList( - null, ano, mes, dia, por, nome, estabelecimento ); - - 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 !"); - ErrorLogger.logException( ex ); - } - - return null; - } - - public String lnkDataConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirSiprp"); - return "view_analise"; - } - - public String lnkDataAberturaConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirSiprp"); - return "view_analise"; - } - - public String lnkNrConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirSiprp"); - return "view_analise"; - } - - public String lnkPorConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirSiprp"); - return "view_analise"; - } - - public String lnkNomeConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirSiprp"); - return "view_analise"; - } - - public String lnkEstabConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormDirSiprp"); - return "view_analise"; - } - - 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 lnkNewUser_action() { - // TODO: Replace with your code - - getSessionBean1().setNavFrom("FormDirSiprp"); - //getSessionBean1().setModoEdicaoUtilizador("new"); - return "gestao_utilizadores"; - } - - private void fillAnoDropDown() - { + public String lnkDataAberturaConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirSiprp" ); + return "view_analise"; + } + + public String lnkNrConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirSiprp" ); + return "view_analise"; + } + + public String lnkPorConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirSiprp" ); + return "view_analise"; + } + + public String lnkNomeConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirSiprp" ); + return "view_analise"; + } + + public String lnkEstabConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormDirSiprp" ); + return "view_analise"; + } + + 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 lnkNewUser_action() + { + getSessionBean1().setNavFrom( "FormDirSiprp" ); + //getSessionBean1().setModoEdicaoUtilizador("new"); + return "gestao_utilizadores"; + } + + private void fillAnoDropDown() + { // ArrayList anosList = new ArrayList(); // for(int ano=2007; ano<2051; ano++) // { // anosList.add(new Integer(ano)); // } - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - ArrayList anosList = adp.getAnosListFromAnalises(); - 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) ); - - } - catch(Exception ex) - { - ErrorLogger.logException( ex ); - } - - } - - - 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) ); - } - + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList anosList = adp.getAnosListFromAnalises(); + 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) ); + + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } + } + + 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 lnkAjuda_action() { - // TODO: Replace with your code + public String lnkAjuda_action() + { // ServletContext theApplicationsServletContext = // (ServletContext) this.getExternalContext().getContext(); // String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL); @@ -1487,20 +1560,20 @@ public class FormDirSiprp extends AbstractPageBean { // { // ErrorLogger.logException( ex ); // } - return null; - } + return null; + } - public String lnkAnalisesAcidente_action() { - // TODO: Replace with your code - return null; - } + public String lnkAnalisesAcidente_action() + { + return null; + } - public String lnkPlanosActuacao_action() { - // TODO: Replace with your code - Utilizador u = getSessionBean1().getCurrentUser(); + public String lnkPlanosActuacao_action() + { + Utilizador u = getSessionBean1().getCurrentUser(); // String curUser = "?user=" + u.getId().toString(); - FacesContext fc = getFacesContext().getCurrentInstance(); - Global.redirectToPlanos(fc, u); + FacesContext fc = getFacesContext().getCurrentInstance(); + Global.redirectToPlanos( fc, u ); // Utilizador u = getSessionBean1().getCurrentUser(); // String curUser = "?user=" + u.getId().toString(); // FacesContext fc = getFacesContext().getCurrentInstance(); @@ -1512,9 +1585,8 @@ public class FormDirSiprp extends AbstractPageBean { // { // ErrorLogger.logException( ex ); // } - return null; - } - + return null; + } public String buttonFilterSeg_action() { @@ -1528,22 +1600,22 @@ public class FormDirSiprp extends AbstractPageBean { String POR = null; if ( textFilterPORSeg.getText() != null ) { - POR = ( ( String ) textFilterPORSeg.getText() ).trim(); + POR = (( String ) textFilterPORSeg.getText()).trim(); if ( POR.length() == 0 ) { POR = null; } } - String nome = null; - if ( textFilterNameSeg.getText() != null ) - { - nome = (( String ) textFilterNameSeg.getText()).trim(); - if( nome.length() == 0 ) - { - nome = null; - } - } + String nome = null; + if ( textFilterNameSeg.getText() != null ) + { + nome = (( String ) textFilterNameSeg.getText()).trim(); + if ( nome.length() == 0 ) + { + nome = null; + } + } String estabelecimento = null; if ( textFilterEstabelecimentoSeg.getText() != null ) @@ -1555,23 +1627,24 @@ public class FormDirSiprp extends AbstractPageBean { } } - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - ArrayList seguimentoList = adp.searchAnalisesSeguimentoDirSiprp( nome, estabelecimento, visitaDateStr, POR ); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList seguimentoList = adp.searchAnalisesSeguimentoDirSiprp( + nome, estabelecimento, visitaDateStr, POR, getSelectedYear() ); table2.setRendered( true ); - txtSearchMsg.setRendered( false ); - getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); - } - catch( Exception e ) - { + txtSearchMsg.setRendered( false ); + getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); + } + catch ( Exception e ) + { table2.setRendered( false ); - txtSearchMsg.setRendered( true ); - txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); + txtSearchMsg.setRendered( true ); + txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); ErrorLogger.logException( e ); - } + } return null; } @@ -1581,11 +1654,48 @@ public class FormDirSiprp extends AbstractPageBean { System.out.println( "\nbuttonDesactivarAnalise_action() : " ); AnaliseAcidente selectedAnalise = getTableSeguimentoRowData(); - // TODO : call ConfirmarDesactivar.jsp with selectedAnalise getSessionBean1().setCurrentAnalise( selectedAnalise ); - return "confirmar_desactivar"; } + public void dropCurrentYear_valueChangeListener( ValueChangeEvent event ) + { + Object oldValue = event.getOldValue(); + Object newValue = event.getNewValue(); + + if ( newValue != null && newValue instanceof Integer ) + { + Integer newYear = ( Integer ) newValue; + Integer oldYear = oldValue != null && oldValue instanceof Integer ? ( Integer ) oldValue : null; + if ( oldYear == null || !newYear.equals( oldYear ) ) + { + fillInitialForm(); + } + } + } + + private Integer getSelectedYear() + { + Integer result = null; + if ( dropCurrentYear != null ) + { + Object selected = dropCurrentYear.getSelected(); + if ( selected != null && selected instanceof Integer ) + { + result = ( Integer ) selected; + } + } + return result; + } + + private void fillCurrentYearDrop() + { + Integer selectedYear = getSelectedYear(); + + Option[] opts = Utils.getYearDropValues(); + dropCurrentYear.setItems( opts ); + + dropCurrentYear.setSelected( selectedYear != null ? selectedYear : opts.length > 0 ? opts[ 0].getValue() : null ); + } } diff --git a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormGestor.java b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormGestor.java index 0754cc52..b430cec9 100644 --- a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormGestor.java +++ b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormGestor.java @@ -53,1478 +53,1561 @@ import utils.Utils; * lifecycle methods and event handlers where you may add behavior * to respond to incoming events.

*/ -public class FormGestor 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 HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid(); +public class FormGestor 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 HtmlPanelGrid getGridLayoutTop1() { - return gridLayoutTop1; - } + public Page getPage1() + { + return page1; + } - public void setGridLayoutTop1(HtmlPanelGrid hpg) { - this.gridLayoutTop1 = hpg; - } + public void setPage1( Page p ) + { + this.page1 = p; + } + private Html html1 = new Html(); - private HtmlPanelGrid gridSeguimento1 = new HtmlPanelGrid(); + public Html getHtml1() + { + return html1; + } - public HtmlPanelGrid getGridSeguimento1() { - return gridSeguimento1; - } + public void setHtml1( Html h ) + { + this.html1 = h; + } + private Head head1 = new Head(); - public void setGridSeguimento1(HtmlPanelGrid hpg) { - this.gridSeguimento1 = hpg; - } + public Head getHead1() + { + return head1; + } - private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); + public void setHead1( Head h ) + { + this.head1 = h; + } + private Link link1 = new Link(); - public HtmlPanelGrid getGridPanel2() { - return gridPanel2; - } + public Link getLink1() + { + return link1; + } - public void setGridPanel2(HtmlPanelGrid hpg) { - this.gridPanel2 = hpg; - } + public void setLink1( Link l ) + { + this.link1 = l; + } + private Body body1 = new Body(); - private StaticText staticText2 = new StaticText(); + public Body getBody1() + { + return body1; + } - public StaticText getStaticText2() { - return staticText2; - } + public void setBody1( Body b ) + { + this.body1 = b; + } + private Form form1 = new Form(); - public void setStaticText2(StaticText st) { - this.staticText2 = st; - } + public Form getForm1() + { + return form1; + } - private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); + public void setForm1( Form f ) + { + this.form1 = f; + } + private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); - public HtmlPanelGrid getGridPanel3() { - return gridPanel3; - } + public HtmlPanelGrid getGridBase1() + { + return gridBase1; + } - public void setGridPanel3(HtmlPanelGrid hpg) { - this.gridPanel3 = hpg; - } + public void setGridBase1( HtmlPanelGrid hpg ) + { + this.gridBase1 = hpg; + } + private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); - private Table table1 = new Table(); + public HtmlPanelGrid getGridLayout1() + { + return gridLayout1; + } + + public void setGridLayout1( HtmlPanelGrid hpg ) + { + this.gridLayout1 = hpg; + } + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); - public Table getTable1() { - return table1; - } + public HtmlPanelGrid getGridPanel1() + { + return gridPanel1; + } - public void setTable1(Table t) { - this.table1 = t; - } + public void setGridPanel1( HtmlPanelGrid hpg ) + { + this.gridPanel1 = hpg; + } + private PanelGroup groupPanel1 = new PanelGroup(); - private TableRowGroup tableRowGroup1 = new TableRowGroup(); + public PanelGroup getGroupPanel1() + { + return groupPanel1; + } - public TableRowGroup getTableRowGroup1() { - return tableRowGroup1; - } + 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 HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid(); - public void setTableRowGroup1(TableRowGroup trg) { - this.tableRowGroup1 = trg; - } + public HtmlPanelGrid getGridLayoutTop1() + { + return gridLayoutTop1; + } - private TableColumn tableColumn1 = new TableColumn(); + public void setGridLayoutTop1( HtmlPanelGrid hpg ) + { + this.gridLayoutTop1 = hpg; + } + private HtmlPanelGrid gridSeguimento1 = new HtmlPanelGrid(); - public TableColumn getTableColumn1() { - return tableColumn1; - } + public HtmlPanelGrid getGridSeguimento1() + { + return gridSeguimento1; + } - public void setTableColumn1(TableColumn tc) { - this.tableColumn1 = tc; - } + public void setGridSeguimento1( HtmlPanelGrid hpg ) + { + this.gridSeguimento1 = hpg; + } + private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); - private Hyperlink lnkDataAcidenteSeg = new Hyperlink(); + public HtmlPanelGrid getGridPanel2() + { + return gridPanel2; + } - public Hyperlink getLnkDataAcidenteSeg() { - return lnkDataAcidenteSeg; - } + public void setGridPanel2( HtmlPanelGrid hpg ) + { + this.gridPanel2 = hpg; + } + private StaticText staticText2 = new StaticText(); - public void setLnkDataAcidenteSeg(Hyperlink h) { - this.lnkDataAcidenteSeg = h; - } + public StaticText getStaticText2() + { + return staticText2; + } - private TableColumn tableColumn2 = new TableColumn(); + public void setStaticText2( StaticText st ) + { + this.staticText2 = st; + } + private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); - public TableColumn getTableColumn2() { - return tableColumn2; - } + public HtmlPanelGrid getGridPanel3() + { + return gridPanel3; + } - public void setTableColumn2(TableColumn tc) { - this.tableColumn2 = tc; - } + public void setGridPanel3( HtmlPanelGrid hpg ) + { + this.gridPanel3 = hpg; + } + private Table table1 = new Table(); - private Hyperlink lnkNrSeg = new Hyperlink(); + public Table getTable1() + { + return table1; + } - public Hyperlink getLnkNrSeg() { - return lnkNrSeg; - } + public void setTable1( Table t ) + { + this.table1 = t; + } + private TableRowGroup tableRowGroup1 = new TableRowGroup(); - public void setLnkNrSeg(Hyperlink h) { - this.lnkNrSeg = h; - } + public TableRowGroup getTableRowGroup1() + { + return tableRowGroup1; + } - private TableColumn tableColumn3 = new TableColumn(); + public void setTableRowGroup1( TableRowGroup trg ) + { + this.tableRowGroup1 = trg; + } + private TableColumn tableColumn1 = new TableColumn(); - public TableColumn getTableColumn3() { - return tableColumn3; - } + public TableColumn getTableColumn1() + { + return tableColumn1; + } - public void setTableColumn3(TableColumn tc) { - this.tableColumn3 = tc; - } + public void setTableColumn1( TableColumn tc ) + { + this.tableColumn1 = tc; + } + private Hyperlink lnkDataAcidenteSeg = new Hyperlink(); - private Hyperlink lnkPorSeg = new Hyperlink(); + public Hyperlink getLnkDataAcidenteSeg() + { + return lnkDataAcidenteSeg; + } - public Hyperlink getLnkPorSeg() { - return lnkPorSeg; - } + public void setLnkDataAcidenteSeg( Hyperlink h ) + { + this.lnkDataAcidenteSeg = h; + } + private TableColumn tableColumn2 = new TableColumn(); - public void setLnkPorSeg(Hyperlink h) { - this.lnkPorSeg = h; - } + public TableColumn getTableColumn2() + { + return tableColumn2; + } - private TableColumn tableColumn4 = new TableColumn(); + public void setTableColumn2( TableColumn tc ) + { + this.tableColumn2 = tc; + } + private Hyperlink lnkNrSeg = new Hyperlink(); - public TableColumn getTableColumn4() { - return tableColumn4; - } + public Hyperlink getLnkNrSeg() + { + return lnkNrSeg; + } - public void setTableColumn4(TableColumn tc) { - this.tableColumn4 = tc; - } + public void setLnkNrSeg( Hyperlink h ) + { + this.lnkNrSeg = h; + } + private TableColumn tableColumn3 = new TableColumn(); - private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink(); + public TableColumn getTableColumn3() + { + return tableColumn3; + } - public Hyperlink getLnkNomeAcidentadoSeg() { - return lnkNomeAcidentadoSeg; - } + public void setTableColumn3( TableColumn tc ) + { + this.tableColumn3 = tc; + } + private Hyperlink lnkPorSeg = new Hyperlink(); - public void setLnkNomeAcidentadoSeg(Hyperlink h) { - this.lnkNomeAcidentadoSeg = h; - } + public Hyperlink getLnkPorSeg() + { + return lnkPorSeg; + } - private TableColumn tableColumn5 = new TableColumn(); + public void setLnkPorSeg( Hyperlink h ) + { + this.lnkPorSeg = h; + } + private TableColumn tableColumn4 = new TableColumn(); - public TableColumn getTableColumn5() { - return tableColumn5; - } + public TableColumn getTableColumn4() + { + return tableColumn4; + } - public void setTableColumn5(TableColumn tc) { - this.tableColumn5 = tc; - } + public void setTableColumn4( TableColumn tc ) + { + this.tableColumn4 = tc; + } + private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink(); - private Hyperlink lnkFaseSeg = new Hyperlink(); + public Hyperlink getLnkNomeAcidentadoSeg() + { + return lnkNomeAcidentadoSeg; + } - public Hyperlink getLnkFaseSeg() { - return lnkFaseSeg; - } + public void setLnkNomeAcidentadoSeg( Hyperlink h ) + { + this.lnkNomeAcidentadoSeg = h; + } + private TableColumn tableColumn5 = new TableColumn(); - public void setLnkFaseSeg(Hyperlink h) { - this.lnkFaseSeg = h; - } + public TableColumn getTableColumn5() + { + return tableColumn5; + } - private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid(); + public void setTableColumn5( TableColumn tc ) + { + this.tableColumn5 = tc; + } + private Hyperlink lnkFaseSeg = new Hyperlink(); - public HtmlPanelGrid getGridConcluidos1() { - return gridConcluidos1; - } + public Hyperlink getLnkFaseSeg() + { + return lnkFaseSeg; + } - public void setGridConcluidos1(HtmlPanelGrid hpg) { - this.gridConcluidos1 = hpg; - } + public void setLnkFaseSeg( Hyperlink h ) + { + this.lnkFaseSeg = h; + } + private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid(); - private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); + public HtmlPanelGrid getGridConcluidos1() + { + return gridConcluidos1; + } - public HtmlPanelGrid getGridPanel4() { - return gridPanel4; - } + public void setGridConcluidos1( HtmlPanelGrid hpg ) + { + this.gridConcluidos1 = hpg; + } + private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); - public void setGridPanel4(HtmlPanelGrid hpg) { - this.gridPanel4 = hpg; - } + public HtmlPanelGrid getGridPanel4() + { + return gridPanel4; + } - private StaticText staticText3 = new StaticText(); + public void setGridPanel4( HtmlPanelGrid hpg ) + { + this.gridPanel4 = hpg; + } + private StaticText staticText3 = new StaticText(); - public StaticText getStaticText3() { - return staticText3; - } + public StaticText getStaticText3() + { + return staticText3; + } - public void setStaticText3(StaticText st) { - this.staticText3 = st; - } + public void setStaticText3( StaticText st ) + { + this.staticText3 = st; + } + private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); - private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); + public HtmlPanelGrid getGridPanel5() + { + return gridPanel5; + } - public HtmlPanelGrid getGridPanel5() { - return gridPanel5; - } + public void setGridPanel5( HtmlPanelGrid hpg ) + { + this.gridPanel5 = hpg; + } + private PanelGroup groupPanel3 = new PanelGroup(); - public void setGridPanel5(HtmlPanelGrid hpg) { - this.gridPanel5 = hpg; - } + public PanelGroup getGroupPanel3() + { + return groupPanel3; + } - private PanelGroup groupPanel3 = new PanelGroup(); + public void setGroupPanel3( PanelGroup pg ) + { + this.groupPanel3 = pg; + } + private StaticText staticText4 = new StaticText(); - public PanelGroup getGroupPanel3() { - return groupPanel3; - } + public StaticText getStaticText4() + { + return staticText4; + } - public void setGroupPanel3(PanelGroup pg) { - this.groupPanel3 = pg; - } + public void setStaticText4( StaticText st ) + { + this.staticText4 = st; + } + private DropDown drpAno = new DropDown(); - private StaticText staticText4 = new StaticText(); + public DropDown getDrpAno() + { + return drpAno; + } - public StaticText getStaticText4() { - return staticText4; - } + public void setDrpAno( DropDown dd ) + { + this.drpAno = dd; + } + private PanelGroup groupPanel4 = new PanelGroup(); - public void setStaticText4(StaticText st) { - this.staticText4 = st; - } + public PanelGroup getGroupPanel4() + { + return groupPanel4; + } - private DropDown drpAno = new DropDown(); + public void setGroupPanel4( PanelGroup pg ) + { + this.groupPanel4 = pg; + } + private StaticText lblMes = new StaticText(); - public DropDown getDrpAno() { - return drpAno; - } + public StaticText getLblMes() + { + return lblMes; + } - public void setDrpAno(DropDown dd) { - this.drpAno = dd; - } + public void setLblMes( StaticText st ) + { + this.lblMes = st; + } + private DropDown drpMes = new DropDown(); - private PanelGroup groupPanel4 = new PanelGroup(); + public DropDown getDrpMes() + { + return drpMes; + } - public PanelGroup getGroupPanel4() { - return groupPanel4; - } + public void setDrpMes( DropDown dd ) + { + this.drpMes = dd; + } + private PanelGroup groupPanel5 = new PanelGroup(); - public void setGroupPanel4(PanelGroup pg) { - this.groupPanel4 = pg; - } + public PanelGroup getGroupPanel5() + { + return groupPanel5; + } - private StaticText lblMes = new StaticText(); + public void setGroupPanel5( PanelGroup pg ) + { + this.groupPanel5 = pg; + } + private StaticText lblDia = new StaticText(); - public StaticText getLblMes() { - return lblMes; - } + public StaticText getLblDia() + { + return lblDia; + } - public void setLblMes(StaticText st) { - this.lblMes = st; - } + public void setLblDia( StaticText st ) + { + this.lblDia = st; + } + private DropDown drpDia = new DropDown(); - private DropDown drpMes = new DropDown(); + public DropDown getDrpDia() + { + return drpDia; + } - public DropDown getDrpMes() { - return drpMes; - } + public void setDrpDia( DropDown dd ) + { + this.drpDia = dd; + } + private PanelGroup groupPanel6 = new PanelGroup(); - public void setDrpMes(DropDown dd) { - this.drpMes = dd; - } + public PanelGroup getGroupPanel6() + { + return groupPanel6; + } - private PanelGroup groupPanel5 = new PanelGroup(); + public void setGroupPanel6( PanelGroup pg ) + { + this.groupPanel6 = pg; + } + private StaticText staticText5 = new StaticText(); - public PanelGroup getGroupPanel5() { - return groupPanel5; - } + public StaticText getStaticText5() + { + return staticText5; + } - public void setGroupPanel5(PanelGroup pg) { - this.groupPanel5 = pg; - } + public void setStaticText5( StaticText st ) + { + this.staticText5 = st; + } + private TextField txtPor = new TextField(); - private StaticText lblDia = new StaticText(); + public TextField getTxtPor() + { + return txtPor; + } - public StaticText getLblDia() { - return lblDia; - } + public void setTxtPor( TextField tf ) + { + this.txtPor = tf; + } + private PanelGroup groupPanel7 = new PanelGroup(); - public void setLblDia(StaticText st) { - this.lblDia = st; - } + public PanelGroup getGroupPanel7() + { + return groupPanel7; + } - private DropDown drpDia = new DropDown(); + public void setGroupPanel7( PanelGroup pg ) + { + this.groupPanel7 = pg; + } + private StaticText staticText6 = new StaticText(); - public DropDown getDrpDia() { - return drpDia; - } + public StaticText getStaticText6() + { + return staticText6; + } - public void setDrpDia(DropDown dd) { - this.drpDia = dd; - } + public void setStaticText6( StaticText st ) + { + this.staticText6 = st; + } + private TextField txtNome = new TextField(); - private PanelGroup groupPanel6 = new PanelGroup(); + public TextField getTxtNome() + { + return txtNome; + } - public PanelGroup getGroupPanel6() { - return groupPanel6; - } + public void setTxtNome( TextField tf ) + { + this.txtNome = tf; + } + private Button butPesquisar = new Button(); - public void setGroupPanel6(PanelGroup pg) { - this.groupPanel6 = pg; - } + public Button getButPesquisar() + { + return butPesquisar; + } - private StaticText staticText5 = new StaticText(); + public void setButPesquisar( Button b ) + { + this.butPesquisar = b; + } + private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); - public StaticText getStaticText5() { - return staticText5; - } + public HtmlPanelGrid getGridPanel6() + { + return gridPanel6; + } - public void setStaticText5(StaticText st) { - this.staticText5 = st; - } + public void setGridPanel6( HtmlPanelGrid hpg ) + { + this.gridPanel6 = hpg; + } + private Table table2 = new Table(); - private TextField txtPor = new TextField(); + public Table getTable2() + { + return table2; + } - public TextField getTxtPor() { - return txtPor; - } + public void setTable2( Table t ) + { + this.table2 = t; + } + private TableRowGroup tableRowGroup2 = new TableRowGroup(); - public void setTxtPor(TextField tf) { - this.txtPor = tf; - } + public TableRowGroup getTableRowGroup2() + { + return tableRowGroup2; + } - private PanelGroup groupPanel7 = new PanelGroup(); + public void setTableRowGroup2( TableRowGroup trg ) + { + this.tableRowGroup2 = trg; + } + private TableColumn tableColumn6 = new TableColumn(); - public PanelGroup getGroupPanel7() { - return groupPanel7; - } + public TableColumn getTableColumn6() + { + return tableColumn6; + } - public void setGroupPanel7(PanelGroup pg) { - this.groupPanel7 = pg; - } + public void setTableColumn6( TableColumn tc ) + { + this.tableColumn6 = tc; + } + private Hyperlink lnkDataConcluida = new Hyperlink(); - private StaticText staticText6 = new StaticText(); + public Hyperlink getLnkDataConcluida() + { + return lnkDataConcluida; + } - public StaticText getStaticText6() { - return staticText6; - } + public void setLnkDataConcluida( Hyperlink h ) + { + this.lnkDataConcluida = h; + } + private TableColumn tableColumn7 = new TableColumn(); - public void setStaticText6(StaticText st) { - this.staticText6 = st; - } + public TableColumn getTableColumn7() + { + return tableColumn7; + } - private TextField txtNome = new TextField(); + public void setTableColumn7( TableColumn tc ) + { + this.tableColumn7 = tc; + } + private Hyperlink lnkNrConcluida = new Hyperlink(); - public TextField getTxtNome() { - return txtNome; - } + public Hyperlink getLnkNrConcluida() + { + return lnkNrConcluida; + } - public void setTxtNome(TextField tf) { - this.txtNome = tf; - } + public void setLnkNrConcluida( Hyperlink h ) + { + this.lnkNrConcluida = h; + } + private TableColumn tableColumn8 = new TableColumn(); - private Button butPesquisar = new Button(); + public TableColumn getTableColumn8() + { + return tableColumn8; + } - public Button getButPesquisar() { - return butPesquisar; - } + public void setTableColumn8( TableColumn tc ) + { + this.tableColumn8 = tc; + } + private Hyperlink lnkPorConcluida = new Hyperlink(); - public void setButPesquisar(Button b) { - this.butPesquisar = b; - } + public Hyperlink getLnkPorConcluida() + { + return lnkPorConcluida; + } - private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); + public void setLnkPorConcluida( Hyperlink h ) + { + this.lnkPorConcluida = h; + } + private TableColumn tableColumn9 = new TableColumn(); - public HtmlPanelGrid getGridPanel6() { - return gridPanel6; - } + public TableColumn getTableColumn9() + { + return tableColumn9; + } - public void setGridPanel6(HtmlPanelGrid hpg) { - this.gridPanel6 = hpg; - } + public void setTableColumn9( TableColumn tc ) + { + this.tableColumn9 = tc; + } + private Hyperlink lnkNomeConcluida = new Hyperlink(); - private Table table2 = new Table(); + public Hyperlink getLnkNomeConcluida() + { + return lnkNomeConcluida; + } - public Table getTable2() { - return table2; - } + public void setLnkNomeConcluida( Hyperlink h ) + { + this.lnkNomeConcluida = h; + } + private TableColumn tableColumn10 = new TableColumn(); - public void setTable2(Table t) { - this.table2 = t; - } + public TableColumn getTableColumn10() + { + return tableColumn10; + } - private TableRowGroup tableRowGroup2 = new TableRowGroup(); + public void setTableColumn10( TableColumn tc ) + { + this.tableColumn10 = tc; + } + private Hyperlink lnkEstabConcluida = new Hyperlink(); - public TableRowGroup getTableRowGroup2() { - return tableRowGroup2; - } + public Hyperlink getLnkEstabConcluida() + { + return lnkEstabConcluida; + } - public void setTableRowGroup2(TableRowGroup trg) { - this.tableRowGroup2 = trg; - } + public void setLnkEstabConcluida( Hyperlink h ) + { + this.lnkEstabConcluida = h; + } + private StaticText txtSearchMsg = new StaticText(); - private TableColumn tableColumn6 = new TableColumn(); + public StaticText getTxtSearchMsg() + { + return txtSearchMsg; + } - public TableColumn getTableColumn6() { - return tableColumn6; - } + public void setTxtSearchMsg( StaticText st ) + { + this.txtSearchMsg = st; + } + private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); - public void setTableColumn6(TableColumn tc) { - this.tableColumn6 = tc; - } + public HtmlPanelGrid getGridPanel7() + { + return gridPanel7; + } - private Hyperlink lnkDataConcluida = new Hyperlink(); + public void setGridPanel7( HtmlPanelGrid hpg ) + { + this.gridPanel7 = hpg; + } + private PanelGroup groupPanel8 = new PanelGroup(); - public Hyperlink getLnkDataConcluida() { - return lnkDataConcluida; - } + public PanelGroup getGroupPanel8() + { + return groupPanel8; + } - public void setLnkDataConcluida(Hyperlink h) { - this.lnkDataConcluida = h; - } + public void setGroupPanel8( PanelGroup pg ) + { + this.groupPanel8 = pg; + } + private StaticText staticText7 = new StaticText(); - private TableColumn tableColumn7 = new TableColumn(); + public StaticText getStaticText7() + { + return staticText7; + } - public TableColumn getTableColumn7() { - return tableColumn7; - } + public void setStaticText7( StaticText st ) + { + this.staticText7 = st; + } + private ImageComponent image3 = new ImageComponent(); - public void setTableColumn7(TableColumn tc) { - this.tableColumn7 = tc; - } + public ImageComponent getImage3() + { + return image3; + } - private Hyperlink lnkNrConcluida = new Hyperlink(); + public void setImage3( ImageComponent ic ) + { + this.image3 = ic; + } + private StaticText staticText8 = new StaticText(); - public Hyperlink getLnkNrConcluida() { - return lnkNrConcluida; - } + public StaticText getStaticText8() + { + return staticText8; + } - public void setLnkNrConcluida(Hyperlink h) { - this.lnkNrConcluida = h; - } + public void setStaticText8( StaticText st ) + { + this.staticText8 = st; + } + private TableColumn tableColumn11 = new TableColumn(); - private TableColumn tableColumn8 = new TableColumn(); + public TableColumn getTableColumn11() + { + return tableColumn11; + } - public TableColumn getTableColumn8() { - return tableColumn8; - } + public void setTableColumn11( TableColumn tc ) + { + this.tableColumn11 = tc; + } + private Hyperlink lnkDataAberturaSeg1 = new Hyperlink(); - public void setTableColumn8(TableColumn tc) { - this.tableColumn8 = tc; - } + public Hyperlink getLnkDataAberturaSeg1() + { + return lnkDataAberturaSeg1; + } - private Hyperlink lnkPorConcluida = new Hyperlink(); + public void setLnkDataAberturaSeg1( Hyperlink h ) + { + this.lnkDataAberturaSeg1 = h; + } + private TableColumn tableColumn12 = new TableColumn(); - public Hyperlink getLnkPorConcluida() { - return lnkPorConcluida; - } + public TableColumn getTableColumn12() + { + return tableColumn12; + } - public void setLnkPorConcluida(Hyperlink h) { - this.lnkPorConcluida = h; - } + public void setTableColumn12( TableColumn tc ) + { + this.tableColumn12 = tc; + } + private Hyperlink lnkDataAberturaConcluida1 = new Hyperlink(); - private TableColumn tableColumn9 = new TableColumn(); + public Hyperlink getLnkDataAberturaConcluida1() + { + return lnkDataAberturaConcluida1; + } - public TableColumn getTableColumn9() { - return tableColumn9; - } + public void setLnkDataAberturaConcluida1( Hyperlink h ) + { + this.lnkDataAberturaConcluida1 = h; + } + private TableColumn tableColumn13 = new TableColumn(); - public void setTableColumn9(TableColumn tc) { - this.tableColumn9 = tc; - } + public TableColumn getTableColumn13() + { + return tableColumn13; + } - private Hyperlink lnkNomeConcluida = new Hyperlink(); + public void setTableColumn13( TableColumn tc ) + { + this.tableColumn13 = tc; + } + private Hyperlink lnkEstabelecimentoSeg1 = new Hyperlink(); - public Hyperlink getLnkNomeConcluida() { - return lnkNomeConcluida; - } + public Hyperlink getLnkEstabelecimentoSeg1() + { + return lnkEstabelecimentoSeg1; + } - public void setLnkNomeConcluida(Hyperlink h) { - this.lnkNomeConcluida = h; - } + public void setLnkEstabelecimentoSeg1( Hyperlink h ) + { + this.lnkEstabelecimentoSeg1 = h; + } + private StaticText lblUser = new StaticText(); - private TableColumn tableColumn10 = new TableColumn(); + public StaticText getLblUser() + { + return lblUser; + } - public TableColumn getTableColumn10() { - return tableColumn10; - } + public void setLblUser( StaticText st ) + { + this.lblUser = st; + } + private Hyperlink lnkPlanosActuacao = new Hyperlink(); - public void setTableColumn10(TableColumn tc) { - this.tableColumn10 = tc; - } + public Hyperlink getLnkPlanosActuacao() + { + return lnkPlanosActuacao; + } - private Hyperlink lnkEstabConcluida = new Hyperlink(); + public void setLnkPlanosActuacao( Hyperlink h ) + { + this.lnkPlanosActuacao = h; + } + private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid(); - public Hyperlink getLnkEstabConcluida() { - return lnkEstabConcluida; - } + public HtmlPanelGrid getGridPanelFilterSeg() + { + return this.gridPanelFilterSeg; + } - public void setLnkEstabConcluida(Hyperlink h) { - this.lnkEstabConcluida = h; - } + public void setGridPanelFilterSeg( HtmlPanelGrid pg ) + { + this.gridPanelFilterSeg = pg; + } + private PanelGroup groupPanelFilterSeg = new PanelGroup(); - private StaticText txtSearchMsg = new StaticText(); + public PanelGroup getGroupPanelFilterSeg() + { + return this.groupPanelFilterSeg; + } - public StaticText getTxtSearchMsg() { - return txtSearchMsg; - } + public void setGroupPanelFilterSeg( PanelGroup pg ) + { + this.groupPanelFilterSeg = pg; + } + private StaticText labelFilterNameSeg = new StaticText(); - public void setTxtSearchMsg(StaticText st) { - this.txtSearchMsg = st; - } + public StaticText getLabelFilterNameSeg() + { + return this.labelFilterNameSeg; + } - private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); + public void setLabelFilterNameSeg( StaticText st ) + { + this.labelFilterNameSeg = st; + } + private TextField textFilterNameSeg = new TextField(); - public HtmlPanelGrid getGridPanel7() { - return gridPanel7; - } + public TextField getTextFilterNameSeg() + { + return this.textFilterNameSeg; + } - public void setGridPanel7(HtmlPanelGrid hpg) { - this.gridPanel7 = hpg; - } + public void setTextFilterNameSeg( TextField tf ) + { + this.textFilterNameSeg = tf; + } + private StaticText labelFilterEstabelecimentoSeg = new StaticText(); - private PanelGroup groupPanel8 = new PanelGroup(); + public StaticText getLabelFilterEstabelecimentoSeg() + { + return labelFilterEstabelecimentoSeg; + } - public PanelGroup getGroupPanel8() { - return groupPanel8; - } + public void setLabelFilterEstabelecimentoSeg( StaticText labelFilterEstabelecimentoSeg ) + { + this.labelFilterEstabelecimentoSeg = labelFilterEstabelecimentoSeg; + } + private TextField textFilterEstabelecimentoSeg = new TextField(); - public void setGroupPanel8(PanelGroup pg) { - this.groupPanel8 = pg; - } + public TextField getTextFilterEstabelecimentoSeg() + { + return textFilterEstabelecimentoSeg; + } - private StaticText staticText7 = new StaticText(); + public void setTextFilterEstabelecimentoSeg( TextField textFilterEstabelecimentoSeg ) + { + this.textFilterEstabelecimentoSeg = textFilterEstabelecimentoSeg; + } + private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar(); - public StaticText getStaticText7() { - return staticText7; - } + public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg() + { + return this.calFilterDateSeg; + } - public void setStaticText7(StaticText st) { - this.staticText7 = st; - } + public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c ) + { + this.calFilterDateSeg = c; + } + private TextField textFilterPORSeg = new TextField(); - private ImageComponent image3 = new ImageComponent(); + public TextField getTextFilterPORSeg() + { + return textFilterPORSeg; + } - public ImageComponent getImage3() { - return image3; - } + public void setTextFilterPORSeg( TextField textFilterPORSeg ) + { + this.textFilterPORSeg = textFilterPORSeg; + } + private Button buttonFilterSeg = new Button(); - public void setImage3(ImageComponent ic) { - this.image3 = ic; - } + public Button getButtonFilterSeg() + { + return this.buttonFilterSeg; + } - private StaticText staticText8 = new StaticText(); + public void setButtonFilterSeg( Button b ) + { + this.buttonFilterSeg = b; + } + private TextField textFilterEstabelecimentoConc = new TextField(); - public StaticText getStaticText8() { - return staticText8; - } + public TextField getTextFilterEstabelecimentoConc() + { + return textFilterEstabelecimentoConc; + } - public void setStaticText8(StaticText st) { - this.staticText8 = st; - } + public void setTextFilterEstabelecimentoConc( TextField textFilterEstabelecimentoConc ) + { + this.textFilterEstabelecimentoConc = textFilterEstabelecimentoConc; + } + private DropDown dropCurrentYear = new DropDown(); - private TableColumn tableColumn11 = new TableColumn(); + public DropDown getDropCurrentYear() + { + return dropCurrentYear; + } - public TableColumn getTableColumn11() { - return tableColumn11; - } + public void setDropCurrentYear( DropDown dropCurrentYear ) + { + this.dropCurrentYear = dropCurrentYear; + } + private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" ); + //
- public void setTableColumn11(TableColumn tc) { - this.tableColumn11 = tc; - } + /** + *

Construct a new Page bean instance.

+ */ + public FormGestor() + { + } - private Hyperlink lnkDataAberturaSeg1 = new Hyperlink(); + /** + *

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.

+ */ + @Override + public void init() + { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized - public Hyperlink getLnkDataAberturaSeg1() { - return lnkDataAberturaSeg1; - } + if ( !getSessionBean1().isLoggedIn() ) + { + try + { + getExternalContext().redirect( "Login.jsp" ); + } + catch ( Exception e ) + { + // . . . handle exception . . . + } + } - public void setLnkDataAberturaSeg1(Hyperlink h) { - this.lnkDataAberturaSeg1 = h; - } - private TableColumn tableColumn12 = new TableColumn(); + // + // Initialize automatically managed components + // *Note* - this logic should NOT be modified + try + { + _init(); + } + catch ( Exception e ) + { + log( "FormGestor Initialization Failure", e ); + throw e instanceof FacesException ? ( FacesException ) e : new FacesException( e ); + } - public TableColumn getTableColumn12() { - return tableColumn12; - } + // + // Perform application initialization that must complete + // *after* managed components are initialized + } - public void setTableColumn12(TableColumn tc) { - this.tableColumn12 = tc; - } + /** + *

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.

+ */ + @Override + public void preprocess() + { + } - private Hyperlink lnkDataAberturaConcluida1 = new Hyperlink(); + private void fillInitialForm() + { + Utilizador curUser = getSessionBean1().getCurrentUser(); + Integer fromYear = getSelectedYear(); - public Hyperlink getLnkDataAberturaConcluida1() { - return lnkDataAberturaConcluida1; - } + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + Integer estabelecimento_id = null; + table1.setRendered( true ); + ArrayList seguimentoList = null; - public void setLnkDataAberturaConcluida1(Hyperlink h) { - this.lnkDataAberturaConcluida1 = h; - } + //if(curUser.getGestor_geral().matches("y") || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_LOJA) + if ( curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_GESTOR ) + { + estabelecimento_id = curUser.getEstabelecimento_gestor(); + if ( estabelecimento_id.intValue() == 0 ) + { + seguimentoList = adp.getAnalisesSeguimentoGestorList( null, fromYear ); + } + else + { + seguimentoList = adp.getAnalisesSeguimentoGestorList( curUser.getEstabelecimento_id(), fromYear ); + } + } + else if ( curUser.getGestor_geral().matches( "y" ) || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA ) + { + seguimentoList = adp.getAnalisesSeguimentoGestorList( null, fromYear ); + } + else if ( curUser.getGestor_geral().matches( "n" ) || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_LOJA ) + { + seguimentoList = adp.getAnalisesSeguimentoGestorList( curUser.getEstabelecimento_id(), fromYear ); + } + getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); + } + catch ( Exception ex ) + { + table1.setRendered( false ); + ErrorLogger.logException( ex ); + } - private TableColumn tableColumn13 = new TableColumn(); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - public TableColumn getTableColumn13() { - return tableColumn13; - } + table2.setRendered( true ); + ArrayList concluidasList = null; - public void setTableColumn13(TableColumn tc) { - this.tableColumn13 = tc; - } + if ( getSessionBean1().getCurrentUser().getGestor_geral().matches( "y" ) || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA /*|| curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_LOJA*/ ) + { + concluidasList = adp.getAnalisesConcluidasList( null, fromYear ); + } + else + { + concluidasList = adp.getAnalisesConcluidasList( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), fromYear ); + } + getSessionBean1().getAnalisesConcluidasDataProvider().setList( concluidasList ); + } + catch ( Exception ex ) + { + table2.setRendered( false ); + ErrorLogger.logException( ex ); + } + } - private Hyperlink lnkEstabelecimentoSeg1 = new Hyperlink(); + /** + *

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.

+ */ + @Override + public void prerender() + { + System.out.println( "=== FORM_GESTOR ===" ); + Utilizador curUser = getSessionBean1().getCurrentUser(); + lblUser.setText( curUser.getLogin() ); + if ( curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_GESTOR ) + { + if ( curUser.getGestor_geral().matches( "n" ) ) + { + lnkPlanosActuacao.setDisabled( true ); + } + } + else if ( curUser.getTipo().intValue() != Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA ) + { + if ( curUser.getTipo().intValue() != Global.TIPO_UTILIZADOR_DIRECTOR_LOJA ) + { + lnkPlanosActuacao.setDisabled( true ); + } + } - public Hyperlink getLnkEstabelecimentoSeg1() { - return lnkEstabelecimentoSeg1; - } + HttpServletRequest request = ( HttpServletRequest ) getExternalContext().getRequest(); + String referer = request.getRequestURI(); + String pageFrom = Utils.getPageFrom( referer ); + if ( !pageFrom.matches( "FormGestor.jsp" ) ) + { + fillCurrentYearDrop(); - public void setLnkEstabelecimentoSeg1(Hyperlink h) { - this.lnkEstabelecimentoSeg1 = h; - } - private StaticText lblUser = new StaticText(); + fillInitialForm(); + fillAnoDropDown(); + } + } - public StaticText getLblUser() { - return lblUser; - } + /** + *

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).

+ */ + @Override + public void destroy() + { + } - public void setLblUser(StaticText st) { - this.lblUser = st; - } - private Hyperlink lnkPlanosActuacao = new Hyperlink(); + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() + { + return ( RequestBean1 ) getBean( "RequestBean1" ); + } - public Hyperlink getLnkPlanosActuacao() { - return lnkPlanosActuacao; - } + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() + { + return ( SessionBean1 ) getBean( "SessionBean1" ); + } - public void setLnkPlanosActuacao(Hyperlink h) { - this.lnkPlanosActuacao = h; - } + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() + { + return ( ApplicationBean1 ) getBean( "ApplicationBean1" ); + } + public String lnkPlanosActuacao_action() + { + Utilizador u = getSessionBean1().getCurrentUser(); +// String curUser = "?user=" + u.getId().toString(); + FacesContext fc = getFacesContext().getCurrentInstance(); + Global.redirectToPlanos( fc, u ); +// Utilizador u = getSessionBean1().getCurrentUser(); +// String curUser = "?user=" + u.getId().toString(); +// FacesContext fc = getFacesContext().getCurrentInstance(); +// try +// { +// JSFUtils.redirect(fc, Global.PLANOS_ACTUACAO_URL + curUser); +// } +// catch(Exception ex) +// { +// ErrorLogger.logException( ex ); +// } + return null; + } - private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid(); - public HtmlPanelGrid getGridPanelFilterSeg() + public String lnkAnalisesAcidente_action() { - return this.gridPanelFilterSeg; + return null; } - public void setGridPanelFilterSeg( HtmlPanelGrid pg ) + + public String lnkGerirUtilizadores_action() { - this.gridPanelFilterSeg = pg; + return null; } - private PanelGroup groupPanelFilterSeg = new PanelGroup(); - public PanelGroup getGroupPanelFilterSeg() + public String lnkEditUser_action() { - return this.groupPanelFilterSeg; + getSessionBean1().setNavFrom( "FormGestor" ); + getSessionBean1().setModoEdicaoUtilizador( "edit" ); + return "user"; } - public void setGroupPanelFilterSeg( PanelGroup pg ) + + public String lnkLogout_action() { - this.groupPanelFilterSeg = pg; + Utils.doLogout( getExternalContext(), true ); + return null; } - private StaticText labelFilterNameSeg = new StaticText(); - public StaticText getLabelFilterNameSeg() + public String lnkDataAcidenteSeg_action() { - return this.labelFilterNameSeg; + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormGestor" ); + return "view_analise"; } - public void setLabelFilterNameSeg( StaticText st ) + + public String lnkDataAberturaSeg_action() { - this.labelFilterNameSeg = st; + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormGestor" ); + return "view_analise"; } - private TextField textFilterNameSeg = new TextField(); - public TextField getTextFilterNameSeg() + public String lnkNrSeg_action() { - return this.textFilterNameSeg; + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormGestor" ); + return "view_analise"; } - public void setTextFilterNameSeg( TextField tf ) + + public String lnkPorSeg_action() { - this.textFilterNameSeg = tf; + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormGestor" ); + return "view_analise"; } - private StaticText labelFilterEstabelecimentoSeg = new StaticText(); - public StaticText getLabelFilterEstabelecimentoSeg() { - return labelFilterEstabelecimentoSeg; - } - public void setLabelFilterEstabelecimentoSeg(StaticText labelFilterEstabelecimentoSeg) { - this.labelFilterEstabelecimentoSeg = labelFilterEstabelecimentoSeg; + public String lnkNomeAcidentadoSeg_action() + { + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormGestor" ); + return "view_analise"; } - private TextField textFilterEstabelecimentoSeg = new TextField(); - - public TextField getTextFilterEstabelecimentoSeg() { - return textFilterEstabelecimentoSeg; - } - public void setTextFilterEstabelecimentoSeg(TextField textFilterEstabelecimentoSeg) { - this.textFilterEstabelecimentoSeg = textFilterEstabelecimentoSeg; + public String lnkFaseSeg_action() + { + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormGestor" ); + return "view_analise"; } - private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar(); - public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg() + public String lnkEstabelecimentoSeg_action() { - return this.calFilterDateSeg; + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormGestor" ); + return "view_analise"; } - public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c ) + + private AnaliseAcidente getTableSeguimentoRowData() { - this.calFilterDateSeg = c; + RowKey rk = tableRowGroup1.getRowKey(); + int k = Integer.parseInt( rk.getRowId() ); + AnalisesSeguimentoDataProvider provider = ( AnalisesSeguimentoDataProvider ) tableRowGroup1.getSourceData(); + ArrayList list = ( ArrayList ) provider.getList(); + AnaliseAcidente a = ( AnaliseAcidente ) list.get( k ); + return a; } - private TextField textFilterPORSeg = new TextField(); - - public TextField getTextFilterPORSeg() { - return textFilterPORSeg; + public void drpAno_processValueChange( ValueChangeEvent event ) + { + 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 setTextFilterPORSeg(TextField textFilterPORSeg) { - this.textFilterPORSeg = textFilterPORSeg; + public void drpMes_processValueChange( ValueChangeEvent event ) + { + Object mes = event.getNewValue(); + if ( mes == null ) + { + lblDia.setVisible( false ); + drpDia.setVisible( false ); + } + else + { + lblDia.setVisible( true ); + drpDia.setVisible( true ); + //fillDiaDropDown(); + } } - - private Button buttonFilterSeg = new Button(); - public Button getButtonFilterSeg() + public void drpDia_processValueChange( ValueChangeEvent event ) { - return this.buttonFilterSeg; } - public void setButtonFilterSeg( Button b ) + + public String butPesquisar_action() { - this.buttonFilterSeg = b; - } + Object obAno = null; + Object obMes = null; + Object obDia = null; + try + { + obAno = drpAno.getSelected(); + obMes = drpMes.getSelected(); + obDia = drpDia.getSelected(); + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } - private TextField textFilterEstabelecimentoConc = new TextField(); + Integer ano = null; + Integer mes = null; + Integer dia = null; - public TextField getTextFilterEstabelecimentoConc() { - return textFilterEstabelecimentoConc; - } + if ( obAno != null ) + { + ano = ( Integer ) obAno; + } - public void setTextFilterEstabelecimentoConc(TextField textFilterEstabelecimentoConc) { - this.textFilterEstabelecimentoConc = textFilterEstabelecimentoConc; - } - + if ( obMes != null ) + { + mes = ( Integer ) obMes; + } - private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" ); - //
- - /** - *

Construct a new Page bean instance.

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

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.

- */ - @Override - 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 - - if (!getSessionBean1().isLoggedIn()) { - try { - getExternalContext().redirect("Login.jsp"); - } catch(Exception e) { - // . . . handle exception . . . - } - } - - - // - // Initialize automatically managed components - // *Note* - this logic should NOT be modified - try { - _init(); - } catch (Exception e) { - log("FormGestor 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.

- */ - @Override - 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.

- */ - @Override - public void prerender() - { - System.out.println("=== FORM_GESTOR ==="); - Utilizador curUser = getSessionBean1().getCurrentUser(); - lblUser.setText( curUser.getLogin() ); - if(curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_GESTOR) - { - if(curUser.getGestor_geral().matches("n")) - { - lnkPlanosActuacao.setDisabled(true); - } - } - else if(curUser.getTipo().intValue() != Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA) - { - if(curUser.getTipo().intValue() != Global.TIPO_UTILIZADOR_DIRECTOR_LOJA) - { - lnkPlanosActuacao.setDisabled(true); - } - } - - HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest(); - String referer = request.getRequestURI(); - String pageFrom = Utils.getPageFrom(referer); - if ( ! pageFrom.matches( "FormGestor.jsp" ) ) - { - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - Integer estabelecimento_id = null; - table1.setRendered( true ); - ArrayList seguimentoList = null; - - //if(curUser.getGestor_geral().matches("y") || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_LOJA) - if ( curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_GESTOR ) - { - estabelecimento_id = curUser.getEstabelecimento_gestor(); - if ( estabelecimento_id.intValue() == 0 ) - { - seguimentoList = adp.getAnalisesSeguimentoGestorList( null ); - } - else - { - seguimentoList = adp.getAnalisesSeguimentoGestorList( curUser.getEstabelecimento_id() ); - } - } - else if ( curUser.getGestor_geral().matches("y") || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA ) - { - seguimentoList = adp.getAnalisesSeguimentoGestorList( null ); - } - else if ( curUser.getGestor_geral().matches("n") || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_LOJA ) - { - seguimentoList = adp.getAnalisesSeguimentoGestorList( curUser.getEstabelecimento_id() ); - } - getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); - } - catch ( Exception ex ) - { - table1.setRendered( false ); - ErrorLogger.logException( ex ); - } + if ( obDia != null ) + { + dia = ( Integer ) obDia; + } - try + String por = null; + if ( txtPor.getText() != null ) + { + por = ( String ) txtPor.getText(); + if ( por.trim().length() == 0 ) { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + por = null; + } + } - table2.setRendered( true ); - ArrayList concluidasList = null; + String nome = null; + if ( txtNome.getText() != null ) + { + nome = ( String ) txtNome.getText(); + if ( nome.trim().length() == 0 ) + { + nome = null; + } + } - if ( getSessionBean1().getCurrentUser().getGestor_geral().matches("y") - || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA - /*|| curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_LOJA*/ ) - { - concluidasList = adp.getAnalisesConcluidasList( null ); - } - else - { - concluidasList = adp.getAnalisesConcluidasList( getSessionBean1().getCurrentUser().getEstabelecimento_id() ); - } - getSessionBean1().getAnalisesConcluidasDataProvider().setList( concluidasList ); + String estabelecimento = null; + if ( textFilterEstabelecimentoConc.getText() != null ) + { + estabelecimento = (( String ) textFilterEstabelecimentoConc.getText()).trim(); + if ( estabelecimento.length() == 0 ) + { + estabelecimento = null; + } + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + Integer fromYear = getSelectedYear(); + + //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList()); + ArrayList concluidasList = null; + if ( getSessionBean1().getCurrentUser().getGestor_geral().matches( "y" ) ) + { + concluidasList = adp.searchAnalisesConcluidasList( + null, ano, mes, dia, por, nome, estabelecimento, fromYear ); } - catch ( Exception ex ) + else { - table2.setRendered( false ); - ErrorLogger.logException( ex ); + concluidasList = adp.searchAnalisesConcluidasList( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), + ano, mes, dia, por, nome, null, fromYear ); } - fillAnoDropDown(); + + table2.setRendered( true ); + txtSearchMsg.setRendered( false ); + getSessionBean1().getAnalisesConcluidasDataProvider().setList( concluidasList ); } - } - - /** - *

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).

- */ - @Override - 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 lnkPlanosActuacao_action() { - // TODO: Replace with your code - Utilizador u = getSessionBean1().getCurrentUser(); -// String curUser = "?user=" + u.getId().toString(); - FacesContext fc = getFacesContext().getCurrentInstance(); - Global.redirectToPlanos(fc, u); - -// Utilizador u = getSessionBean1().getCurrentUser(); -// String curUser = "?user=" + u.getId().toString(); -// FacesContext fc = getFacesContext().getCurrentInstance(); -// try -// { -// JSFUtils.redirect(fc, Global.PLANOS_ACTUACAO_URL + curUser); -// } -// catch(Exception ex) -// { -// ErrorLogger.logException( ex ); -// } - return null; - } - - public String lnkAnalisesAcidente_action() { - return null; - } - - public String lnkGerirUtilizadores_action() { - // TODO: Replace with your code - - return null; - } - - public String lnkEditUser_action() { - // TODO: Replace with your code - - getSessionBean1().setNavFrom("FormGestor"); - getSessionBean1().setModoEdicaoUtilizador("edit"); - return "user"; - - } - - public String lnkLogout_action() + catch ( Exception ex ) + { + table2.setRendered( false ); + txtSearchMsg.setRendered( true ); + txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); + ErrorLogger.logException( ex ); + } + + return null; + } + + public String lnkDataConcluida_action() { - Utils.doLogout( getExternalContext(), true ); - return null; - } - - public String lnkDataAcidenteSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormGestor"); - return "view_analise"; - - } - - public String lnkDataAberturaSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormGestor"); - return "view_analise"; - } - - public String lnkNrSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormGestor"); - return "view_analise"; - - } - - public String lnkPorSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormGestor"); - return "view_analise"; - - } - - public String lnkNomeAcidentadoSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormGestor"); - return "view_analise"; - - } - - public String lnkFaseSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormGestor"); - return "view_analise"; - - } - - public String lnkEstabelecimentoSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormGestor"); - return "view_analise"; - } - - private AnaliseAcidente getTableSeguimentoRowData() - { - RowKey rk = tableRowGroup1.getRowKey(); - int k = Integer.parseInt(rk.getRowId()); - AnalisesSeguimentoDataProvider provider = (AnalisesSeguimentoDataProvider) tableRowGroup1.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) - { - ErrorLogger.logException( ex ); - } - - 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 por = null; - if(txtPor.getText() != null) - { - por = (String) txtPor.getText(); - if(por.trim().length() == 0) - { - por = null; - } - } - - String nome = null; - if(txtNome.getText() != null) - { - nome = (String) txtNome.getText(); - if(nome.trim().length() == 0) - { - nome = null; - } - } + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormGestor" ); + return "view_analise"; + } - String estabelecimento = null; - if ( textFilterEstabelecimentoConc.getText() != null ) - { - estabelecimento = (( String ) textFilterEstabelecimentoConc.getText()).trim(); - if( estabelecimento.length() == 0 ) - { - estabelecimento = null; - } - } - - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList()); - ArrayList concluidasList = null; - if ( getSessionBean1().getCurrentUser().getGestor_geral().matches( "y" ) ) - { - concluidasList = adp.searchAanalisesConcluidasList( - null, ano, mes, dia, por, nome, estabelecimento ); - } - else - { - concluidasList = adp.searchAanalisesConcluidasList( - getSessionBean1().getCurrentUser().getEstabelecimento_id(), - ano, mes, dia, por, nome, null ); - } - - table2.setRendered(true); - txtSearchMsg.setRendered(false); - getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); - } - catch(Exception ex) - { - table2.setRendered(false); - txtSearchMsg.setRendered(true); - txtSearchMsg.setText("Não foram encontrados registos para a sua pesquisa !"); - ErrorLogger.logException( ex ); - } - - return null; - } - - public String lnkDataConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormGestor"); - return "view_analise"; - - } - - public String lnkDataAberturaConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormGestor"); - return "view_analise"; - } - - public String lnkNrConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormGestor"); - return "view_analise"; - - } - - public String lnkPorConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormGestor"); - return "view_analise"; - - } - - public String lnkNomeConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormGestor"); - return "view_analise"; - - } - - public String lnkEstabConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormGestor"); - return "view_analise"; - - } - - private AnaliseAcidente getTableConcluidasRowData() - { - RowKey rk = tableRowGroup2.getRowKey(); - int k = Integer.parseInt(rk.getRowId()); - AnalisesConcluidasDataProvider provider = (AnalisesConcluidasDataProvider) tableRowGroup2.getSourceData(); - ArrayList list = (ArrayList) provider.getList(); - AnaliseAcidente a = (AnaliseAcidente)list.get(k); - return a; - } - - - private void fillAnoDropDown() - { + public String lnkDataAberturaConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormGestor" ); + return "view_analise"; + } + + public String lnkNrConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormGestor" ); + return "view_analise"; + } + + public String lnkPorConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormGestor" ); + return "view_analise"; + } + + public String lnkNomeConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormGestor" ); + return "view_analise"; + } + + public String lnkEstabConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormGestor" ); + return "view_analise"; + } + + private AnaliseAcidente getTableConcluidasRowData() + { + RowKey rk = tableRowGroup2.getRowKey(); + int k = Integer.parseInt( rk.getRowId() ); + AnalisesConcluidasDataProvider provider = ( AnalisesConcluidasDataProvider ) tableRowGroup2.getSourceData(); + ArrayList list = ( ArrayList ) provider.getList(); + AnaliseAcidente a = ( AnaliseAcidente ) list.get( k ); + return a; + } + + private void fillAnoDropDown() + { // ArrayList anosList = new ArrayList(); // for(int ano=2007; ano<2051; ano++) // { // anosList.add(new Integer(ano)); // } - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - ArrayList anosList = adp.getAnosListFromAnalises(); - 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) ); - - } - catch(Exception ex) - { - ErrorLogger.logException( ex ); - } - - } - - - 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) ); - } - + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList anosList = adp.getAnosListFromAnalises(); + 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) ); + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } + } + + 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 lnkAjuda_action() { - // TODO: Replace with your code + public String lnkAjuda_action() + { // ServletContext theApplicationsServletContext = // (ServletContext) this.getExternalContext().getContext(); // String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL); @@ -1539,14 +1622,13 @@ public class FormGestor extends AbstractPageBean { // { // ErrorLogger.logException( ex ); // } - return null; - } + return null; + } - public String lnkEstabelecimento_action() { - // TODO: Replace with your code - - return null; - } + public String lnkEstabelecimento_action() + { + return null; + } public String buttonFilterSeg_action() { @@ -1560,22 +1642,22 @@ public class FormGestor extends AbstractPageBean { String POR = null; if ( textFilterPORSeg.getText() != null ) { - POR = ( ( String ) textFilterPORSeg.getText() ).trim(); + POR = (( String ) textFilterPORSeg.getText()).trim(); if ( POR.length() == 0 ) { POR = null; } } - String nome = null; - if ( textFilterNameSeg.getText() != null ) - { - nome = (( String ) textFilterNameSeg.getText()).trim(); - if( nome.length() == 0 ) - { - nome = null; - } - } + String nome = null; + if ( textFilterNameSeg.getText() != null ) + { + nome = (( String ) textFilterNameSeg.getText()).trim(); + if ( nome.length() == 0 ) + { + nome = null; + } + } String estabelecimento = null; if ( textFilterEstabelecimentoSeg.getText() != null ) @@ -1587,49 +1669,89 @@ public class FormGestor extends AbstractPageBean { } } - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + Utilizador curUser = getSessionBean1().getCurrentUser(); ArrayList seguimentoList = null; Integer estabelecimento_id = null; + Integer fromYear = getSelectedYear(); if ( curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_GESTOR ) { estabelecimento_id = curUser.getEstabelecimento_gestor(); if ( estabelecimento_id.intValue() == 0 ) { - seguimentoList = adp.searchAnalisesSeguimentoGestor( null, nome, estabelecimento, visitaDateStr, POR ); + seguimentoList = adp.searchAnalisesSeguimentoGestor( null, nome, estabelecimento, visitaDateStr, POR, fromYear ); } else { - seguimentoList = adp.searchAnalisesSeguimentoGestor( curUser.getEstabelecimento_id(), nome, estabelecimento, visitaDateStr, POR ); + seguimentoList = adp.searchAnalisesSeguimentoGestor( curUser.getEstabelecimento_id(), nome, estabelecimento, visitaDateStr, POR, fromYear ); } } else if ( curUser.getGestor_geral().matches( "y" ) || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_NACIONAL_SEGURANCA ) { - seguimentoList = adp.searchAnalisesSeguimentoGestor( null, nome, estabelecimento, visitaDateStr, POR ); + seguimentoList = adp.searchAnalisesSeguimentoGestor( null, nome, estabelecimento, visitaDateStr, POR, fromYear ); } else if ( curUser.getGestor_geral().matches( "n" ) || curUser.getTipo().intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_LOJA ) { - seguimentoList = adp.searchAnalisesSeguimentoGestor( curUser.getEstabelecimento_id(), nome, estabelecimento, visitaDateStr, POR ); + seguimentoList = adp.searchAnalisesSeguimentoGestor( curUser.getEstabelecimento_id(), nome, estabelecimento, visitaDateStr, POR, fromYear ); } table1.setRendered( true ); - txtSearchMsg.setRendered( false ); - getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); - } - catch( Exception e ) - { + txtSearchMsg.setRendered( false ); + getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); + } + catch ( Exception e ) + { table1.setRendered( false ); - txtSearchMsg.setRendered( true ); - txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); + txtSearchMsg.setRendered( true ); + txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); ErrorLogger.logException( e ); - } + } return null; } + public void dropCurrentYear_valueChangeListener( ValueChangeEvent event ) + { + Object oldValue = event.getOldValue(); + Object newValue = event.getNewValue(); + + if ( newValue != null && newValue instanceof Integer ) + { + Integer newYear = ( Integer ) newValue; + Integer oldYear = oldValue != null && oldValue instanceof Integer ? ( Integer ) oldValue : null; + if ( oldYear == null || !newYear.equals( oldYear ) ) + { + fillInitialForm(); + } + } + } + + private Integer getSelectedYear() + { + Integer result = null; + if ( dropCurrentYear != null ) + { + Object selected = dropCurrentYear.getSelected(); + if ( selected != null && selected instanceof Integer ) + { + result = ( Integer ) selected; + } + } + return result; + } + + private void fillCurrentYearDrop() + { + Integer selectedYear = getSelectedYear(); + + Option[] opts = Utils.getYearDropValues(); + dropCurrentYear.setItems( opts ); + + dropCurrentYear.setSelected( selectedYear != null ? selectedYear : opts.length > 0 ? opts[ 0].getValue() : null ); + } } diff --git a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormHS.java b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormHS.java index dbab7df0..2e9da20c 100644 --- a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormHS.java +++ b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormHS.java @@ -38,7 +38,8 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; -import java.util.GregorianCalendar; +import java.util.Iterator; +import java.util.List; import java.util.ListIterator; import javax.faces.FacesException; import javax.faces.component.html.HtmlPanelGrid; @@ -54,1847 +55,1848 @@ import utils.Utils; * 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 HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid(); +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 HtmlPanelGrid getGridLayoutTop1() { - return gridLayoutTop1; - } + public Page getPage1() + { + return page1; + } - public void setGridLayoutTop1(HtmlPanelGrid hpg) { - this.gridLayoutTop1 = hpg; - } + public void setPage1( Page p ) + { + this.page1 = p; + } + private Html html1 = new Html(); - private HtmlPanelGrid gridActual1 = new HtmlPanelGrid(); + public Html getHtml1() + { + return html1; + } - public HtmlPanelGrid getGridActual1() { - return gridActual1; - } + public void setHtml1( Html h ) + { + this.html1 = h; + } + private Head head1 = new Head(); - public void setGridActual1(HtmlPanelGrid hpg) { - this.gridActual1 = hpg; - } + public Head getHead1() + { + return head1; + } - private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); + public void setHead1( Head h ) + { + this.head1 = h; + } + private Link link1 = new Link(); - public HtmlPanelGrid getGridPanel2() { - return gridPanel2; - } + public Link getLink1() + { + return link1; + } - public void setGridPanel2(HtmlPanelGrid hpg) { - this.gridPanel2 = hpg; - } + public void setLink1( Link l ) + { + this.link1 = l; + } + private Body body1 = new Body(); - private StaticText staticText4 = new StaticText(); + public Body getBody1() + { + return body1; + } - public StaticText getStaticText4() { - return staticText4; - } + public void setBody1( Body b ) + { + this.body1 = b; + } + private Form form1 = new Form(); - public void setStaticText4(StaticText st) { - this.staticText4 = st; - } + public Form getForm1() + { + return form1; + } - private StaticText staticText5 = new StaticText(); + public void setForm1( Form f ) + { + this.form1 = f; + } + private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); - public StaticText getStaticText5() { - return staticText5; - } + public HtmlPanelGrid getGridBase1() + { + return gridBase1; + } - public void setStaticText5(StaticText st) { - this.staticText5 = st; - } + public void setGridBase1( HtmlPanelGrid hpg ) + { + this.gridBase1 = hpg; + } + private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); - private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); + public HtmlPanelGrid getGridLayout1() + { + return gridLayout1; + } - public HtmlPanelGrid getGridPanel3() { - return gridPanel3; - } + public void setGridLayout1( HtmlPanelGrid hpg ) + { + this.gridLayout1 = hpg; + } + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); - public void setGridPanel3(HtmlPanelGrid hpg) { - this.gridPanel3 = hpg; - } + public HtmlPanelGrid getGridPanel1() + { + return gridPanel1; + } - private Table table1 = new Table(); + public void setGridPanel1( HtmlPanelGrid hpg ) + { + this.gridPanel1 = hpg; + } + private PanelGroup groupPanel1 = new PanelGroup(); - public Table getTable1() { - return table1; - } + public PanelGroup getGroupPanel1() + { + return groupPanel1; + } - public void setTable1(Table t) { - this.table1 = t; - } + public void setGroupPanel1( PanelGroup pg ) + { + this.groupPanel1 = pg; + } + private ImageComponent image1 = new ImageComponent(); - private TableRowGroup tableRowGroup1 = new TableRowGroup(); + public ImageComponent getImage1() + { + return image1; + } - public TableRowGroup getTableRowGroup1() { - return tableRowGroup1; - } + public void setImage1( ImageComponent ic ) + { + this.image1 = ic; + } + private ImageComponent image2 = new ImageComponent(); - public void setTableRowGroup1(TableRowGroup trg) { - this.tableRowGroup1 = trg; - } + public ImageComponent getImage2() + { + return image2; + } - private TableColumn tableColumn1 = new TableColumn(); + public void setImage2( ImageComponent ic ) + { + this.image2 = ic; + } + private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid(); - public TableColumn getTableColumn1() { - return tableColumn1; - } + public HtmlPanelGrid getGridLayoutTop1() + { + return gridLayoutTop1; + } - public void setTableColumn1(TableColumn tc) { - this.tableColumn1 = tc; - } + public void setGridLayoutTop1( HtmlPanelGrid hpg ) + { + this.gridLayoutTop1 = hpg; + } + private HtmlPanelGrid gridActual1 = new HtmlPanelGrid(); - private Hyperlink lnkDataAcidente = new Hyperlink(); + public HtmlPanelGrid getGridActual1() + { + return gridActual1; + } - public Hyperlink getLnkDataAcidente() { - return lnkDataAcidente; - } + public void setGridActual1( HtmlPanelGrid hpg ) + { + this.gridActual1 = hpg; + } + private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); - public void setLnkDataAcidente(Hyperlink h) { - this.lnkDataAcidente = h; - } + public HtmlPanelGrid getGridPanel2() + { + return gridPanel2; + } - private TableColumn tableColumn2 = new TableColumn(); + public void setGridPanel2( HtmlPanelGrid hpg ) + { + this.gridPanel2 = hpg; + } + private StaticText staticText4 = new StaticText(); - public TableColumn getTableColumn2() { - return tableColumn2; - } + public StaticText getStaticText4() + { + return staticText4; + } - public void setTableColumn2(TableColumn tc) { - this.tableColumn2 = tc; - } + public void setStaticText4( StaticText st ) + { + this.staticText4 = st; + } + private StaticText staticText5 = new StaticText(); - private Hyperlink lnkNr = new Hyperlink(); + public StaticText getStaticText5() + { + return staticText5; + } - public Hyperlink getLnkNr() { - return lnkNr; - } + public void setStaticText5( StaticText st ) + { + this.staticText5 = st; + } + private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); - public void setLnkNr(Hyperlink h) { - this.lnkNr = h; - } + public HtmlPanelGrid getGridPanel3() + { + return gridPanel3; + } - private TableColumn tableColumn3 = new TableColumn(); + public void setGridPanel3( HtmlPanelGrid hpg ) + { + this.gridPanel3 = hpg; + } + private Table table1 = new Table(); - public TableColumn getTableColumn3() { - return tableColumn3; - } + public Table getTable1() + { + return table1; + } - public void setTableColumn3(TableColumn tc) { - this.tableColumn3 = tc; - } + public void setTable1( Table t ) + { + this.table1 = t; + } + private TableRowGroup tableRowGroup1 = new TableRowGroup(); - private Hyperlink lnkNomeAcidentado = new Hyperlink(); + public TableRowGroup getTableRowGroup1() + { + return tableRowGroup1; + } - public Hyperlink getLnkNomeAcidentado() { - return lnkNomeAcidentado; - } + public void setTableRowGroup1( TableRowGroup trg ) + { + this.tableRowGroup1 = trg; + } + private TableColumn tableColumn1 = new TableColumn(); - public void setLnkNomeAcidentado(Hyperlink h) { - this.lnkNomeAcidentado = h; - } + public TableColumn getTableColumn1() + { + return tableColumn1; + } - private HtmlPanelGrid gridSeguimento1 = new HtmlPanelGrid(); + public void setTableColumn1( TableColumn tc ) + { + this.tableColumn1 = tc; + } + private Hyperlink lnkDataAcidente = new Hyperlink(); - public HtmlPanelGrid getGridSeguimento1() { - return gridSeguimento1; - } + public Hyperlink getLnkDataAcidente() + { + return lnkDataAcidente; + } - public void setGridSeguimento1(HtmlPanelGrid hpg) { - this.gridSeguimento1 = hpg; - } + public void setLnkDataAcidente( Hyperlink h ) + { + this.lnkDataAcidente = h; + } + private TableColumn tableColumn2 = new TableColumn(); - private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); + public TableColumn getTableColumn2() + { + return tableColumn2; + } - public HtmlPanelGrid getGridPanel4() { - return gridPanel4; - } + public void setTableColumn2( TableColumn tc ) + { + this.tableColumn2 = tc; + } + private Hyperlink lnkNr = new Hyperlink(); - public void setGridPanel4(HtmlPanelGrid hpg) { - this.gridPanel4 = hpg; - } + public Hyperlink getLnkNr() + { + return lnkNr; + } - private StaticText staticText6 = new StaticText(); + public void setLnkNr( Hyperlink h ) + { + this.lnkNr = h; + } + private TableColumn tableColumn3 = new TableColumn(); - public StaticText getStaticText6() { - return staticText6; - } + public TableColumn getTableColumn3() + { + return tableColumn3; + } - public void setStaticText6(StaticText st) { - this.staticText6 = st; - } + public void setTableColumn3( TableColumn tc ) + { + this.tableColumn3 = tc; + } + private Hyperlink lnkNomeAcidentado = new Hyperlink(); - private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); + public Hyperlink getLnkNomeAcidentado() + { + return lnkNomeAcidentado; + } - public HtmlPanelGrid getGridPanel5() { - return gridPanel5; - } + public void setLnkNomeAcidentado( Hyperlink h ) + { + this.lnkNomeAcidentado = h; + } + private HtmlPanelGrid gridSeguimento1 = new HtmlPanelGrid(); - public void setGridPanel5(HtmlPanelGrid hpg) { - this.gridPanel5 = hpg; - } + public HtmlPanelGrid getGridSeguimento1() + { + return gridSeguimento1; + } - private Table table2 = new Table(); + public void setGridSeguimento1( HtmlPanelGrid hpg ) + { + this.gridSeguimento1 = hpg; + } + private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); - public Table getTable2() { - return table2; - } + public HtmlPanelGrid getGridPanel4() + { + return gridPanel4; + } - public void setTable2(Table t) { - this.table2 = t; - } + public void setGridPanel4( HtmlPanelGrid hpg ) + { + this.gridPanel4 = hpg; + } + private StaticText staticText6 = new StaticText(); - private TableRowGroup tableRowGroup2 = new TableRowGroup(); + public StaticText getStaticText6() + { + return staticText6; + } - public TableRowGroup getTableRowGroup2() { - return tableRowGroup2; - } + public void setStaticText6( StaticText st ) + { + this.staticText6 = st; + } + private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); - public void setTableRowGroup2(TableRowGroup trg) { - this.tableRowGroup2 = trg; - } + public HtmlPanelGrid getGridPanel5() + { + return gridPanel5; + } - private TableColumn tableColumn4 = new TableColumn(); + public void setGridPanel5( HtmlPanelGrid hpg ) + { + this.gridPanel5 = hpg; + } + private Table table2 = new Table(); - public TableColumn getTableColumn4() { - return tableColumn4; - } + public Table getTable2() + { + return table2; + } - public void setTableColumn4(TableColumn tc) { - this.tableColumn4 = tc; - } + public void setTable2( Table t ) + { + this.table2 = t; + } + private TableRowGroup tableRowGroup2 = new TableRowGroup(); - private Hyperlink lnkDataAcidenteSeg = new Hyperlink(); + public TableRowGroup getTableRowGroup2() + { + return tableRowGroup2; + } - public Hyperlink getLnkDataAcidenteSeg() { - return lnkDataAcidenteSeg; - } + public void setTableRowGroup2( TableRowGroup trg ) + { + this.tableRowGroup2 = trg; + } + private TableColumn tableColumn4 = new TableColumn(); - public void setLnkDataAcidenteSeg(Hyperlink h) { - this.lnkDataAcidenteSeg = h; - } + public TableColumn getTableColumn4() + { + return tableColumn4; + } - private TableColumn tableColumn5 = new TableColumn(); + public void setTableColumn4( TableColumn tc ) + { + this.tableColumn4 = tc; + } + private Hyperlink lnkDataAcidenteSeg = new Hyperlink(); - public TableColumn getTableColumn5() { - return tableColumn5; - } + public Hyperlink getLnkDataAcidenteSeg() + { + return lnkDataAcidenteSeg; + } - public void setTableColumn5(TableColumn tc) { - this.tableColumn5 = tc; - } + public void setLnkDataAcidenteSeg( Hyperlink h ) + { + this.lnkDataAcidenteSeg = h; + } + private TableColumn tableColumn5 = new TableColumn(); - private Hyperlink lnkNrSeg = new Hyperlink(); + public TableColumn getTableColumn5() + { + return tableColumn5; + } - public Hyperlink getLnkNrSeg() { - return lnkNrSeg; - } + public void setTableColumn5( TableColumn tc ) + { + this.tableColumn5 = tc; + } + private Hyperlink lnkNrSeg = new Hyperlink(); - public void setLnkNrSeg(Hyperlink h) { - this.lnkNrSeg = h; - } + public Hyperlink getLnkNrSeg() + { + return lnkNrSeg; + } - private TableColumn tableColumn6 = new TableColumn(); + public void setLnkNrSeg( Hyperlink h ) + { + this.lnkNrSeg = h; + } + private TableColumn tableColumn6 = new TableColumn(); - public TableColumn getTableColumn6() { - return tableColumn6; - } + public TableColumn getTableColumn6() + { + return tableColumn6; + } - public void setTableColumn6(TableColumn tc) { - this.tableColumn6 = tc; - } + public void setTableColumn6( TableColumn tc ) + { + this.tableColumn6 = tc; + } + private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink(); - private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink(); + public Hyperlink getLnkNomeAcidentadoSeg() + { + return lnkNomeAcidentadoSeg; + } - public Hyperlink getLnkNomeAcidentadoSeg() { - return lnkNomeAcidentadoSeg; - } + public void setLnkNomeAcidentadoSeg( Hyperlink h ) + { + this.lnkNomeAcidentadoSeg = h; + } + private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid(); - public void setLnkNomeAcidentadoSeg(Hyperlink h) { - this.lnkNomeAcidentadoSeg = h; - } + public HtmlPanelGrid getGridConcluidos1() + { + return gridConcluidos1; + } - private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid(); + public void setGridConcluidos1( HtmlPanelGrid hpg ) + { + this.gridConcluidos1 = hpg; + } + private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); - public HtmlPanelGrid getGridConcluidos1() { - return gridConcluidos1; - } + public HtmlPanelGrid getGridPanel6() + { + return gridPanel6; + } - public void setGridConcluidos1(HtmlPanelGrid hpg) { - this.gridConcluidos1 = hpg; - } + public void setGridPanel6( HtmlPanelGrid hpg ) + { + this.gridPanel6 = hpg; + } + private StaticText staticText7 = new StaticText(); - private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); + public StaticText getStaticText7() + { + return staticText7; + } - public HtmlPanelGrid getGridPanel6() { - return gridPanel6; - } + public void setStaticText7( StaticText st ) + { + this.staticText7 = st; + } + private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); - public void setGridPanel6(HtmlPanelGrid hpg) { - this.gridPanel6 = hpg; - } + public HtmlPanelGrid getGridPanel7() + { + return gridPanel7; + } - private StaticText staticText7 = new StaticText(); + public void setGridPanel7( HtmlPanelGrid hpg ) + { + this.gridPanel7 = hpg; + } + private PanelGroup groupPanel3 = new PanelGroup(); - public StaticText getStaticText7() { - return staticText7; - } + public PanelGroup getGroupPanel3() + { + return groupPanel3; + } - public void setStaticText7(StaticText st) { - this.staticText7 = st; - } + public void setGroupPanel3( PanelGroup pg ) + { + this.groupPanel3 = pg; + } + private StaticText staticText8 = new StaticText(); - private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); + public StaticText getStaticText8() + { + return staticText8; + } - public HtmlPanelGrid getGridPanel7() { - return gridPanel7; - } + public void setStaticText8( StaticText st ) + { + this.staticText8 = st; + } + private DropDown dropCurrentYear = new DropDown(); - public void setGridPanel7(HtmlPanelGrid hpg) { - this.gridPanel7 = hpg; - } + public DropDown getDropCurrentYear() + { + return dropCurrentYear; + } - private PanelGroup groupPanel3 = new PanelGroup(); + public void setDropCurrentYear( DropDown dropCurrentYear ) + { + this.dropCurrentYear = dropCurrentYear; + } + private DropDown drpAno = new DropDown(); - public PanelGroup getGroupPanel3() { - return groupPanel3; - } + public DropDown getDrpAno() + { + return drpAno; + } - public void setGroupPanel3(PanelGroup pg) { - this.groupPanel3 = pg; - } + public void setDrpAno( DropDown dd ) + { + this.drpAno = dd; + } + private PanelGroup groupPanel4 = new PanelGroup(); - private StaticText staticText8 = new StaticText(); + public PanelGroup getGroupPanel4() + { + return groupPanel4; + } - public StaticText getStaticText8() { - return staticText8; - } + public void setGroupPanel4( PanelGroup pg ) + { + this.groupPanel4 = pg; + } + private StaticText lblMes = new StaticText(); - public void setStaticText8(StaticText st) { - this.staticText8 = st; - } + public StaticText getLblMes() + { + return lblMes; + } - private DropDown drpAno = new DropDown(); + public void setLblMes( StaticText st ) + { + this.lblMes = st; + } + private DropDown drpMes = new DropDown(); - public DropDown getDrpAno() { - return drpAno; - } + public DropDown getDrpMes() + { + return drpMes; + } - public void setDrpAno(DropDown dd) { - this.drpAno = dd; - } + public void setDrpMes( DropDown dd ) + { + this.drpMes = dd; + } + private PanelGroup groupPanel5 = new PanelGroup(); - private PanelGroup groupPanel4 = new PanelGroup(); + public PanelGroup getGroupPanel5() + { + return groupPanel5; + } - public PanelGroup getGroupPanel4() { - return groupPanel4; - } + public void setGroupPanel5( PanelGroup pg ) + { + this.groupPanel5 = pg; + } + private StaticText lblDia = new StaticText(); - public void setGroupPanel4(PanelGroup pg) { - this.groupPanel4 = pg; - } + public StaticText getLblDia() + { + return lblDia; + } - private StaticText lblMes = new StaticText(); + public void setLblDia( StaticText st ) + { + this.lblDia = st; + } + private DropDown drpDia = new DropDown(); - public StaticText getLblMes() { - return lblMes; - } + public DropDown getDrpDia() + { + return drpDia; + } - public void setLblMes(StaticText st) { - this.lblMes = st; - } + public void setDrpDia( DropDown dd ) + { + this.drpDia = dd; + } + private PanelGroup groupPanel6 = new PanelGroup(); - private DropDown drpMes = new DropDown(); + public PanelGroup getGroupPanel6() + { + return groupPanel6; + } - public DropDown getDrpMes() { - return drpMes; - } + public void setGroupPanel6( PanelGroup pg ) + { + this.groupPanel6 = pg; + } + private StaticText staticText9 = new StaticText(); - public void setDrpMes(DropDown dd) { - this.drpMes = dd; - } + public StaticText getStaticText9() + { + return staticText9; + } - private PanelGroup groupPanel5 = new PanelGroup(); + public void setStaticText9( StaticText st ) + { + this.staticText9 = st; + } + private TextField txtNome = new TextField(); - public PanelGroup getGroupPanel5() { - return groupPanel5; - } + public TextField getTxtNome() + { + return txtNome; + } - public void setGroupPanel5(PanelGroup pg) { - this.groupPanel5 = pg; - } + public void setTxtNome( TextField tf ) + { + this.txtNome = tf; + } + private Button butPesquisar = new Button(); - private StaticText lblDia = new StaticText(); + public Button getButPesquisar() + { + return butPesquisar; + } - public StaticText getLblDia() { - return lblDia; - } + public void setButPesquisar( Button b ) + { + this.butPesquisar = b; + } + private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); - public void setLblDia(StaticText st) { - this.lblDia = st; - } + public HtmlPanelGrid getGridPanel8() + { + return gridPanel8; + } - private DropDown drpDia = new DropDown(); + public void setGridPanel8( HtmlPanelGrid hpg ) + { + this.gridPanel8 = hpg; + } + private Table table3 = new Table(); - public DropDown getDrpDia() { - return drpDia; - } + public Table getTable3() + { + return table3; + } - public void setDrpDia(DropDown dd) { - this.drpDia = dd; - } + public void setTable3( Table t ) + { + this.table3 = t; + } + private TableRowGroup tableRowGroup3 = new TableRowGroup(); - private PanelGroup groupPanel6 = new PanelGroup(); + public TableRowGroup getTableRowGroup3() + { + return tableRowGroup3; + } - public PanelGroup getGroupPanel6() { - return groupPanel6; - } + public void setTableRowGroup3( TableRowGroup trg ) + { + this.tableRowGroup3 = trg; + } + private TableColumn tableColumn7 = new TableColumn(); - public void setGroupPanel6(PanelGroup pg) { - this.groupPanel6 = pg; - } + public TableColumn getTableColumn7() + { + return tableColumn7; + } - private StaticText staticText9 = new StaticText(); + public void setTableColumn7( TableColumn tc ) + { + this.tableColumn7 = tc; + } + private Hyperlink lnkDataConcluida = new Hyperlink(); - public StaticText getStaticText9() { - return staticText9; - } + public Hyperlink getLnkDataConcluida() + { + return lnkDataConcluida; + } - public void setStaticText9(StaticText st) { - this.staticText9 = st; - } + public void setLnkDataConcluida( Hyperlink h ) + { + this.lnkDataConcluida = h; + } + private TableColumn tableColumn8 = new TableColumn(); - private TextField txtNome = new TextField(); + public TableColumn getTableColumn8() + { + return tableColumn8; + } - public TextField getTxtNome() { - return txtNome; - } + public void setTableColumn8( TableColumn tc ) + { + this.tableColumn8 = tc; + } + private Hyperlink lnkNrConcluida = new Hyperlink(); - public void setTxtNome(TextField tf) { - this.txtNome = tf; - } + public Hyperlink getLnkNrConcluida() + { + return lnkNrConcluida; + } - private Button butPesquisar = new Button(); + public void setLnkNrConcluida( Hyperlink h ) + { + this.lnkNrConcluida = h; + } + private TableColumn tableColumn9 = new TableColumn(); - public Button getButPesquisar() { - return butPesquisar; - } + public TableColumn getTableColumn9() + { + return tableColumn9; + } - 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 void setTableColumn9( TableColumn tc ) + { + this.tableColumn9 = tc; + } + private Hyperlink lnkNomeConcluida = new Hyperlink(); - public TableColumn getTableColumn7() { - return tableColumn7; - } + public Hyperlink getLnkNomeConcluida() + { + return lnkNomeConcluida; + } - public void setTableColumn7(TableColumn tc) { - this.tableColumn7 = tc; - } + public void setLnkNomeConcluida( Hyperlink h ) + { + this.lnkNomeConcluida = h; + } + private StaticText txtSearchMsg = new StaticText(); - private Hyperlink lnkDataConcluida = new Hyperlink(); + public StaticText getTxtSearchMsg() + { + return txtSearchMsg; + } - public Hyperlink getLnkDataConcluida() { - return lnkDataConcluida; - } + public void setTxtSearchMsg( StaticText st ) + { + this.txtSearchMsg = st; + } + private TableColumn tableColumn10 = new TableColumn(); - public void setLnkDataConcluida(Hyperlink h) { - this.lnkDataConcluida = h; - } + public TableColumn getTableColumn10() + { + return tableColumn10; + } - private TableColumn tableColumn8 = new TableColumn(); + public void setTableColumn10( TableColumn tc ) + { + this.tableColumn10 = tc; + } + private Hyperlink lnkFase = new Hyperlink(); - public TableColumn getTableColumn8() { - return tableColumn8; - } + public Hyperlink getLnkFase() + { + return lnkFase; + } - public void setTableColumn8(TableColumn tc) { - this.tableColumn8 = tc; - } + public void setLnkFase( Hyperlink h ) + { + this.lnkFase = h; + } + private TableColumn tableColumn11 = new TableColumn(); - private Hyperlink lnkNrConcluida = new Hyperlink(); + public TableColumn getTableColumn11() + { + return tableColumn11; + } - public Hyperlink getLnkNrConcluida() { - return lnkNrConcluida; - } + public void setTableColumn11( TableColumn tc ) + { + this.tableColumn11 = tc; + } + private Hyperlink lnkFaseSeg = new Hyperlink(); - public void setLnkNrConcluida(Hyperlink h) { - this.lnkNrConcluida = h; - } + public Hyperlink getLnkFaseSeg() + { + return lnkFaseSeg; + } - private TableColumn tableColumn9 = new TableColumn(); + public void setLnkFaseSeg( Hyperlink h ) + { + this.lnkFaseSeg = h; + } + private TableColumn tableColumn12 = new TableColumn(); - public TableColumn getTableColumn9() { - return tableColumn9; - } + public TableColumn getTableColumn12() + { + return tableColumn12; + } - public void setTableColumn9(TableColumn tc) { - this.tableColumn9 = tc; - } + public void setTableColumn12( TableColumn tc ) + { + this.tableColumn12 = tc; + } + private TableColumn tableColumn13 = new TableColumn(); - private Hyperlink lnkNomeConcluida = new Hyperlink(); + public TableColumn getTableColumn13() + { + return tableColumn13; + } - public Hyperlink getLnkNomeConcluida() { - return lnkNomeConcluida; - } + public void setTableColumn13( TableColumn tc ) + { + this.tableColumn13 = tc; + } + private TableColumn tableColumn14 = new TableColumn(); - public void setLnkNomeConcluida(Hyperlink h) { - this.lnkNomeConcluida = h; - } + public TableColumn getTableColumn14() + { + return tableColumn14; + } - private StaticText txtSearchMsg = new StaticText(); + public void setTableColumn14( TableColumn tc ) + { + this.tableColumn14 = tc; + } + private TableColumn tableColumn15 = new TableColumn(); - public StaticText getTxtSearchMsg() { - return txtSearchMsg; - } + public TableColumn getTableColumn15() + { + return tableColumn15; + } - public void setTxtSearchMsg(StaticText st) { - this.txtSearchMsg = st; - } + public void setTableColumn15( TableColumn tc ) + { + this.tableColumn15 = tc; + } + private Hyperlink lnkPor = new Hyperlink(); - private TableColumn tableColumn10 = new TableColumn(); + public Hyperlink getLnkPor() + { + return lnkPor; + } - public TableColumn getTableColumn10() { - return tableColumn10; - } + public void setLnkPor( Hyperlink h ) + { + this.lnkPor = h; + } + private Hyperlink lnkPorSeg = new Hyperlink(); - public void setTableColumn10(TableColumn tc) { - this.tableColumn10 = tc; - } + public Hyperlink getLnkPorSeg() + { + return lnkPorSeg; + } - private Hyperlink lnkFase = new Hyperlink(); + public void setLnkPorSeg( Hyperlink h ) + { + this.lnkPorSeg = h; + } + private Hyperlink lnkPorConcluida = new Hyperlink(); - public Hyperlink getLnkFase() { - return lnkFase; - } + public Hyperlink getLnkPorConcluida() + { + return lnkPorConcluida; + } - public void setLnkFase(Hyperlink h) { - this.lnkFase = h; - } + public void setLnkPorConcluida( Hyperlink h ) + { + this.lnkPorConcluida = h; + } + private Hyperlink lnkEstabConcluida = new Hyperlink(); - private TableColumn tableColumn11 = new TableColumn(); + public Hyperlink getLnkEstabConcluida() + { + return lnkEstabConcluida; + } - public TableColumn getTableColumn11() { - return tableColumn11; - } + public void setLnkEstabConcluida( Hyperlink h ) + { + this.lnkEstabConcluida = h; + } + private PanelGroup groupPanel7 = new PanelGroup(); - public void setTableColumn11(TableColumn tc) { - this.tableColumn11 = tc; - } + public PanelGroup getGroupPanel7() + { + return groupPanel7; + } - private Hyperlink lnkFaseSeg = new Hyperlink(); + public void setGroupPanel7( PanelGroup pg ) + { + this.groupPanel7 = pg; + } + private StaticText staticText3 = new StaticText(); - public Hyperlink getLnkFaseSeg() { - return lnkFaseSeg; - } + public StaticText getStaticText3() + { + return staticText3; + } - public void setLnkFaseSeg(Hyperlink h) { - this.lnkFaseSeg = h; - } + public void setStaticText3( StaticText st ) + { + this.staticText3 = st; + } + private TextField txtPor = new TextField(); - private TableColumn tableColumn12 = new TableColumn(); + public TextField getTxtPor() + { + return txtPor; + } - public TableColumn getTableColumn12() { - return tableColumn12; - } + public void setTxtPor( TextField tf ) + { + this.txtPor = tf; + } + private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid(); - public void setTableColumn12(TableColumn tc) { - this.tableColumn12 = tc; - } + public HtmlPanelGrid getGridPanel9() + { + return gridPanel9; + } - private TableColumn tableColumn13 = new TableColumn(); + public void setGridPanel9( HtmlPanelGrid hpg ) + { + this.gridPanel9 = hpg; + } + private PanelGroup groupPanel8 = new PanelGroup(); - public TableColumn getTableColumn13() { - return tableColumn13; - } + public PanelGroup getGroupPanel8() + { + return groupPanel8; + } - public void setTableColumn13(TableColumn tc) { - this.tableColumn13 = tc; - } + public void setGroupPanel8( PanelGroup pg ) + { + this.groupPanel8 = pg; + } + private StaticText staticText10 = new StaticText(); - private TableColumn tableColumn14 = new TableColumn(); + public StaticText getStaticText10() + { + return staticText10; + } - public TableColumn getTableColumn14() { - return tableColumn14; - } + public void setStaticText10( StaticText st ) + { + this.staticText10 = st; + } + private ImageComponent image3 = new ImageComponent(); - public void setTableColumn14(TableColumn tc) { - this.tableColumn14 = tc; - } + public ImageComponent getImage3() + { + return image3; + } - private TableColumn tableColumn15 = new TableColumn(); + public void setImage3( ImageComponent ic ) + { + this.image3 = ic; + } + private StaticText staticText11 = new StaticText(); - public TableColumn getTableColumn15() { - return tableColumn15; - } + public StaticText getStaticText11() + { + return staticText11; + } - public void setTableColumn15(TableColumn tc) { - this.tableColumn15 = tc; - } + public void setStaticText11( StaticText st ) + { + this.staticText11 = st; + } + private StaticText txtMsg = new StaticText(); - private Hyperlink lnkPor = new Hyperlink(); + public StaticText getTxtMsg() + { + return txtMsg; + } - public Hyperlink getLnkPor() { - return lnkPor; - } + public void setTxtMsg( StaticText st ) + { + this.txtMsg = st; + } + private TableColumn tableColumn16 = new TableColumn(); - public void setLnkPor(Hyperlink h) { - this.lnkPor = h; - } + public TableColumn getTableColumn16() + { + return tableColumn16; + } - private Hyperlink lnkPorSeg = new Hyperlink(); + public void setTableColumn16( TableColumn tc ) + { + this.tableColumn16 = tc; + } + private Hyperlink lnkDataAbertura = new Hyperlink(); - public Hyperlink getLnkPorSeg() { - return lnkPorSeg; - } + public Hyperlink getLnkDataAbertura() + { + return lnkDataAbertura; + } - public void setLnkPorSeg(Hyperlink h) { - this.lnkPorSeg = h; - } + public void setLnkDataAbertura( Hyperlink h ) + { + this.lnkDataAbertura = h; + } + private TableColumn tableColumn17 = new TableColumn(); - private Hyperlink lnkPorConcluida = new Hyperlink(); + public TableColumn getTableColumn17() + { + return tableColumn17; + } - public Hyperlink getLnkPorConcluida() { - return lnkPorConcluida; - } + public void setTableColumn17( TableColumn tc ) + { + this.tableColumn17 = tc; + } + private Hyperlink lnkDataAberturaSeg = new Hyperlink(); - public void setLnkPorConcluida(Hyperlink h) { - this.lnkPorConcluida = h; - } + public Hyperlink getLnkDataAberturaSeg() + { + return lnkDataAberturaSeg; + } - private Hyperlink lnkEstabConcluida = new Hyperlink(); + public void setLnkDataAberturaSeg( Hyperlink h ) + { + this.lnkDataAberturaSeg = h; + } + private TableColumn tableColumn18 = new TableColumn(); - public Hyperlink getLnkEstabConcluida() { - return lnkEstabConcluida; - } + public TableColumn getTableColumn18() + { + return tableColumn18; + } - public void setLnkEstabConcluida(Hyperlink h) { - this.lnkEstabConcluida = h; - } + public void setTableColumn18( TableColumn tc ) + { + this.tableColumn18 = tc; + } + private Hyperlink lnkDataAberturaConcluida = new Hyperlink(); - private PanelGroup groupPanel7 = new PanelGroup(); + public Hyperlink getLnkDataAberturaConcluida() + { + return lnkDataAberturaConcluida; + } - public PanelGroup getGroupPanel7() { - return groupPanel7; - } + public void setLnkDataAberturaConcluida( Hyperlink h ) + { + this.lnkDataAberturaConcluida = h; + } + private TableColumn tableColumn19 = new TableColumn(); - public void setGroupPanel7(PanelGroup pg) { - this.groupPanel7 = pg; - } + public TableColumn getTableColumn19() + { + return tableColumn19; + } - private StaticText staticText3 = new StaticText(); + public void setTableColumn19( TableColumn tc ) + { + this.tableColumn19 = tc; + } + private Hyperlink lnkEstabelecimento = new Hyperlink(); - public StaticText getStaticText3() { - return staticText3; - } + public Hyperlink getLnkEstabelecimento() + { + return lnkEstabelecimento; + } - public void setStaticText3(StaticText st) { - this.staticText3 = st; - } + public void setLnkEstabelecimento( Hyperlink h ) + { + this.lnkEstabelecimento = h; + } + private TableColumn tableColumn20 = new TableColumn(); - private TextField txtPor = new TextField(); + public TableColumn getTableColumn20() + { + return tableColumn20; + } - public TextField getTxtPor() { - return txtPor; - } + public void setTableColumn20( TableColumn tc ) + { + this.tableColumn20 = tc; + } + private Hyperlink lnkEstabelecimentoSeg = new Hyperlink(); - public void setTxtPor(TextField tf) { - this.txtPor = tf; - } + public Hyperlink getLnkEstabelecimentoSeg() + { + return lnkEstabelecimentoSeg; + } - private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid(); + public void setLnkEstabelecimentoSeg( Hyperlink h ) + { + this.lnkEstabelecimentoSeg = h; + } + private StaticText lblUser = new StaticText(); - public HtmlPanelGrid getGridPanel9() { - return gridPanel9; - } + public StaticText getLblUser() + { + return lblUser; + } - public void setGridPanel9(HtmlPanelGrid hpg) { - this.gridPanel9 = hpg; - } + public void setLblUser( StaticText st ) + { + this.lblUser = st; + } + private Hyperlink lnkPlanosActuacao = new Hyperlink(); - private PanelGroup groupPanel8 = new PanelGroup(); + public Hyperlink getLnkPlanosActuacao() + { + return lnkPlanosActuacao; + } - public PanelGroup getGroupPanel8() { - return groupPanel8; - } + public void setLnkPlanosActuacao( Hyperlink h ) + { + this.lnkPlanosActuacao = h; + } + private HtmlPanelGrid gridPanelFilterActual = new HtmlPanelGrid(); - public void setGroupPanel8(PanelGroup pg) { - this.groupPanel8 = pg; - } + public HtmlPanelGrid getGridPanelFilterActual() + { + return this.gridPanelFilterActual; + } - private StaticText staticText10 = new StaticText(); + public void setGridPanelFilterActual( HtmlPanelGrid pg ) + { + this.gridPanelFilterActual = pg; + } + private PanelGroup groupPanelFilterActual = new PanelGroup(); - public StaticText getStaticText10() { - return staticText10; - } + public PanelGroup getGroupPanelFilterActual() + { + return this.groupPanelFilterActual; + } - public void setStaticText10(StaticText st) { - this.staticText10 = st; - } + public void setGroupPanelFilterActual( PanelGroup pg ) + { + this.groupPanelFilterActual = pg; + } + private StaticText labelFilterNameActual = new StaticText(); - private ImageComponent image3 = new ImageComponent(); + public StaticText getLabelFilterNameActual() + { + return this.labelFilterNameActual; + } - public ImageComponent getImage3() { - return image3; - } + public void setLabelFilterNameActual( StaticText st ) + { + this.labelFilterNameActual = st; + } + private TextField textFilterNameActual = new TextField(); - public void setImage3(ImageComponent ic) { - this.image3 = ic; - } + public TextField getTextFilterNameActual() + { + return this.textFilterNameActual; + } - private StaticText staticText11 = new StaticText(); + public void setTextFilterNameActual( TextField tf ) + { + this.textFilterNameActual = tf; + } + private StaticText labelFilterEstabelecimentoActual = new StaticText(); - public StaticText getStaticText11() { - return staticText11; - } + public StaticText getLabelFilterEstabelecimentoActual() + { + return labelFilterEstabelecimentoActual; + } - public void setStaticText11(StaticText st) { - this.staticText11 = st; - } + public void setLabelFilterEstabelecimentoActual( StaticText labelFilterEstabelecimentoActual ) + { + this.labelFilterEstabelecimentoActual = labelFilterEstabelecimentoActual; + } + private TextField textFilterEstabelecimentoActual = new TextField(); - private HtmlPanelGrid gridPanel10 = new HtmlPanelGrid(); + public TextField getTextFilterEstabelecimentoActual() + { + return textFilterEstabelecimentoActual; + } - public HtmlPanelGrid getGridPanel10() { - return gridPanel10; - } + public void setTextFilterEstabelecimentoActual( TextField textFilterEstabelecimentoActual ) + { + this.textFilterEstabelecimentoActual = textFilterEstabelecimentoActual; + } + private com.sun.rave.web.ui.component.Calendar calFilterDateActual = new com.sun.rave.web.ui.component.Calendar(); - public void setGridPanel10(HtmlPanelGrid hpg) { - this.gridPanel10 = hpg; - } + public com.sun.rave.web.ui.component.Calendar getCalFilterDateActual() + { + return this.calFilterDateActual; + } - private StaticText txtMsg = new StaticText(); + public void setCalFilterDateActual( com.sun.rave.web.ui.component.Calendar c ) + { + this.calFilterDateActual = c; + } + private TextField textFilterPORActual = new TextField(); - public StaticText getTxtMsg() { - return txtMsg; - } + public TextField getTextFilterPORActual() + { + return textFilterPORActual; + } - public void setTxtMsg(StaticText st) { - this.txtMsg = st; - } + public void setTextFilterPORActual( TextField textFilterPORActual ) + { + this.textFilterPORActual = textFilterPORActual; + } + private Button buttonFilterActual = new Button(); - private TableColumn tableColumn16 = new TableColumn(); + public Button getButtonFilterActual() + { + return this.buttonFilterActual; + } - public TableColumn getTableColumn16() { - return tableColumn16; - } + public void setButtonFilterActual( Button b ) + { + this.buttonFilterActual = b; + } + private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid(); - public void setTableColumn16(TableColumn tc) { - this.tableColumn16 = tc; - } + public HtmlPanelGrid getGridPanelFilterSeg() + { + return this.gridPanelFilterSeg; + } - private Hyperlink lnkDataAbertura = new Hyperlink(); + public void setGridPanelFilterSeg( HtmlPanelGrid pg ) + { + this.gridPanelFilterSeg = pg; + } + private PanelGroup groupPanelFilterSeg = new PanelGroup(); - public Hyperlink getLnkDataAbertura() { - return lnkDataAbertura; - } + public PanelGroup getGroupPanelFilterSeg() + { + return this.groupPanelFilterSeg; + } - public void setLnkDataAbertura(Hyperlink h) { - this.lnkDataAbertura = h; - } + public void setGroupPanelFilterSeg( PanelGroup pg ) + { + this.groupPanelFilterSeg = pg; + } + private StaticText labelFilterNameSeg = new StaticText(); - private TableColumn tableColumn17 = new TableColumn(); + public StaticText getLabelFilterNameSeg() + { + return this.labelFilterNameSeg; + } - public TableColumn getTableColumn17() { - return tableColumn17; - } + public void setLabelFilterNameSeg( StaticText st ) + { + this.labelFilterNameSeg = st; + } + private TextField textFilterNameSeg = new TextField(); - public void setTableColumn17(TableColumn tc) { - this.tableColumn17 = tc; - } + public TextField getTextFilterNameSeg() + { + return this.textFilterNameSeg; + } - private Hyperlink lnkDataAberturaSeg = new Hyperlink(); + public void setTextFilterNameSeg( TextField tf ) + { + this.textFilterNameSeg = tf; + } + private StaticText labelFilterEstabelecimentoSeg = new StaticText(); - public Hyperlink getLnkDataAberturaSeg() { - return lnkDataAberturaSeg; - } + public StaticText getLabelFilterEstabelecimentoSeg() + { + return labelFilterEstabelecimentoSeg; + } - public void setLnkDataAberturaSeg(Hyperlink h) { - this.lnkDataAberturaSeg = h; - } + public void setLabelFilterEstabelecimentoSeg( StaticText labelFilterEstabelecimentoSeg ) + { + this.labelFilterEstabelecimentoSeg = labelFilterEstabelecimentoSeg; + } + private TextField textFilterEstabelecimentoSeg = new TextField(); - private TableColumn tableColumn18 = new TableColumn(); + public TextField getTextFilterEstabelecimentoSeg() + { + return textFilterEstabelecimentoSeg; + } - public TableColumn getTableColumn18() { - return tableColumn18; - } + public void setTextFilterEstabelecimentoSeg( TextField textFilterEstabelecimentoSeg ) + { + this.textFilterEstabelecimentoSeg = textFilterEstabelecimentoSeg; + } + private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar(); - public void setTableColumn18(TableColumn tc) { - this.tableColumn18 = tc; - } + public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg() + { + return this.calFilterDateSeg; + } - private Hyperlink lnkDataAberturaConcluida = new Hyperlink(); + public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c ) + { + this.calFilterDateSeg = c; + } + private TextField textFilterPORSeg = new TextField(); - public Hyperlink getLnkDataAberturaConcluida() { - return lnkDataAberturaConcluida; - } + public TextField getTextFilterPORSeg() + { + return textFilterPORSeg; + } - public void setLnkDataAberturaConcluida(Hyperlink h) { - this.lnkDataAberturaConcluida = h; - } + public void setTextFilterPORSeg( TextField textFilterPORSeg ) + { + this.textFilterPORSeg = textFilterPORSeg; + } + private Button buttonFilterSeg = new Button(); - private TableColumn tableColumn19 = new TableColumn(); + public Button getButtonFilterSeg() + { + return this.buttonFilterSeg; + } - public TableColumn getTableColumn19() { - return tableColumn19; - } + public void setButtonFilterSeg( Button b ) + { + this.buttonFilterSeg = b; + } + private TextField textFilterEstabelecimentoConc = new TextField(); - public void setTableColumn19(TableColumn tc) { - this.tableColumn19 = tc; - } + public TextField getTextFilterEstabelecimentoConc() + { + return textFilterEstabelecimentoConc; + } - private Hyperlink lnkEstabelecimento = new Hyperlink(); + public void setTextFilterEstabelecimentoConc( TextField textFilterEstabelecimentoConc ) + { + this.textFilterEstabelecimentoConc = textFilterEstabelecimentoConc; + } + private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" ); + //
- public Hyperlink getLnkEstabelecimento() { - return lnkEstabelecimento; - } + /** + *

Construct a new Page bean instance.

+ */ + public FormHS() + { + } - public void setLnkEstabelecimento(Hyperlink h) { - this.lnkEstabelecimento = h; - } + /** + *

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.

+ */ + @Override + public void init() + { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + + // + // 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 ); + } - private TableColumn tableColumn20 = new TableColumn(); + // + // Perform application initialization that must complete + // *after* managed components are initialized - public TableColumn getTableColumn20() { - return tableColumn20; - } + if ( !getSessionBean1().isLoggedIn() ) + { + try + { + getExternalContext().redirect( "Login.jsp" ); + } + catch ( Exception e ) + { + // . . . handle exception . . . + } + } + } - public void setTableColumn20(TableColumn tc) { - this.tableColumn20 = tc; - } + /** + *

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.

+ */ + @Override + public void preprocess() + { + } - private Hyperlink lnkEstabelecimentoSeg = new Hyperlink(); + private void fillInitialForm() + { + Integer fromYear = getSelectedYear(); - public Hyperlink getLnkEstabelecimentoSeg() { - return lnkEstabelecimentoSeg; - } + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + ArrayList actuaisList = adp.getAnalisesActuaisHsList( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), fromYear ); + getSessionBean1().getAnalisesActualDataProvider().setList( actuaisList ); + table1.setRendered( true ); + } + catch ( Exception ex ) + { + table1.setRendered( false ); + ErrorLogger.logException( ex ); + } - public void setLnkEstabelecimentoSeg(Hyperlink h) { - this.lnkEstabelecimentoSeg = h; - } - private StaticText lblUser = new StaticText(); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + ArrayList seguimentoList = adp.getAnalisesSeguimentoHsList( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), fromYear ); + getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); + table2.setRendered( true ); + } + catch ( Exception ex ) + { + table2.setRendered( false ); + ErrorLogger.logException( ex ); + } - public StaticText getLblUser() { - return lblUser; - } + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - public void setLblUser(StaticText st) { - this.lblUser = st; - } - private Hyperlink lnkPlanosActuacao = new Hyperlink(); + System.out.println( "CONCLUIDAS TABLE" ); + getSessionBean1().getAnalisesConcluidasDataProvider().setList( null ); + table3.setRendered( true ); + ArrayList concluidasList = adp.getAnalisesConcluidasHsList( fromYear ); + getSessionBean1().getAnalisesConcluidasDataProvider().setList( concluidasList ); + } + catch ( Exception ex ) + { + table3.setRendered( false ); + ErrorLogger.logException( ex ); + } + } - public Hyperlink getLnkPlanosActuacao() { - return lnkPlanosActuacao; - } + /** + *

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.

+ */ + @Override + public void prerender() + { + System.out.println( "=== FORM_HS ===" ); + lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); + + HttpServletRequest request = ( HttpServletRequest ) getExternalContext().getRequest(); + String referer = request.getRequestURI(); + String pageFrom = Utils.getPageFrom( referer ); + System.out.println( "PAGE FROM : " + pageFrom ); + if ( !pageFrom.matches( "FormHS.jsp" ) || getSessionBean1().isFromAnaliseDeletion() ) + { + fillCurrentYearDrop(); + fillInitialForm(); - public void setLnkPlanosActuacao(Hyperlink h) { - this.lnkPlanosActuacao = h; - } + fillAnoDropDown(); + } + txtMsg.setText( getSessionBean1().getMsg() ); + getSessionBean1().setMsg( "" ); + } - private HtmlPanelGrid gridPanelFilterActual = new HtmlPanelGrid(); - public HtmlPanelGrid getGridPanelFilterActual() + /** + *

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).

+ */ + @Override + public void destroy() { - return this.gridPanelFilterActual; } - public void setGridPanelFilterActual( HtmlPanelGrid pg ) + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { - this.gridPanelFilterActual = pg; + return ( ApplicationBean1 ) getBean( "ApplicationBean1" ); } - private PanelGroup groupPanelFilterActual = new PanelGroup(); - public PanelGroup getGroupPanelFilterActual() + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { - return this.groupPanelFilterActual; + return ( SessionBean1 ) getBean( "SessionBean1" ); } - public void setGroupPanelFilterActual( PanelGroup pg ) + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { - this.groupPanelFilterActual = pg; + return ( RequestBean1 ) getBean( "RequestBean1" ); } - private StaticText labelFilterNameActual = new StaticText(); - public StaticText getLabelFilterNameActual() + public String lnkLogout_action() { - return this.labelFilterNameActual; + Utils.doLogout( getExternalContext(), true ); + return null; } - public void setLabelFilterNameActual( StaticText st ) + + public String lnkDataAcidente_action() { - this.labelFilterNameActual = st; + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormHS" ); + return "analise_acidente"; } - private TextField textFilterNameActual = new TextField(); - public TextField getTextFilterNameActual() + public String lnkDataAbertura_action() { - return this.textFilterNameActual; + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormHS" ); + return "analise_acidente"; } - public void setTextFilterNameActual( TextField tf ) + + public String lnkNr_action() { - this.textFilterNameActual = tf; + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormHS" ); + return "analise_acidente"; } - private StaticText labelFilterEstabelecimentoActual = new StaticText(); - public StaticText getLabelFilterEstabelecimentoActual() { - return labelFilterEstabelecimentoActual; - } - public void setLabelFilterEstabelecimentoActual(StaticText labelFilterEstabelecimentoActual) { - this.labelFilterEstabelecimentoActual = labelFilterEstabelecimentoActual; + public String lnkNomeAcidentado_action() + { + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormHS" ); + return "analise_acidente"; } - private TextField textFilterEstabelecimentoActual = new TextField(); - - public TextField getTextFilterEstabelecimentoActual() { - return textFilterEstabelecimentoActual; - } - public void setTextFilterEstabelecimentoActual(TextField textFilterEstabelecimentoActual) { - this.textFilterEstabelecimentoActual = textFilterEstabelecimentoActual; + 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 com.sun.rave.web.ui.component.Calendar calFilterDateActual = new com.sun.rave.web.ui.component.Calendar(); - public com.sun.rave.web.ui.component.Calendar getCalFilterDateActual() + public String lnkDataAcidenteSeg_action() { - return this.calFilterDateActual; + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormHS" ); + return "view_analise"; } - public void setCalFilterDateActual( com.sun.rave.web.ui.component.Calendar c ) + + public String lnkDataAberturaSeg_action() { - this.calFilterDateActual = c; + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormHS" ); + return "view_analise"; } - private TextField textFilterPORActual = new TextField(); - - public TextField getTextFilterPORActual() { - return textFilterPORActual; + public String lnkNrSeg_action() + { + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormHS" ); + return "view_analise"; } - public void setTextFilterPORActual(TextField textFilterPORActual) { - this.textFilterPORActual = textFilterPORActual; + public String lnkNomeAcidentadoSeg_action() + { + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormHS" ); + return "view_analise"; } - - private Button buttonFilterActual = new Button(); - public Button getButtonFilterActual() + private AnaliseAcidente getTableSeguimentoRowData() { - return this.buttonFilterActual; + 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 setButtonFilterActual( Button b ) + + private AnaliseAcidente getTableConcluidasRowData() { - this.buttonFilterActual = b; + 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; } - private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid(); - public HtmlPanelGrid getGridPanelFilterSeg() + public void drpAno_processValueChange( ValueChangeEvent event ) { - return this.gridPanelFilterSeg; + Object ano = event.getNewValue(); + + lblMes.setVisible( ano != null ); + drpMes.setVisible( ano != null ); + + if ( ano == null ) + { + lblDia.setVisible( false ); + drpDia.setVisible( false ); + } + else + { + fillMesDropDown(); + } } - public void setGridPanelFilterSeg( HtmlPanelGrid pg ) + + public void drpMes_processValueChange( ValueChangeEvent event ) { - this.gridPanelFilterSeg = pg; + Object mes = event.getNewValue(); + lblDia.setVisible( mes != null ); + drpDia.setVisible( mes != null ); } - private PanelGroup groupPanelFilterSeg = new PanelGroup(); - public PanelGroup getGroupPanelFilterSeg() + public void drpDia_processValueChange( ValueChangeEvent event ) { - return this.groupPanelFilterSeg; } - public void setGroupPanelFilterSeg( PanelGroup pg ) + + public String butPesquisar_action() { - this.groupPanelFilterSeg = pg; + Object obAno = drpAno == null ? null : drpAno.getSelected(); + Object obMes = drpMes == null ? null : drpMes.getSelected(); + Object obDia = drpDia == null ? null : drpDia.getSelected(); + + Integer ano = obAno == null ? null : ( Integer ) obAno; + Integer mes = obMes == null ? null : ( Integer ) obMes; + Integer dia = obDia == null ? null : ( Integer ) obDia; + + String por = null; + if ( txtPor.getText() != null ) + { + por = ( String ) txtPor.getText(); + if ( por.trim().length() == 0 ) + { + por = null; + } + } + + String nome = null; + if ( txtNome.getText() != null ) + { + nome = ( String ) txtNome.getText(); + if ( nome.trim().length() == 0 ) + { + nome = null; + } + } + + String estabelecimento = null; + if ( textFilterEstabelecimentoConc.getText() != null ) + { + estabelecimento = (( String ) textFilterEstabelecimentoConc.getText()).trim(); + if ( estabelecimento.length() == 0 ) + { + estabelecimento = null; + } + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList concluidasList = adp.searchAnalisesConcluidasList( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), + ano, mes, dia, por, nome, estabelecimento, getSelectedYear() ); + + 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 !" ); + ErrorLogger.logException( ex ); + } + + return null; } - private StaticText labelFilterNameSeg = new StaticText(); - public StaticText getLabelFilterNameSeg() + private void fillAnoDropDown() { - return this.labelFilterNameSeg; + try + { + ArrayList anosList = AnalisesDataProvider.getInstance().getAnosListFromAnalises(); + 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(); + for ( int i = 1; iter.hasNext(); i++ ) + { + Integer ano = ( Integer ) iter.next(); + anoOptions[i] = new Option( ano, ano.toString() ); + } + getSessionBean1().setAnoOptions( anoOptions ); + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } } - public void setLabelFilterNameSeg( StaticText st ) + + private void fillMesDropDown() { - this.labelFilterNameSeg = st; + 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 ); } - private TextField textFilterNameSeg = new TextField(); - public TextField getTextFilterNameSeg() + public String lnkEditUser_action() { - return this.textFilterNameSeg; + getSessionBean1().setNavFrom( "FormHS" ); + getSessionBean1().setModoEdicaoUtilizador( "edit" ); + return "user"; } - public void setTextFilterNameSeg( TextField tf ) + + public String lnkDataConcluida_action() { - this.textFilterNameSeg = tf; + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormHS" ); + return "view_analise"; } - private StaticText labelFilterEstabelecimentoSeg = new StaticText(); - public StaticText getLabelFilterEstabelecimentoSeg() { - return labelFilterEstabelecimentoSeg; - } - public void setLabelFilterEstabelecimentoSeg(StaticText labelFilterEstabelecimentoSeg) { - this.labelFilterEstabelecimentoSeg = labelFilterEstabelecimentoSeg; + public String lnkDataAberturaConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormHS" ); + return "view_analise"; } - private TextField textFilterEstabelecimentoSeg = new TextField(); - - public TextField getTextFilterEstabelecimentoSeg() { - return textFilterEstabelecimentoSeg; - } - public void setTextFilterEstabelecimentoSeg(TextField textFilterEstabelecimentoSeg) { - this.textFilterEstabelecimentoSeg = textFilterEstabelecimentoSeg; + public String lnkNrConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormHS" ); + return "view_analise"; } - private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar(); - public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg() + public String lnkNomeConcluida_action() { - return this.calFilterDateSeg; + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormHS" ); + return "view_analise"; } - public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c ) + + public String lnkFase_action() { - this.calFilterDateSeg = c; + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormHS" ); + return "analise_acidente"; } - private TextField textFilterPORSeg = new TextField(); - - public TextField getTextFilterPORSeg() { - return textFilterPORSeg; + public String lnkEstabelecimento_action() + { + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormHS" ); + return "analise_acidente"; } - public void setTextFilterPORSeg(TextField textFilterPORSeg) { - this.textFilterPORSeg = textFilterPORSeg; + public String lnkFaseSeg_action() + { + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormHS" ); + return "view_analise"; } - - private Button buttonFilterSeg = new Button(); - public Button getButtonFilterSeg() + public String lnkEstabelecimentoSeg_action() { - return this.buttonFilterSeg; + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormHS" ); + return "view_analise"; } - public void setButtonFilterSeg( Button b ) + + public String lnkPor_action() { - this.buttonFilterSeg = b; + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormHS" ); + return "analise_acidente"; } + public String lnkPorSeg_action() + { + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormHs" ); + return "view_analise"; + } - private TextField textFilterEstabelecimentoConc = new TextField(); - - public TextField getTextFilterEstabelecimentoConc() { - return textFilterEstabelecimentoConc; + public String lnkPorConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormHS" ); + return "view_analise"; } - public void setTextFilterEstabelecimentoConc(TextField textFilterEstabelecimentoConc) { - this.textFilterEstabelecimentoConc = textFilterEstabelecimentoConc; + public String lnkEstabConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormHS" ); + return "view_analise"; } - - private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" ); - //
- - /** - *

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() { - System.out.println("=== FORM_HS ==="); - lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); - - HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest(); - String referer = request.getRequestURI(); - String pageFrom = Utils.getPageFrom(referer); - System.out.println("PAGE FROM : " + pageFrom); - if((!pageFrom.matches("FormHS.jsp")) || getSessionBean1().isFromAnaliseDeletion()) - { - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - //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); - ErrorLogger.logException( ex ); - } - - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - //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); - ErrorLogger.logException( ex ); - } - - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - //lblActivos.setRendered(true); - System.out.println("CONCLUIDAS TABLE"); - getSessionBean1().getAnalisesConcluidasDataProvider().setList(null); - table3.setRendered(true); - ArrayList concluidasList = adp.getAnalisesConcluidasHsList(); - getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); - } - catch(Exception ex) - { - //lblActivos.setRendered(false); - table3.setRendered(false); - ErrorLogger.logException( ex ); -// System.out.println("ERRRRRROR : " + ex.getMessage()); - } - fillAnoDropDown(); - } - - 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 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() + public String lnkNewUser_action() { - Utils.doLogout( getExternalContext(), true ); - return null; - } - - public String lnkDataAcidente_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableActivosRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormHS"); - return "analise_acidente"; - } - - public String lnkDataAbertura_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("FormHS"); - return "view_analise"; - } - - public String lnkDataAberturaSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormHS"); - return "view_analise"; - } - - public String lnkNrSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormHS"); - return "view_analise"; - } - - public String lnkNomeAcidentadoSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormHS"); - 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) - { - ErrorLogger.logException( ex ); - } - - 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 por = null; - if(txtPor.getText() != null) - { - por = (String) txtPor.getText(); - if(por.trim().length() == 0) - { - por = null; - } - } - - String nome = null; - if(txtNome.getText() != null) - { - nome = (String) txtNome.getText(); - if(nome.trim().length() == 0) - { - nome = null; - } - } + return null; + } - String estabelecimento = null; - if ( textFilterEstabelecimentoConc.getText() != null ) - { - estabelecimento = (( String ) textFilterEstabelecimentoConc.getText()).trim(); - if( estabelecimento.length() == 0 ) - { - estabelecimento = null; - } - } - - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList()); - ArrayList concluidasList = adp.searchAanalisesConcluidasList( - getSessionBean1().getCurrentUser().getEstabelecimento_id(), - ano, mes, dia, por, nome, estabelecimento ); - - 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 !"); - ErrorLogger.logException( ex ); - } - - 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)); -// } - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - ArrayList anosList = adp.getAnosListFromAnalises(); - 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) ); - - } - catch(Exception ex) - { - ErrorLogger.logException( ex ); - } - - } - - - 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; dia 0 ? opts[ 0].getValue() : null ); + } + + public void dropCurrentYear_valueChangeListener( ValueChangeEvent event ) + { + Object oldValue = event.getOldValue(); + Object newValue = event.getNewValue(); + + if ( newValue != null && newValue instanceof Integer ) + { + Integer newYear = ( Integer ) newValue; + Integer oldYear = oldValue != null && oldValue instanceof Integer ? ( Integer ) oldValue : null; + if ( oldYear == null || !newYear.equals( oldYear ) ) + { + fillInitialForm(); + } + } + } } diff --git a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormMedico.java b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormMedico.java index 5455629d..fe1e34df 100644 --- a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormMedico.java +++ b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormMedico.java @@ -51,1663 +51,1770 @@ import utils.Utils; * 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 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 void setStaticText2(StaticText st) { - this.staticText2 = st; - } + public Page getPage1() + { + return page1; + } - private Hyperlink lnkLogout = new Hyperlink(); + public void setPage1( Page p ) + { + this.page1 = p; + } + private Html html1 = new Html(); - public Hyperlink getLnkLogout() { - return lnkLogout; - } + public Html getHtml1() + { + return html1; + } - public void setLnkLogout(Hyperlink h) { - this.lnkLogout = h; - } + public void setHtml1( Html h ) + { + this.html1 = h; + } + private Head head1 = new Head(); - private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid(); + public Head getHead1() + { + return head1; + } - public HtmlPanelGrid getGridLayoutTop1() { - return gridLayoutTop1; - } + public void setHead1( Head h ) + { + this.head1 = h; + } + private Link link1 = new Link(); - public void setGridLayoutTop1(HtmlPanelGrid hpg) { - this.gridLayoutTop1 = hpg; - } + public Link getLink1() + { + return link1; + } - private HtmlPanelGrid gridActual = new HtmlPanelGrid(); + public void setLink1( Link l ) + { + this.link1 = l; + } + private Body body1 = new Body(); - public HtmlPanelGrid getGridActual() { - return gridActual; - } + public Body getBody1() + { + return body1; + } - public void setGridActual(HtmlPanelGrid hpg) { - this.gridActual = hpg; - } + public void setBody1( Body b ) + { + this.body1 = b; + } + private Form form1 = new Form(); - private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); + public Form getForm1() + { + return form1; + } - public HtmlPanelGrid getGridPanel2() { - return gridPanel2; - } + public void setForm1( Form f ) + { + this.form1 = f; + } + private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); - public void setGridPanel2(HtmlPanelGrid hpg) { - this.gridPanel2 = hpg; - } + public HtmlPanelGrid getGridBase1() + { + return gridBase1; + } - private StaticText staticText4 = new StaticText(); + public void setGridBase1( HtmlPanelGrid hpg ) + { + this.gridBase1 = hpg; + } + private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); - public StaticText getStaticText4() { - return staticText4; - } + public HtmlPanelGrid getGridLayout1() + { + return gridLayout1; + } - public void setStaticText4(StaticText st) { - this.staticText4 = st; - } + public void setGridLayout1( HtmlPanelGrid hpg ) + { + this.gridLayout1 = hpg; + } + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); - private StaticText staticText5 = new StaticText(); + public HtmlPanelGrid getGridPanel1() + { + return gridPanel1; + } - public StaticText getStaticText5() { - return staticText5; - } + public void setGridPanel1( HtmlPanelGrid hpg ) + { + this.gridPanel1 = hpg; + } + private PanelGroup groupPanel1 = new PanelGroup(); - public void setStaticText5(StaticText st) { - this.staticText5 = st; - } + public PanelGroup getGroupPanel1() + { + return groupPanel1; + } - private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); + public void setGroupPanel1( PanelGroup pg ) + { + this.groupPanel1 = pg; + } + private ImageComponent image1 = new ImageComponent(); - public HtmlPanelGrid getGridPanel3() { - return gridPanel3; - } + public ImageComponent getImage1() + { + return image1; + } - public void setGridPanel3(HtmlPanelGrid hpg) { - this.gridPanel3 = hpg; - } + public void setImage1( ImageComponent ic ) + { + this.image1 = ic; + } + private ImageComponent image2 = new ImageComponent(); - private Table table1 = new Table(); + public ImageComponent getImage2() + { + return image2; + } - public Table getTable1() { - return table1; - } + public void setImage2( ImageComponent ic ) + { + this.image2 = ic; + } + private PanelGroup groupPanel2 = new PanelGroup(); - public void setTable1(Table t) { - this.table1 = t; - } + public PanelGroup getGroupPanel2() + { + return groupPanel2; + } - private TableRowGroup tableRowGroup1 = new TableRowGroup(); + public void setGroupPanel2( PanelGroup pg ) + { + this.groupPanel2 = pg; + } + private StaticText lblUser = new StaticText(); - public TableRowGroup getTableRowGroup1() { - return tableRowGroup1; - } + public StaticText getLblUser() + { + return lblUser; + } - public void setTableRowGroup1(TableRowGroup trg) { - this.tableRowGroup1 = trg; - } + public void setLblUser( StaticText st ) + { + this.lblUser = st; + } + private StaticText staticText1 = new StaticText(); - private TableColumn tableColumn1 = new TableColumn(); + public StaticText getStaticText1() + { + return staticText1; + } - public TableColumn getTableColumn1() { - return tableColumn1; - } + public void setStaticText1( StaticText st ) + { + this.staticText1 = st; + } + private Hyperlink lnkEditUser = new Hyperlink(); - public void setTableColumn1(TableColumn tc) { - this.tableColumn1 = tc; - } + public Hyperlink getLnkEditUser() + { + return lnkEditUser; + } - private Hyperlink lnkDataAcidente = new Hyperlink(); + public void setLnkEditUser( Hyperlink h ) + { + this.lnkEditUser = h; + } + private StaticText staticText2 = new StaticText(); - public Hyperlink getLnkDataAcidente() { - return lnkDataAcidente; - } + public StaticText getStaticText2() + { + return staticText2; + } - public void setLnkDataAcidente(Hyperlink h) { - this.lnkDataAcidente = h; - } + public void setStaticText2( StaticText st ) + { + this.staticText2 = st; + } + private Hyperlink lnkLogout = new Hyperlink(); - private TableColumn tableColumn2 = new TableColumn(); + public Hyperlink getLnkLogout() + { + return lnkLogout; + } - public TableColumn getTableColumn2() { - return tableColumn2; - } + public void setLnkLogout( Hyperlink h ) + { + this.lnkLogout = h; + } + private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid(); - public void setTableColumn2(TableColumn tc) { - this.tableColumn2 = tc; - } + public HtmlPanelGrid getGridLayoutTop1() + { + return gridLayoutTop1; + } - private Hyperlink lnkNr = new Hyperlink(); + public void setGridLayoutTop1( HtmlPanelGrid hpg ) + { + this.gridLayoutTop1 = hpg; + } + private HtmlPanelGrid gridActual = new HtmlPanelGrid(); - public Hyperlink getLnkNr() { - return lnkNr; - } + public HtmlPanelGrid getGridActual() + { + return gridActual; + } - public void setLnkNr(Hyperlink h) { - this.lnkNr = h; - } + public void setGridActual( HtmlPanelGrid hpg ) + { + this.gridActual = hpg; + } + private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); - private TableColumn tableColumn3 = new TableColumn(); + public HtmlPanelGrid getGridPanel2() + { + return gridPanel2; + } - public TableColumn getTableColumn3() { - return tableColumn3; - } + public void setGridPanel2( HtmlPanelGrid hpg ) + { + this.gridPanel2 = hpg; + } + private StaticText staticText4 = new StaticText(); - public void setTableColumn3(TableColumn tc) { - this.tableColumn3 = tc; - } + public StaticText getStaticText4() + { + return staticText4; + } - private Hyperlink lnkNomeAcidentado = new Hyperlink(); + public void setStaticText4( StaticText st ) + { + this.staticText4 = st; + } + private StaticText staticText5 = new StaticText(); - public Hyperlink getLnkNomeAcidentado() { - return lnkNomeAcidentado; - } + public StaticText getStaticText5() + { + return staticText5; + } - public void setLnkNomeAcidentado(Hyperlink h) { - this.lnkNomeAcidentado = h; - } + public void setStaticText5( StaticText st ) + { + this.staticText5 = st; + } + private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); - private HtmlPanelGrid gridSeguimento = new HtmlPanelGrid(); + public HtmlPanelGrid getGridPanel3() + { + return gridPanel3; + } - public HtmlPanelGrid getGridSeguimento() { - return gridSeguimento; - } + public void setGridPanel3( HtmlPanelGrid hpg ) + { + this.gridPanel3 = hpg; + } + private Table table1 = new Table(); - public void setGridSeguimento(HtmlPanelGrid hpg) { - this.gridSeguimento = hpg; - } + public Table getTable1() + { + return table1; + } - private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); + public void setTable1( Table t ) + { + this.table1 = t; + } + private TableRowGroup tableRowGroup1 = new TableRowGroup(); - public HtmlPanelGrid getGridPanel4() { - return gridPanel4; - } + public TableRowGroup getTableRowGroup1() + { + return tableRowGroup1; + } - public void setGridPanel4(HtmlPanelGrid hpg) { - this.gridPanel4 = hpg; - } + public void setTableRowGroup1( TableRowGroup trg ) + { + this.tableRowGroup1 = trg; + } + private TableColumn tableColumn1 = new TableColumn(); - private StaticText staticText6 = new StaticText(); + public TableColumn getTableColumn1() + { + return tableColumn1; + } - public StaticText getStaticText6() { - return staticText6; - } + public void setTableColumn1( TableColumn tc ) + { + this.tableColumn1 = tc; + } + private Hyperlink lnkDataAcidente = new Hyperlink(); - public void setStaticText6(StaticText st) { - this.staticText6 = st; - } + public Hyperlink getLnkDataAcidente() + { + return lnkDataAcidente; + } - private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); + public void setLnkDataAcidente( Hyperlink h ) + { + this.lnkDataAcidente = h; + } + private TableColumn tableColumn2 = new TableColumn(); - public HtmlPanelGrid getGridPanel5() { - return gridPanel5; - } + public TableColumn getTableColumn2() + { + return tableColumn2; + } - public void setGridPanel5(HtmlPanelGrid hpg) { - this.gridPanel5 = hpg; - } + public void setTableColumn2( TableColumn tc ) + { + this.tableColumn2 = tc; + } + private Hyperlink lnkNr = new Hyperlink(); - private Table table2 = new Table(); + public Hyperlink getLnkNr() + { + return lnkNr; + } - public Table getTable2() { - return table2; - } + public void setLnkNr( Hyperlink h ) + { + this.lnkNr = h; + } + private TableColumn tableColumn3 = new TableColumn(); - public void setTable2(Table t) { - this.table2 = t; - } + public TableColumn getTableColumn3() + { + return tableColumn3; + } - private TableRowGroup tableRowGroup2 = new TableRowGroup(); + public void setTableColumn3( TableColumn tc ) + { + this.tableColumn3 = tc; + } + private Hyperlink lnkNomeAcidentado = new Hyperlink(); - public TableRowGroup getTableRowGroup2() { - return tableRowGroup2; - } + public Hyperlink getLnkNomeAcidentado() + { + return lnkNomeAcidentado; + } - public void setTableRowGroup2(TableRowGroup trg) { - this.tableRowGroup2 = trg; - } + public void setLnkNomeAcidentado( Hyperlink h ) + { + this.lnkNomeAcidentado = h; + } + private HtmlPanelGrid gridSeguimento = new HtmlPanelGrid(); - private TableColumn tableColumn4 = new TableColumn(); + public HtmlPanelGrid getGridSeguimento() + { + return gridSeguimento; + } - public TableColumn getTableColumn4() { - return tableColumn4; - } + public void setGridSeguimento( HtmlPanelGrid hpg ) + { + this.gridSeguimento = hpg; + } + private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); - public void setTableColumn4(TableColumn tc) { - this.tableColumn4 = tc; - } + public HtmlPanelGrid getGridPanel4() + { + return gridPanel4; + } - private Hyperlink lnkDataAcidenteSeg = new Hyperlink(); + public void setGridPanel4( HtmlPanelGrid hpg ) + { + this.gridPanel4 = hpg; + } + private StaticText staticText6 = new StaticText(); - public Hyperlink getLnkDataAcidenteSeg() { - return lnkDataAcidenteSeg; - } + public StaticText getStaticText6() + { + return staticText6; + } - public void setLnkDataAcidenteSeg(Hyperlink h) { - this.lnkDataAcidenteSeg = h; - } + public void setStaticText6( StaticText st ) + { + this.staticText6 = st; + } + private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); - private TableColumn tableColumn5 = new TableColumn(); + public HtmlPanelGrid getGridPanel5() + { + return gridPanel5; + } - public TableColumn getTableColumn5() { - return tableColumn5; - } + public void setGridPanel5( HtmlPanelGrid hpg ) + { + this.gridPanel5 = hpg; + } + private Table table2 = new Table(); - public void setTableColumn5(TableColumn tc) { - this.tableColumn5 = tc; - } + public Table getTable2() + { + return table2; + } - private Hyperlink lnkNrSeg = new Hyperlink(); + public void setTable2( Table t ) + { + this.table2 = t; + } + private TableRowGroup tableRowGroup2 = new TableRowGroup(); - public Hyperlink getLnkNrSeg() { - return lnkNrSeg; - } + public TableRowGroup getTableRowGroup2() + { + return tableRowGroup2; + } - public void setLnkNrSeg(Hyperlink h) { - this.lnkNrSeg = h; - } + public void setTableRowGroup2( TableRowGroup trg ) + { + this.tableRowGroup2 = trg; + } + private TableColumn tableColumn4 = new TableColumn(); - private TableColumn tableColumn6 = new TableColumn(); + public TableColumn getTableColumn4() + { + return tableColumn4; + } - public TableColumn getTableColumn6() { - return tableColumn6; - } + public void setTableColumn4( TableColumn tc ) + { + this.tableColumn4 = tc; + } + private Hyperlink lnkDataAcidenteSeg = new Hyperlink(); - public void setTableColumn6(TableColumn tc) { - this.tableColumn6 = tc; - } + public Hyperlink getLnkDataAcidenteSeg() + { + return lnkDataAcidenteSeg; + } - private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink(); + public void setLnkDataAcidenteSeg( Hyperlink h ) + { + this.lnkDataAcidenteSeg = h; + } + private TableColumn tableColumn5 = new TableColumn(); - public Hyperlink getLnkNomeAcidentadoSeg() { - return lnkNomeAcidentadoSeg; - } + public TableColumn getTableColumn5() + { + return tableColumn5; + } - public void setLnkNomeAcidentadoSeg(Hyperlink h) { - this.lnkNomeAcidentadoSeg = h; - } + public void setTableColumn5( TableColumn tc ) + { + this.tableColumn5 = tc; + } + private Hyperlink lnkNrSeg = new Hyperlink(); - private HtmlPanelGrid gridConcluidos = new HtmlPanelGrid(); + public Hyperlink getLnkNrSeg() + { + return lnkNrSeg; + } - public HtmlPanelGrid getGridConcluidos() { - return gridConcluidos; - } + public void setLnkNrSeg( Hyperlink h ) + { + this.lnkNrSeg = h; + } + private TableColumn tableColumn6 = new TableColumn(); - public void setGridConcluidos(HtmlPanelGrid hpg) { - this.gridConcluidos = hpg; - } + public TableColumn getTableColumn6() + { + return tableColumn6; + } - private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); + public void setTableColumn6( TableColumn tc ) + { + this.tableColumn6 = tc; + } + private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink(); - public HtmlPanelGrid getGridPanel6() { - return gridPanel6; - } + public Hyperlink getLnkNomeAcidentadoSeg() + { + return lnkNomeAcidentadoSeg; + } - public void setGridPanel6(HtmlPanelGrid hpg) { - this.gridPanel6 = hpg; - } + public void setLnkNomeAcidentadoSeg( Hyperlink h ) + { + this.lnkNomeAcidentadoSeg = h; + } + private HtmlPanelGrid gridConcluidos = new HtmlPanelGrid(); - private StaticText staticText7 = new StaticText(); + public HtmlPanelGrid getGridConcluidos() + { + return gridConcluidos; + } - public StaticText getStaticText7() { - return staticText7; - } + public void setGridConcluidos( HtmlPanelGrid hpg ) + { + this.gridConcluidos = hpg; + } + private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); - public void setStaticText7(StaticText st) { - this.staticText7 = st; - } + public HtmlPanelGrid getGridPanel6() + { + return gridPanel6; + } - private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); + public void setGridPanel6( HtmlPanelGrid hpg ) + { + this.gridPanel6 = hpg; + } + private StaticText staticText7 = new StaticText(); - public HtmlPanelGrid getGridPanel7() { - return gridPanel7; - } + public StaticText getStaticText7() + { + return staticText7; + } - public void setGridPanel7(HtmlPanelGrid hpg) { - this.gridPanel7 = hpg; - } + public void setStaticText7( StaticText st ) + { + this.staticText7 = st; + } + private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); - private PanelGroup groupPanel3 = new PanelGroup(); + public HtmlPanelGrid getGridPanel7() + { + return gridPanel7; + } - public PanelGroup getGroupPanel3() { - return groupPanel3; - } + public void setGridPanel7( HtmlPanelGrid hpg ) + { + this.gridPanel7 = hpg; + } + private PanelGroup groupPanel3 = new PanelGroup(); - public void setGroupPanel3(PanelGroup pg) { - this.groupPanel3 = pg; - } + public PanelGroup getGroupPanel3() + { + return groupPanel3; + } - private StaticText staticText8 = new StaticText(); + public void setGroupPanel3( PanelGroup pg ) + { + this.groupPanel3 = pg; + } + private StaticText staticText8 = new StaticText(); - public StaticText getStaticText8() { - return staticText8; - } + public StaticText getStaticText8() + { + return staticText8; + } - public void setStaticText8(StaticText st) { - this.staticText8 = st; - } + public void setStaticText8( StaticText st ) + { + this.staticText8 = st; + } + private DropDown drpAno = new DropDown(); - private DropDown drpAno = new DropDown(); + public DropDown getDrpAno() + { + return drpAno; + } - public DropDown getDrpAno() { - return drpAno; - } + public void setDrpAno( DropDown dd ) + { + this.drpAno = dd; + } + private PanelGroup groupPanel4 = new PanelGroup(); - public void setDrpAno(DropDown dd) { - this.drpAno = dd; - } + public PanelGroup getGroupPanel4() + { + return groupPanel4; + } - private PanelGroup groupPanel4 = new PanelGroup(); + public void setGroupPanel4( PanelGroup pg ) + { + this.groupPanel4 = pg; + } + private StaticText lblMes = new StaticText(); - public PanelGroup getGroupPanel4() { - return groupPanel4; - } + public StaticText getLblMes() + { + return lblMes; + } - public void setGroupPanel4(PanelGroup pg) { - this.groupPanel4 = pg; - } + public void setLblMes( StaticText st ) + { + this.lblMes = st; + } + private DropDown drpMes = new DropDown(); - private StaticText lblMes = new StaticText(); + public DropDown getDrpMes() + { + return drpMes; + } - public StaticText getLblMes() { - return lblMes; - } + public void setDrpMes( DropDown dd ) + { + this.drpMes = dd; + } + private PanelGroup groupPanel5 = new PanelGroup(); - public void setLblMes(StaticText st) { - this.lblMes = st; - } + public PanelGroup getGroupPanel5() + { + return groupPanel5; + } - private DropDown drpMes = new DropDown(); + public void setGroupPanel5( PanelGroup pg ) + { + this.groupPanel5 = pg; + } + private StaticText lblDia = new StaticText(); - public DropDown getDrpMes() { - return drpMes; - } + public StaticText getLblDia() + { + return lblDia; + } - public void setDrpMes(DropDown dd) { - this.drpMes = dd; - } + public void setLblDia( StaticText st ) + { + this.lblDia = st; + } + private DropDown drpDia = new DropDown(); - private PanelGroup groupPanel5 = new PanelGroup(); + public DropDown getDrpDia() + { + return drpDia; + } - public PanelGroup getGroupPanel5() { - return groupPanel5; - } + public void setDrpDia( DropDown dd ) + { + this.drpDia = dd; + } + private PanelGroup groupPanel6 = new PanelGroup(); - public void setGroupPanel5(PanelGroup pg) { - this.groupPanel5 = pg; - } + public PanelGroup getGroupPanel6() + { + return groupPanel6; + } - private StaticText lblDia = new StaticText(); + public void setGroupPanel6( PanelGroup pg ) + { + this.groupPanel6 = pg; + } + private StaticText staticText9 = new StaticText(); - public StaticText getLblDia() { - return lblDia; - } + public StaticText getStaticText9() + { + return staticText9; + } - public void setLblDia(StaticText st) { - this.lblDia = st; - } + public void setStaticText9( StaticText st ) + { + this.staticText9 = st; + } + private TextField txtNome = new TextField(); - private DropDown drpDia = new DropDown(); + public TextField getTxtNome() + { + return txtNome; + } - public DropDown getDrpDia() { - return drpDia; - } + public void setTxtNome( TextField tf ) + { + this.txtNome = tf; + } + private Button butPesquisar = new Button(); - public void setDrpDia(DropDown dd) { - this.drpDia = dd; - } + public Button getButPesquisar() + { + return butPesquisar; + } - private PanelGroup groupPanel6 = new PanelGroup(); + public void setButPesquisar( Button b ) + { + this.butPesquisar = b; + } + private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); - public PanelGroup getGroupPanel6() { - return groupPanel6; - } + public HtmlPanelGrid getGridPanel8() + { + return gridPanel8; + } - public void setGroupPanel6(PanelGroup pg) { - this.groupPanel6 = pg; - } + public void setGridPanel8( HtmlPanelGrid hpg ) + { + this.gridPanel8 = hpg; + } + private Table table3 = new Table(); - private StaticText staticText9 = new StaticText(); + public Table getTable3() + { + return table3; + } - public StaticText getStaticText9() { - return staticText9; - } + public void setTable3( Table t ) + { + this.table3 = t; + } + private TableRowGroup tableRowGroup3 = new TableRowGroup(); - public void setStaticText9(StaticText st) { - this.staticText9 = st; - } + public TableRowGroup getTableRowGroup3() + { + return tableRowGroup3; + } - private TextField txtNome = new TextField(); + public void setTableRowGroup3( TableRowGroup trg ) + { + this.tableRowGroup3 = trg; + } + private TableColumn tableColumn7 = new TableColumn(); - public TextField getTxtNome() { - return txtNome; - } + public TableColumn getTableColumn7() + { + return tableColumn7; + } - public void setTxtNome(TextField tf) { - this.txtNome = tf; - } + public void setTableColumn7( TableColumn tc ) + { + this.tableColumn7 = tc; + } + private Hyperlink lnkDataConcluida = new Hyperlink(); - private Button butPesquisar = new Button(); + public Hyperlink getLnkDataConcluida() + { + return lnkDataConcluida; + } - public Button getButPesquisar() { - return butPesquisar; - } + public void setLnkDataConcluida( Hyperlink h ) + { + this.lnkDataConcluida = h; + } + private TableColumn tableColumn8 = new TableColumn(); - public void setButPesquisar(Button b) { - this.butPesquisar = b; - } + public TableColumn getTableColumn8() + { + return tableColumn8; + } - private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); + public void setTableColumn8( TableColumn tc ) + { + this.tableColumn8 = tc; + } + private Hyperlink lnkNrConcluida = new Hyperlink(); - public HtmlPanelGrid getGridPanel8() { - return gridPanel8; - } + public Hyperlink getLnkNrConcluida() + { + return lnkNrConcluida; + } - public void setGridPanel8(HtmlPanelGrid hpg) { - this.gridPanel8 = hpg; - } + public void setLnkNrConcluida( Hyperlink h ) + { + this.lnkNrConcluida = h; + } + private TableColumn tableColumn9 = new TableColumn(); - private Table table3 = new Table(); + public TableColumn getTableColumn9() + { + return tableColumn9; + } - public Table getTable3() { - return table3; - } + public void setTableColumn9( TableColumn tc ) + { + this.tableColumn9 = tc; + } + private Hyperlink lnkNomeConcluida = new Hyperlink(); - public void setTable3(Table t) { - this.table3 = t; - } + public Hyperlink getLnkNomeConcluida() + { + return lnkNomeConcluida; + } - private TableRowGroup tableRowGroup3 = new TableRowGroup(); + public void setLnkNomeConcluida( Hyperlink h ) + { + this.lnkNomeConcluida = h; + } + private StaticText txtSearchMsg = new StaticText(); - public TableRowGroup getTableRowGroup3() { - return tableRowGroup3; - } + public StaticText getTxtSearchMsg() + { + return txtSearchMsg; + } - public void setTableRowGroup3(TableRowGroup trg) { - this.tableRowGroup3 = trg; - } + public void setTxtSearchMsg( StaticText st ) + { + this.txtSearchMsg = st; + } + private TableColumn tableColumn10 = new TableColumn(); - private TableColumn tableColumn7 = new TableColumn(); + public TableColumn getTableColumn10() + { + return tableColumn10; + } - public TableColumn getTableColumn7() { - return tableColumn7; - } + public void setTableColumn10( TableColumn tc ) + { + this.tableColumn10 = tc; + } + private Hyperlink lnkFase = new Hyperlink(); - public void setTableColumn7(TableColumn tc) { - this.tableColumn7 = tc; - } + public Hyperlink getLnkFase() + { + return lnkFase; + } - private Hyperlink lnkDataConcluida = new Hyperlink(); + public void setLnkFase( Hyperlink h ) + { + this.lnkFase = h; + } + private Hyperlink lnkEstabelecimento = new Hyperlink(); - public Hyperlink getLnkDataConcluida() { - return lnkDataConcluida; - } + public Hyperlink getLnkEstabelecimento() + { + return lnkEstabelecimento; + } - public void setLnkDataConcluida(Hyperlink h) { - this.lnkDataConcluida = h; - } + public void setLnkEstabelecimento( Hyperlink h ) + { + this.lnkEstabelecimento = h; + } + private TableColumn tableColumn16 = new TableColumn(); - private TableColumn tableColumn8 = new TableColumn(); + public TableColumn getTableColumn16() + { + return tableColumn16; + } - public TableColumn getTableColumn8() { - return tableColumn8; - } + public void setTableColumn16( TableColumn tc ) + { + this.tableColumn16 = tc; + } + private TableColumn tableColumn17 = new TableColumn(); - public void setTableColumn8(TableColumn tc) { - this.tableColumn8 = tc; - } + public TableColumn getTableColumn17() + { + return tableColumn17; + } - private Hyperlink lnkNrConcluida = new Hyperlink(); + public void setTableColumn17( TableColumn tc ) + { + this.tableColumn17 = tc; + } + private TableColumn tableColumn11 = new TableColumn(); - public Hyperlink getLnkNrConcluida() { - return lnkNrConcluida; - } + public TableColumn getTableColumn11() + { + return tableColumn11; + } - public void setLnkNrConcluida(Hyperlink h) { - this.lnkNrConcluida = h; - } + public void setTableColumn11( TableColumn tc ) + { + this.tableColumn11 = tc; + } + private Hyperlink lnkFaseSeg = new Hyperlink(); - private TableColumn tableColumn9 = new TableColumn(); + public Hyperlink getLnkFaseSeg() + { + return lnkFaseSeg; + } - public TableColumn getTableColumn9() { - return tableColumn9; - } + public void setLnkFaseSeg( Hyperlink h ) + { + this.lnkFaseSeg = h; + } + private Hyperlink lnkEstabelecimentoSeg = new Hyperlink(); - public void setTableColumn9(TableColumn tc) { - this.tableColumn9 = tc; - } + public Hyperlink getLnkEstabelecimentoSeg() + { + return lnkEstabelecimentoSeg; + } - private Hyperlink lnkNomeConcluida = new Hyperlink(); + public void setLnkEstabelecimentoSeg( Hyperlink h ) + { + this.lnkEstabelecimentoSeg = h; + } + private TableColumn tableColumn12 = new TableColumn(); - public Hyperlink getLnkNomeConcluida() { - return lnkNomeConcluida; - } + public TableColumn getTableColumn12() + { + return tableColumn12; + } - public void setLnkNomeConcluida(Hyperlink h) { - this.lnkNomeConcluida = h; - } + public void setTableColumn12( TableColumn tc ) + { + this.tableColumn12 = tc; + } + private TableColumn tableColumn13 = new TableColumn(); - private StaticText txtSearchMsg = new StaticText(); + public TableColumn getTableColumn13() + { + return tableColumn13; + } - public StaticText getTxtSearchMsg() { - return txtSearchMsg; - } + public void setTableColumn13( TableColumn tc ) + { + this.tableColumn13 = tc; + } + private TableColumn tableColumn14 = new TableColumn(); - public void setTxtSearchMsg(StaticText st) { - this.txtSearchMsg = st; - } + public TableColumn getTableColumn14() + { + return tableColumn14; + } - private TableColumn tableColumn10 = new TableColumn(); + public void setTableColumn14( TableColumn tc ) + { + this.tableColumn14 = tc; + } + private TableColumn tableColumn15 = new TableColumn(); - public TableColumn getTableColumn10() { - return tableColumn10; - } + public TableColumn getTableColumn15() + { + return tableColumn15; + } - public void setTableColumn10(TableColumn tc) { - this.tableColumn10 = tc; - } + public void setTableColumn15( TableColumn tc ) + { + this.tableColumn15 = tc; + } + private Hyperlink lnkPor = new Hyperlink(); - private Hyperlink lnkFase = new Hyperlink(); + public Hyperlink getLnkPor() + { + return lnkPor; + } - public Hyperlink getLnkFase() { - return lnkFase; - } + public void setLnkPor( Hyperlink h ) + { + this.lnkPor = h; + } + private Hyperlink lnkPorSeg = new Hyperlink(); - public void setLnkFase(Hyperlink h) { - this.lnkFase = h; - } + public Hyperlink getLnkPorSeg() + { + return lnkPorSeg; + } - private Hyperlink lnkEstabelecimento = new Hyperlink(); + public void setLnkPorSeg( Hyperlink h ) + { + this.lnkPorSeg = h; + } + private Hyperlink lnkPorConcluida = new Hyperlink(); - public Hyperlink getLnkEstabelecimento() { - return lnkEstabelecimento; - } + public Hyperlink getLnkPorConcluida() + { + return lnkPorConcluida; + } - public void setLnkEstabelecimento(Hyperlink h) { - this.lnkEstabelecimento = h; - } + public void setLnkPorConcluida( Hyperlink h ) + { + this.lnkPorConcluida = h; + } + private Hyperlink lnkEstabConcluida = new Hyperlink(); - private TableColumn tableColumn16 = new TableColumn(); + public Hyperlink getLnkEstabConcluida() + { + return lnkEstabConcluida; + } - public TableColumn getTableColumn16() { - return tableColumn16; - } + public void setLnkEstabConcluida( Hyperlink h ) + { + this.lnkEstabConcluida = h; + } + private PanelGroup groupPanel7 = new PanelGroup(); - public void setTableColumn16(TableColumn tc) { - this.tableColumn16 = tc; - } + public PanelGroup getGroupPanel7() + { + return groupPanel7; + } - private TableColumn tableColumn17 = new TableColumn(); + public void setGroupPanel7( PanelGroup pg ) + { + this.groupPanel7 = pg; + } + private StaticText staticText3 = new StaticText(); - public TableColumn getTableColumn17() { - return tableColumn17; - } + public StaticText getStaticText3() + { + return staticText3; + } - public void setTableColumn17(TableColumn tc) { - this.tableColumn17 = tc; - } + public void setStaticText3( StaticText st ) + { + this.staticText3 = st; + } + private TextField txtPor = new TextField(); - private TableColumn tableColumn11 = new TableColumn(); + public TextField getTxtPor() + { + return txtPor; + } - public TableColumn getTableColumn11() { - return tableColumn11; - } + public void setTxtPor( TextField tf ) + { + this.txtPor = tf; + } + private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid(); - public void setTableColumn11(TableColumn tc) { - this.tableColumn11 = tc; - } + public HtmlPanelGrid getGridPanel9() + { + return gridPanel9; + } - private Hyperlink lnkFaseSeg = new Hyperlink(); + public void setGridPanel9( HtmlPanelGrid hpg ) + { + this.gridPanel9 = hpg; + } + private PanelGroup groupPanel8 = new PanelGroup(); - public Hyperlink getLnkFaseSeg() { - return lnkFaseSeg; - } + public PanelGroup getGroupPanel8() + { + return groupPanel8; + } - public void setLnkFaseSeg(Hyperlink h) { - this.lnkFaseSeg = h; - } + public void setGroupPanel8( PanelGroup pg ) + { + this.groupPanel8 = pg; + } + private StaticText staticText10 = new StaticText(); - private Hyperlink lnkEstabelecimentoSeg = new Hyperlink(); + public StaticText getStaticText10() + { + return staticText10; + } - public Hyperlink getLnkEstabelecimentoSeg() { - return lnkEstabelecimentoSeg; - } + public void setStaticText10( StaticText st ) + { + this.staticText10 = st; + } + private ImageComponent image3 = new ImageComponent(); - public void setLnkEstabelecimentoSeg(Hyperlink h) { - this.lnkEstabelecimentoSeg = h; - } + public ImageComponent getImage3() + { + return image3; + } - private TableColumn tableColumn12 = new TableColumn(); + public void setImage3( ImageComponent ic ) + { + this.image3 = ic; + } + private StaticText staticText11 = new StaticText(); - public TableColumn getTableColumn12() { - return tableColumn12; - } + public StaticText getStaticText11() + { + return staticText11; + } - public void setTableColumn12(TableColumn tc) { - this.tableColumn12 = tc; - } + public void setStaticText11( StaticText st ) + { + this.staticText11 = st; + } + private HtmlPanelGrid gridPanelFilterActual = new HtmlPanelGrid(); - private TableColumn tableColumn13 = new TableColumn(); + public HtmlPanelGrid getGridPanelFilterActual() + { + return this.gridPanelFilterActual; + } - public TableColumn getTableColumn13() { - return tableColumn13; - } + public void setGridPanelFilterActual( HtmlPanelGrid pg ) + { + this.gridPanelFilterActual = pg; + } + private PanelGroup groupPanelFilterActual = new PanelGroup(); - public void setTableColumn13(TableColumn tc) { - this.tableColumn13 = tc; - } + public PanelGroup getGroupPanelFilterActual() + { + return this.groupPanelFilterActual; + } - private TableColumn tableColumn14 = new TableColumn(); + public void setGroupPanelFilterActual( PanelGroup pg ) + { + this.groupPanelFilterActual = pg; + } + private StaticText labelFilterNameActual = new StaticText(); - public TableColumn getTableColumn14() { - return tableColumn14; - } + public StaticText getLabelFilterNameActual() + { + return this.labelFilterNameActual; + } - public void setTableColumn14(TableColumn tc) { - this.tableColumn14 = tc; - } + public void setLabelFilterNameActual( StaticText st ) + { + this.labelFilterNameActual = st; + } + private TextField textFilterNameActual = new TextField(); - private TableColumn tableColumn15 = new TableColumn(); + public TextField getTextFilterNameActual() + { + return this.textFilterNameActual; + } - public TableColumn getTableColumn15() { - return tableColumn15; - } + public void setTextFilterNameActual( TextField tf ) + { + this.textFilterNameActual = tf; + } + private com.sun.rave.web.ui.component.Calendar calFilterDateActual = new com.sun.rave.web.ui.component.Calendar(); - public void setTableColumn15(TableColumn tc) { - this.tableColumn15 = tc; - } + public com.sun.rave.web.ui.component.Calendar getCalFilterDateActual() + { + return this.calFilterDateActual; + } - private Hyperlink lnkPor = new Hyperlink(); + public void setCalFilterDateActual( com.sun.rave.web.ui.component.Calendar c ) + { + this.calFilterDateActual = c; + } + private TextField textFilterPORActual = new TextField(); - public Hyperlink getLnkPor() { - return lnkPor; - } + public TextField getTextFilterPORActual() + { + return textFilterPORActual; + } - public void setLnkPor(Hyperlink h) { - this.lnkPor = h; - } + public void setTextFilterPORActual( TextField textFilterPORActual ) + { + this.textFilterPORActual = textFilterPORActual; + } + private Button buttonFilterActual = new Button(); - private Hyperlink lnkPorSeg = new Hyperlink(); + public Button getButtonFilterActual() + { + return this.buttonFilterActual; + } - public Hyperlink getLnkPorSeg() { - return lnkPorSeg; - } + public void setButtonFilterActual( Button b ) + { + this.buttonFilterActual = b; + } + private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid(); - public void setLnkPorSeg(Hyperlink h) { - this.lnkPorSeg = h; - } + public HtmlPanelGrid getGridPanelFilterSeg() + { + return this.gridPanelFilterSeg; + } - private Hyperlink lnkPorConcluida = new Hyperlink(); + public void setGridPanelFilterSeg( HtmlPanelGrid pg ) + { + this.gridPanelFilterSeg = pg; + } + private PanelGroup groupPanelFilterSeg = new PanelGroup(); - public Hyperlink getLnkPorConcluida() { - return lnkPorConcluida; - } + public PanelGroup getGroupPanelFilterSeg() + { + return this.groupPanelFilterSeg; + } - public void setLnkPorConcluida(Hyperlink h) { - this.lnkPorConcluida = h; - } + public void setGroupPanelFilterSeg( PanelGroup pg ) + { + this.groupPanelFilterSeg = pg; + } + private StaticText labelFilterNameSeg = new StaticText(); - private Hyperlink lnkEstabConcluida = new Hyperlink(); + public StaticText getLabelFilterNameSeg() + { + return this.labelFilterNameSeg; + } - public Hyperlink getLnkEstabConcluida() { - return lnkEstabConcluida; - } + public void setLabelFilterNameSeg( StaticText st ) + { + this.labelFilterNameSeg = st; + } + private TextField textFilterNameSeg = new TextField(); - public void setLnkEstabConcluida(Hyperlink h) { - this.lnkEstabConcluida = h; - } + public TextField getTextFilterNameSeg() + { + return this.textFilterNameSeg; + } - private PanelGroup groupPanel7 = new PanelGroup(); + public void setTextFilterNameSeg( TextField tf ) + { + this.textFilterNameSeg = tf; + } + private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar(); - public PanelGroup getGroupPanel7() { - return groupPanel7; - } + public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg() + { + return this.calFilterDateSeg; + } - public void setGroupPanel7(PanelGroup pg) { - this.groupPanel7 = pg; - } + public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c ) + { + this.calFilterDateSeg = c; + } + private TextField textFilterPORSeg = new TextField(); - private StaticText staticText3 = new StaticText(); + public TextField getTextFilterPORSeg() + { + return textFilterPORSeg; + } - public StaticText getStaticText3() { - return staticText3; - } + public void setTextFilterPORSeg( TextField textFilterPORSeg ) + { + this.textFilterPORSeg = textFilterPORSeg; + } + private Button buttonFilterSeg = new Button(); - public void setStaticText3(StaticText st) { - this.staticText3 = st; - } + public Button getButtonFilterSeg() + { + return this.buttonFilterSeg; + } - private TextField txtPor = new TextField(); + public void setButtonFilterSeg( Button b ) + { + this.buttonFilterSeg = b; + } + private DropDown dropCurrentYear = new DropDown(); - public TextField getTxtPor() { - return txtPor; - } + public DropDown getDropCurrentYear() + { + return dropCurrentYear; + } - public void setTxtPor(TextField tf) { - this.txtPor = tf; - } + public void setDropCurrentYear( DropDown dropCurrentYear ) + { + this.dropCurrentYear = dropCurrentYear; + } + private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" ); + //
- private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid(); + /** + *

Construct a new Page bean instance.

+ */ + public FormMedico() + { + } - public HtmlPanelGrid getGridPanel9() { - return gridPanel9; - } + /** + *

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.

+ */ + @Override + public void init() + { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + + // + // 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 ); + } - public void setGridPanel9(HtmlPanelGrid hpg) { - this.gridPanel9 = hpg; - } + // + // Perform application initialization that must complete + // *after* managed components are initialized - private PanelGroup groupPanel8 = new PanelGroup(); + if ( !getSessionBean1().isLoggedIn() ) + { + try + { + getExternalContext().redirect( "Login.jsp" ); + } + catch ( Exception e ) + { + // . . . handle exception . . . + } + } + } - public PanelGroup getGroupPanel8() { - return groupPanel8; - } + /** + *

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.

+ */ + @Override + public void preprocess() + { + } - public void setGroupPanel8(PanelGroup pg) { - this.groupPanel8 = pg; - } + private void fillInitialForm() + { + Integer fromYear = getSelectedYear(); - private StaticText staticText10 = new StaticText(); + try + { + table1.setRendered( true ); - public StaticText getStaticText10() { - return staticText10; - } +// 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 ) + { + table1.setRendered( false ); + ErrorLogger.logException( ex ); + } - public void setStaticText10(StaticText st) { - this.staticText10 = st; - } + table2.setRendered( false ); - private ImageComponent image3 = new ImageComponent(); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - public ImageComponent getImage3() { - return image3; - } + table2.setRendered( true ); - public void setImage3(ImageComponent ic) { - this.image3 = ic; - } + ArrayList seguimentoList = adp.getAnalisesSeguimentoMedList( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), fromYear ); + getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); + } + catch ( Exception ex ) + { + table2.setRendered( false ); + ErrorLogger.logException( ex ); + } - private StaticText staticText11 = new StaticText(); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + table3.setRendered( true ); - public StaticText getStaticText11() { - return staticText11; - } + ArrayList concluidasList = adp.getAnalisesConcluidasList( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), fromYear ); + getSessionBean1().getAnalisesConcluidasDataProvider().setList( concluidasList ); + } + catch ( Exception ex ) + { + table3.setRendered( false ); + ErrorLogger.logException( ex ); + } + } - public void setStaticText11(StaticText st) { - this.staticText11 = st; - } + /** + *

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.

+ */ + @Override + public void prerender() + { + lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); + HttpServletRequest request = ( HttpServletRequest ) getExternalContext().getRequest(); + String referer = request.getRequestURI(); + String pageFrom = Utils.getPageFrom( referer ); + if ( !pageFrom.matches( "FormMedico.jsp" ) ) + { + fillCurrentYearDrop(); + fillInitialForm(); + fillAnoDropDown(); + } + } - private HtmlPanelGrid gridPanelFilterActual = new HtmlPanelGrid(); - public HtmlPanelGrid getGridPanelFilterActual() + /** + *

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).

+ */ + @Override + public void destroy() { - return this.gridPanelFilterActual; } - public void setGridPanelFilterActual( HtmlPanelGrid pg ) + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { - this.gridPanelFilterActual = pg; + return ( RequestBean1 ) getBean( "RequestBean1" ); } - private PanelGroup groupPanelFilterActual = new PanelGroup(); - public PanelGroup getGroupPanelFilterActual() + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { - return this.groupPanelFilterActual; + return ( SessionBean1 ) getBean( "SessionBean1" ); } - public void setGroupPanelFilterActual( PanelGroup pg ) + + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { - this.groupPanelFilterActual = pg; + return ( ApplicationBean1 ) getBean( "ApplicationBean1" ); } - private StaticText labelFilterNameActual = new StaticText(); - public StaticText getLabelFilterNameActual() + public String lnkEditUser_action() { - return this.labelFilterNameActual; + getSessionBean1().setNavFrom( "FormMedico" ); + getSessionBean1().setModoEdicaoUtilizador( "edit" ); + return "user"; } - public void setLabelFilterNameActual( StaticText st ) + + public String lnkLogout_action() { - this.labelFilterNameActual = st; + Utils.doLogout( getExternalContext(), false ); + return "login"; } - private TextField textFilterNameActual = new TextField(); - public TextField getTextFilterNameActual() + public String lnkDataAcidente_action() { - return this.textFilterNameActual; + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormMedico" ); + return "analise_acidente"; } - public void setTextFilterNameActual( TextField tf ) + + public String lnkNr_action() { - this.textFilterNameActual = tf; + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormMedico" ); + return "analise_acidente"; } - private com.sun.rave.web.ui.component.Calendar calFilterDateActual = new com.sun.rave.web.ui.component.Calendar(); - public com.sun.rave.web.ui.component.Calendar getCalFilterDateActual() + public String lnkNomeAcidentado_action() { - return this.calFilterDateActual; + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormMedico" ); + return "analise_acidente"; } - public void setCalFilterDateActual( com.sun.rave.web.ui.component.Calendar c ) + + private AnaliseAcidente getTableActivosRowData() { - this.calFilterDateActual = c; + 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 TextField textFilterPORActual = new TextField(); - - public TextField getTextFilterPORActual() { - return textFilterPORActual; + 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 setTextFilterPORActual(TextField textFilterPORActual) { - this.textFilterPORActual = textFilterPORActual; + public String lnkDataAcidenteSeg_action() + { + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormMedico" ); + return "view_analise"; } - - private Button buttonFilterActual = new Button(); - public Button getButtonFilterActual() + public String lnkNrSeg_action() { - return this.buttonFilterActual; + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormMedico" ); + return "view_analise"; } - public void setButtonFilterActual( Button b ) + + public String lnkNomeAcidentadoSeg_action() { - this.buttonFilterActual = b; + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormMedico" ); + return "view_analise"; } - private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid(); - public HtmlPanelGrid getGridPanelFilterSeg() + private AnaliseAcidente getTableSeguimentoRowData() { - return this.gridPanelFilterSeg; + 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 setGridPanelFilterSeg( HtmlPanelGrid pg ) + + public void drpAno_processValueChange( ValueChangeEvent event ) { - this.gridPanelFilterSeg = pg; + 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(); + } } - private PanelGroup groupPanelFilterSeg = new PanelGroup(); - public PanelGroup getGroupPanelFilterSeg() + public void drpMes_processValueChange( ValueChangeEvent event ) { - return this.groupPanelFilterSeg; + Object mes = event.getNewValue(); + if ( mes == null ) + { + lblDia.setVisible( false ); + drpDia.setVisible( false ); + } + else + { + lblDia.setVisible( true ); + drpDia.setVisible( true ); + fillDiaDropDown(); + } } - public void setGroupPanelFilterSeg( PanelGroup pg ) + + public void drpDia_processValueChange( ValueChangeEvent event ) { - this.groupPanelFilterSeg = pg; } - private StaticText labelFilterNameSeg = new StaticText(); - public StaticText getLabelFilterNameSeg() + public String butPesquisar_action() { - return this.labelFilterNameSeg; + Object obAno = null; + Object obMes = null; + Object obDia = null; + try + { + obAno = drpAno.getSelected(); + obMes = drpMes.getSelected(); + obDia = drpDia.getSelected(); + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } + + 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 por = null; + if ( txtPor.getText() != null ) + { + por = ( String ) txtPor.getText(); + if ( por.trim().length() == 0 ) + { + por = null; + } + } + + String nome = null; + if ( txtNome.getText() != null ) + { + nome = ( String ) txtNome.getText(); + if ( nome.trim().length() == 0 ) + { + nome = null; + } + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList concluidasList = adp.searchAnalisesConcluidasList( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), + ano, mes, dia, por, nome, null, getSelectedYear() ); + + 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 !" ); + ErrorLogger.logException( ex ); + } + return null; } - public void setLabelFilterNameSeg( StaticText st ) + + private void fillAnoDropDown() { - this.labelFilterNameSeg = st; +// ArrayList anosList = new ArrayList(); +// for(int ano=2007; ano<2051; ano++) +// { +// anosList.add(new Integer(ano)); +// } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList anosList = adp.getAnosListFromAnalises(); + 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) ); + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } } - private TextField textFilterNameSeg = new TextField(); - public TextField getTextFilterNameSeg() + private void fillMesDropDown() { - return this.textFilterNameSeg; + 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) ); } - public void setTextFilterNameSeg( TextField tf ) + + private void fillDiaDropDown() { - this.textFilterNameSeg = tf; } - private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar(); - public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg() + public String lnkDataConcluida_action() { - return this.calFilterDateSeg; + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormMedico" ); + return "view_analise"; } - public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c ) + + public String lnkNrConcluida_action() { - this.calFilterDateSeg = c; + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormMedico" ); + return "view_analise"; } - private TextField textFilterPORSeg = new TextField(); - - public TextField getTextFilterPORSeg() { - return textFilterPORSeg; + public String lnkNomeConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormMedico" ); + return "view_analise"; } - public void setTextFilterPORSeg(TextField textFilterPORSeg) { - this.textFilterPORSeg = textFilterPORSeg; + public String lnkFase_action() + { + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormMedico" ); + return "analise_acidente"; } - - private Button buttonFilterSeg = new Button(); - public Button getButtonFilterSeg() + public String lnkEstabelecimento_action() { - return this.buttonFilterSeg; + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormMedico" ); + return "analise_acidente"; } - public void setButtonFilterSeg( Button b ) + + public String lnkFaseSeg_action() { - this.buttonFilterSeg = b; + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormMedico" ); + return "view_analise"; } - private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" ); - //
- - /** - *

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() ); - - HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest(); - String referer = request.getRequestURI(); - String pageFrom = Utils.getPageFrom(referer); - if(!pageFrom.matches("FormMedico.jsp")) - { - 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); - ErrorLogger.logException( ex ); - } - - table2.setRendered(false); - - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - //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); - ErrorLogger.logException( ex ); - } - - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - //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); - ErrorLogger.logException( ex ); - } - 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() + public String lnkEstabelecimentoSeg_action() { - Utils.doLogout( getExternalContext(), false ); - - 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) - { - ErrorLogger.logException( ex ); - } - - 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 por = null; - if(txtPor.getText() != null) - { - por = (String) txtPor.getText(); - if(por.trim().length() == 0) - { - por = null; - } - } - - String nome = null; - if(txtNome.getText() != null) - { - nome = (String) txtNome.getText(); - if(nome.trim().length() == 0) - { - nome = null; - } - } - - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList()); - ArrayList concluidasList = adp.searchAanalisesConcluidasList( - getSessionBean1().getCurrentUser().getEstabelecimento_id(), - ano, mes, dia, por, nome, null - ); - - 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 !"); - ErrorLogger.logException( ex ); - } - return null; - } - - private void fillAnoDropDown() - { -// ArrayList anosList = new ArrayList(); -// for(int ano=2007; ano<2051; ano++) -// { -// anosList.add(new Integer(ano)); -// } + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormMedico" ); + return "view_analise"; + } - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - ArrayList anosList = adp.getAnosListFromAnalises(); - 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) ); - - } - catch(Exception ex) - { - ErrorLogger.logException( ex ); - } - - } - - - 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 lnkEstabelecimento_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"; - } - - public String lnkEstabelecimentoSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormMedico"); - return "view_analise"; - } - - public String lnkPor_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableActivosRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormMedico"); - return "analise_acidente"; - } - - public String lnkPorSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormMedico"); - return "view_analise"; - } - - public String lnkPorConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormMedico"); - return "view_analise"; - } - - public String lnkEstabConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormMedico"); - return "view_analise"; - } + public String lnkPor_action() + { + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormMedico" ); + return "analise_acidente"; + } + public String lnkPorSeg_action() + { + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormMedico" ); + return "view_analise"; + } + public String lnkPorConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormMedico" ); + return "view_analise"; + } + public String lnkEstabConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormMedico" ); + return "view_analise"; + } public String buttonFilterActual_action() { @@ -1728,33 +1835,32 @@ public class FormMedico extends AbstractPageBean { } } - String nome = null; - if ( textFilterNameActual.getText() != null ) - { - nome = (( String ) textFilterNameActual.getText()).trim(); - if( nome.length() == 0 ) - { - nome = null; - } - } - -// AnalisesDataProvider adp = new AnalisesDataProvider(); - try - { + String nome = null; + if ( textFilterNameActual.getText() != null ) + { + nome = ( ( String ) textFilterNameActual.getText() ).trim(); + if ( nome.length() == 0 ) + { + nome = null; + } + } + + try + { // ArrayList actualList = adp.searchAnalisesActuaisMedico( // getSessionBean1().getCurrentUser().getEstabelecimento_id(), nome, visitaDateStr ); table1.setRendered( true ); - txtSearchMsg.setRendered( false ); + txtSearchMsg.setRendered( false ); // getSessionBean1().getAnalisesActualDataProvider().setList( actualList ); - } - catch( Exception e ) - { + } + catch ( Exception e ) + { table1.setRendered( false ); - txtSearchMsg.setRendered( true ); - txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); + txtSearchMsg.setRendered( true ); + txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); ErrorLogger.logException( e ); - } + } return null; } @@ -1778,38 +1884,77 @@ public class FormMedico extends AbstractPageBean { } } - String nome = null; - if ( textFilterNameSeg.getText() != null ) - { - nome = (( String ) textFilterNameSeg.getText()).trim(); - if( nome.length() == 0 ) - { - nome = null; - } - } - - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - ArrayList seguimentoList = adp.searchAnalisesSeguimentoMedico( - getSessionBean1().getCurrentUser().getEstabelecimento_id(), - nome, visitaDateStr, POR ); + String nome = null; + if ( textFilterNameSeg.getText() != null ) + { + nome = ( ( String ) textFilterNameSeg.getText() ).trim(); + if ( nome.length() == 0 ) + { + nome = null; + } + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList seguimentoList = adp.searchAnalisesSeguimentoMedico( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), + nome, visitaDateStr, POR, getSelectedYear() ); table2.setRendered( true ); - txtSearchMsg.setRendered( false ); - getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); - } - catch( Exception e ) - { + txtSearchMsg.setRendered( false ); + getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); + } + catch ( Exception e ) + { table2.setRendered( false ); - txtSearchMsg.setRendered( true ); - txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); + txtSearchMsg.setRendered( true ); + txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); ErrorLogger.logException( e ); - } + } return null; } + public void dropCurrentYear_valueChangeListener( ValueChangeEvent event ) + { + Object oldValue = event.getOldValue(); + Object newValue = event.getNewValue(); + + if ( newValue != null && newValue instanceof Integer ) + { + Integer newYear = ( Integer ) newValue; + Integer oldYear = oldValue != null && oldValue instanceof Integer ? ( Integer ) oldValue : null; + if ( oldYear == null || !newYear.equals( oldYear ) ) + { + fillInitialForm(); + } + } + } + + private Integer getSelectedYear() + { + Integer result = null; + if ( dropCurrentYear != null ) + { + Object selected = dropCurrentYear.getSelected(); + if ( selected != null && selected instanceof Integer ) + { + result = ( Integer ) selected; + } + } + return result; + } + + private void fillCurrentYearDrop() + { + Integer selectedYear = getSelectedYear(); + + Option[] opts = Utils.getYearDropValues(); + dropCurrentYear.setItems( opts ); + + dropCurrentYear.setSelected( selectedYear != null ? selectedYear : opts.length > 0 ? opts[ 0].getValue() : null ); + } } diff --git a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormRH.java b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormRH.java index 0d6e9cff..f8ff8d34 100644 --- a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormRH.java +++ b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormRH.java @@ -54,1643 +54,1754 @@ import utils.Utils; * 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 HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid(); +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 HtmlPanelGrid getGridLayoutTop1() { - return gridLayoutTop1; - } + public Page getPage1() + { + return page1; + } - public void setGridLayoutTop1(HtmlPanelGrid hpg) { - this.gridLayoutTop1 = hpg; - } + public void setPage1( Page p ) + { + this.page1 = p; + } + private Html html1 = new Html(); - private HtmlPanelGrid gridActual1 = new HtmlPanelGrid(); + public Html getHtml1() + { + return html1; + } - public HtmlPanelGrid getGridActual1() { - return gridActual1; - } + public void setHtml1( Html h ) + { + this.html1 = h; + } + private Head head1 = new Head(); - public void setGridActual1(HtmlPanelGrid hpg) { - this.gridActual1 = hpg; - } + public Head getHead1() + { + return head1; + } - private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); + public void setHead1( Head h ) + { + this.head1 = h; + } + private Link link1 = new Link(); - public HtmlPanelGrid getGridPanel2() { - return gridPanel2; - } + public Link getLink1() + { + return link1; + } - public void setGridPanel2(HtmlPanelGrid hpg) { - this.gridPanel2 = hpg; - } + public void setLink1( Link l ) + { + this.link1 = l; + } + private Body body1 = new Body(); - private StaticText staticText4 = new StaticText(); + public Body getBody1() + { + return body1; + } - public StaticText getStaticText4() { - return staticText4; - } + public void setBody1( Body b ) + { + this.body1 = b; + } + private Form form1 = new Form(); - public void setStaticText4(StaticText st) { - this.staticText4 = st; - } + public Form getForm1() + { + return form1; + } - private StaticText staticText5 = new StaticText(); + public void setForm1( Form f ) + { + this.form1 = f; + } + private HtmlPanelGrid gridBase1 = new HtmlPanelGrid(); - public StaticText getStaticText5() { - return staticText5; - } + public HtmlPanelGrid getGridBase1() + { + return gridBase1; + } - public void setStaticText5(StaticText st) { - this.staticText5 = st; - } + public void setGridBase1( HtmlPanelGrid hpg ) + { + this.gridBase1 = hpg; + } + private HtmlPanelGrid gridLayout1 = new HtmlPanelGrid(); - private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); + public HtmlPanelGrid getGridLayout1() + { + return gridLayout1; + } - public HtmlPanelGrid getGridPanel3() { - return gridPanel3; - } + public void setGridLayout1( HtmlPanelGrid hpg ) + { + this.gridLayout1 = hpg; + } + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); - public void setGridPanel3(HtmlPanelGrid hpg) { - this.gridPanel3 = hpg; - } + public HtmlPanelGrid getGridPanel1() + { + return gridPanel1; + } - private Table table1 = new Table(); + public void setGridPanel1( HtmlPanelGrid hpg ) + { + this.gridPanel1 = hpg; + } + private PanelGroup groupPanel1 = new PanelGroup(); - public Table getTable1() { - return table1; - } + public PanelGroup getGroupPanel1() + { + return groupPanel1; + } - public void setTable1(Table t) { - this.table1 = t; - } + public void setGroupPanel1( PanelGroup pg ) + { + this.groupPanel1 = pg; + } + private ImageComponent image1 = new ImageComponent(); - private TableRowGroup tableRowGroup1 = new TableRowGroup(); + public ImageComponent getImage1() + { + return image1; + } - public TableRowGroup getTableRowGroup1() { - return tableRowGroup1; - } + public void setImage1( ImageComponent ic ) + { + this.image1 = ic; + } + private ImageComponent image2 = new ImageComponent(); - public void setTableRowGroup1(TableRowGroup trg) { - this.tableRowGroup1 = trg; - } + public ImageComponent getImage2() + { + return image2; + } - private TableColumn tableColumn1 = new TableColumn(); + public void setImage2( ImageComponent ic ) + { + this.image2 = ic; + } + private HtmlPanelGrid gridLayoutTop1 = new HtmlPanelGrid(); - public TableColumn getTableColumn1() { - return tableColumn1; - } + public HtmlPanelGrid getGridLayoutTop1() + { + return gridLayoutTop1; + } - public void setTableColumn1(TableColumn tc) { - this.tableColumn1 = tc; - } + public void setGridLayoutTop1( HtmlPanelGrid hpg ) + { + this.gridLayoutTop1 = hpg; + } + private HtmlPanelGrid gridActual1 = new HtmlPanelGrid(); - private Hyperlink lnkDataAcidente = new Hyperlink(); + public HtmlPanelGrid getGridActual1() + { + return gridActual1; + } - public Hyperlink getLnkDataAcidente() { - return lnkDataAcidente; - } + public void setGridActual1( HtmlPanelGrid hpg ) + { + this.gridActual1 = hpg; + } + private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); - public void setLnkDataAcidente(Hyperlink h) { - this.lnkDataAcidente = h; - } + public HtmlPanelGrid getGridPanel2() + { + return gridPanel2; + } - private TableColumn tableColumn2 = new TableColumn(); + public void setGridPanel2( HtmlPanelGrid hpg ) + { + this.gridPanel2 = hpg; + } + private StaticText staticText4 = new StaticText(); - public TableColumn getTableColumn2() { - return tableColumn2; - } + public StaticText getStaticText4() + { + return staticText4; + } - public void setTableColumn2(TableColumn tc) { - this.tableColumn2 = tc; - } + public void setStaticText4( StaticText st ) + { + this.staticText4 = st; + } + private StaticText staticText5 = new StaticText(); - private Hyperlink lnkNr = new Hyperlink(); + public StaticText getStaticText5() + { + return staticText5; + } - public Hyperlink getLnkNr() { - return lnkNr; - } + public void setStaticText5( StaticText st ) + { + this.staticText5 = st; + } + private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); - public void setLnkNr(Hyperlink h) { - this.lnkNr = h; - } + public HtmlPanelGrid getGridPanel3() + { + return gridPanel3; + } - private TableColumn tableColumn3 = new TableColumn(); + public void setGridPanel3( HtmlPanelGrid hpg ) + { + this.gridPanel3 = hpg; + } + private Table table1 = new Table(); - public TableColumn getTableColumn3() { - return tableColumn3; - } + public Table getTable1() + { + return table1; + } - public void setTableColumn3(TableColumn tc) { - this.tableColumn3 = tc; - } + public void setTable1( Table t ) + { + this.table1 = t; + } + private TableRowGroup tableRowGroup1 = new TableRowGroup(); - private Hyperlink lnkNomeAcidentado = new Hyperlink(); + public TableRowGroup getTableRowGroup1() + { + return tableRowGroup1; + } - public Hyperlink getLnkNomeAcidentado() { - return lnkNomeAcidentado; - } + public void setTableRowGroup1( TableRowGroup trg ) + { + this.tableRowGroup1 = trg; + } + private TableColumn tableColumn1 = new TableColumn(); - public void setLnkNomeAcidentado(Hyperlink h) { - this.lnkNomeAcidentado = h; - } + public TableColumn getTableColumn1() + { + return tableColumn1; + } - private HtmlPanelGrid gridSeguimento1 = new HtmlPanelGrid(); + public void setTableColumn1( TableColumn tc ) + { + this.tableColumn1 = tc; + } + private Hyperlink lnkDataAcidente = new Hyperlink(); - public HtmlPanelGrid getGridSeguimento1() { - return gridSeguimento1; - } + public Hyperlink getLnkDataAcidente() + { + return lnkDataAcidente; + } - public void setGridSeguimento1(HtmlPanelGrid hpg) { - this.gridSeguimento1 = hpg; - } + public void setLnkDataAcidente( Hyperlink h ) + { + this.lnkDataAcidente = h; + } + private TableColumn tableColumn2 = new TableColumn(); - private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); + public TableColumn getTableColumn2() + { + return tableColumn2; + } - public HtmlPanelGrid getGridPanel4() { - return gridPanel4; - } + public void setTableColumn2( TableColumn tc ) + { + this.tableColumn2 = tc; + } + private Hyperlink lnkNr = new Hyperlink(); - public void setGridPanel4(HtmlPanelGrid hpg) { - this.gridPanel4 = hpg; - } + public Hyperlink getLnkNr() + { + return lnkNr; + } - private StaticText staticText6 = new StaticText(); + public void setLnkNr( Hyperlink h ) + { + this.lnkNr = h; + } + private TableColumn tableColumn3 = new TableColumn(); - public StaticText getStaticText6() { - return staticText6; - } + public TableColumn getTableColumn3() + { + return tableColumn3; + } - public void setStaticText6(StaticText st) { - this.staticText6 = st; - } + public void setTableColumn3( TableColumn tc ) + { + this.tableColumn3 = tc; + } + private Hyperlink lnkNomeAcidentado = new Hyperlink(); - private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); + public Hyperlink getLnkNomeAcidentado() + { + return lnkNomeAcidentado; + } - public HtmlPanelGrid getGridPanel5() { - return gridPanel5; - } + public void setLnkNomeAcidentado( Hyperlink h ) + { + this.lnkNomeAcidentado = h; + } + private HtmlPanelGrid gridSeguimento1 = new HtmlPanelGrid(); - public void setGridPanel5(HtmlPanelGrid hpg) { - this.gridPanel5 = hpg; - } + public HtmlPanelGrid getGridSeguimento1() + { + return gridSeguimento1; + } - private Table table2 = new Table(); + public void setGridSeguimento1( HtmlPanelGrid hpg ) + { + this.gridSeguimento1 = hpg; + } + private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); - public Table getTable2() { - return table2; - } + public HtmlPanelGrid getGridPanel4() + { + return gridPanel4; + } - public void setTable2(Table t) { - this.table2 = t; - } + public void setGridPanel4( HtmlPanelGrid hpg ) + { + this.gridPanel4 = hpg; + } + private StaticText staticText6 = new StaticText(); - private TableRowGroup tableRowGroup2 = new TableRowGroup(); + public StaticText getStaticText6() + { + return staticText6; + } - public TableRowGroup getTableRowGroup2() { - return tableRowGroup2; - } + public void setStaticText6( StaticText st ) + { + this.staticText6 = st; + } + private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); - public void setTableRowGroup2(TableRowGroup trg) { - this.tableRowGroup2 = trg; - } + public HtmlPanelGrid getGridPanel5() + { + return gridPanel5; + } - private TableColumn tableColumn4 = new TableColumn(); + public void setGridPanel5( HtmlPanelGrid hpg ) + { + this.gridPanel5 = hpg; + } + private Table table2 = new Table(); - public TableColumn getTableColumn4() { - return tableColumn4; - } + public Table getTable2() + { + return table2; + } - public void setTableColumn4(TableColumn tc) { - this.tableColumn4 = tc; - } + public void setTable2( Table t ) + { + this.table2 = t; + } + private TableRowGroup tableRowGroup2 = new TableRowGroup(); - private Hyperlink lnkDataAcidenteSeg = new Hyperlink(); + public TableRowGroup getTableRowGroup2() + { + return tableRowGroup2; + } - public Hyperlink getLnkDataAcidenteSeg() { - return lnkDataAcidenteSeg; - } + public void setTableRowGroup2( TableRowGroup trg ) + { + this.tableRowGroup2 = trg; + } + private TableColumn tableColumn4 = new TableColumn(); - public void setLnkDataAcidenteSeg(Hyperlink h) { - this.lnkDataAcidenteSeg = h; - } + public TableColumn getTableColumn4() + { + return tableColumn4; + } - private TableColumn tableColumn5 = new TableColumn(); + public void setTableColumn4( TableColumn tc ) + { + this.tableColumn4 = tc; + } + private Hyperlink lnkDataAcidenteSeg = new Hyperlink(); - public TableColumn getTableColumn5() { - return tableColumn5; - } + public Hyperlink getLnkDataAcidenteSeg() + { + return lnkDataAcidenteSeg; + } - public void setTableColumn5(TableColumn tc) { - this.tableColumn5 = tc; - } + public void setLnkDataAcidenteSeg( Hyperlink h ) + { + this.lnkDataAcidenteSeg = h; + } + private TableColumn tableColumn5 = new TableColumn(); - private Hyperlink lnkNrSeg = new Hyperlink(); + public TableColumn getTableColumn5() + { + return tableColumn5; + } - public Hyperlink getLnkNrSeg() { - return lnkNrSeg; - } + public void setTableColumn5( TableColumn tc ) + { + this.tableColumn5 = tc; + } + private Hyperlink lnkNrSeg = new Hyperlink(); - public void setLnkNrSeg(Hyperlink h) { - this.lnkNrSeg = h; - } + public Hyperlink getLnkNrSeg() + { + return lnkNrSeg; + } - private TableColumn tableColumn6 = new TableColumn(); + public void setLnkNrSeg( Hyperlink h ) + { + this.lnkNrSeg = h; + } + private TableColumn tableColumn6 = new TableColumn(); - public TableColumn getTableColumn6() { - return tableColumn6; - } + public TableColumn getTableColumn6() + { + return tableColumn6; + } - public void setTableColumn6(TableColumn tc) { - this.tableColumn6 = tc; - } + public void setTableColumn6( TableColumn tc ) + { + this.tableColumn6 = tc; + } + private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink(); - private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink(); + public Hyperlink getLnkNomeAcidentadoSeg() + { + return lnkNomeAcidentadoSeg; + } - public Hyperlink getLnkNomeAcidentadoSeg() { - return lnkNomeAcidentadoSeg; - } + public void setLnkNomeAcidentadoSeg( Hyperlink h ) + { + this.lnkNomeAcidentadoSeg = h; + } + private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid(); - public void setLnkNomeAcidentadoSeg(Hyperlink h) { - this.lnkNomeAcidentadoSeg = h; - } + public HtmlPanelGrid getGridConcluidos1() + { + return gridConcluidos1; + } - private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid(); + public void setGridConcluidos1( HtmlPanelGrid hpg ) + { + this.gridConcluidos1 = hpg; + } + private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); - public HtmlPanelGrid getGridConcluidos1() { - return gridConcluidos1; - } + public HtmlPanelGrid getGridPanel6() + { + return gridPanel6; + } - public void setGridConcluidos1(HtmlPanelGrid hpg) { - this.gridConcluidos1 = hpg; - } + public void setGridPanel6( HtmlPanelGrid hpg ) + { + this.gridPanel6 = hpg; + } + private StaticText staticText7 = new StaticText(); - private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); + public StaticText getStaticText7() + { + return staticText7; + } - public HtmlPanelGrid getGridPanel6() { - return gridPanel6; - } + public void setStaticText7( StaticText st ) + { + this.staticText7 = st; + } + private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); - public void setGridPanel6(HtmlPanelGrid hpg) { - this.gridPanel6 = hpg; - } + public HtmlPanelGrid getGridPanel7() + { + return gridPanel7; + } - private StaticText staticText7 = new StaticText(); + public void setGridPanel7( HtmlPanelGrid hpg ) + { + this.gridPanel7 = hpg; + } + private PanelGroup groupPanel3 = new PanelGroup(); - public StaticText getStaticText7() { - return staticText7; - } + public PanelGroup getGroupPanel3() + { + return groupPanel3; + } - public void setStaticText7(StaticText st) { - this.staticText7 = st; - } + public void setGroupPanel3( PanelGroup pg ) + { + this.groupPanel3 = pg; + } + private StaticText staticText8 = new StaticText(); - private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); + public StaticText getStaticText8() + { + return staticText8; + } - public HtmlPanelGrid getGridPanel7() { - return gridPanel7; - } + public void setStaticText8( StaticText st ) + { + this.staticText8 = st; + } + private DropDown drpAno = new DropDown(); - public void setGridPanel7(HtmlPanelGrid hpg) { - this.gridPanel7 = hpg; - } + public DropDown getDrpAno() + { + return drpAno; + } - private PanelGroup groupPanel3 = new PanelGroup(); + public void setDrpAno( DropDown dd ) + { + this.drpAno = dd; + } + private PanelGroup groupPanel4 = new PanelGroup(); - public PanelGroup getGroupPanel3() { - return groupPanel3; - } + public PanelGroup getGroupPanel4() + { + return groupPanel4; + } - public void setGroupPanel3(PanelGroup pg) { - this.groupPanel3 = pg; - } + public void setGroupPanel4( PanelGroup pg ) + { + this.groupPanel4 = pg; + } + private StaticText lblMes = new StaticText(); - private StaticText staticText8 = new StaticText(); + public StaticText getLblMes() + { + return lblMes; + } - public StaticText getStaticText8() { - return staticText8; - } + public void setLblMes( StaticText st ) + { + this.lblMes = st; + } + private DropDown drpMes = new DropDown(); - public void setStaticText8(StaticText st) { - this.staticText8 = st; - } + public DropDown getDrpMes() + { + return drpMes; + } - private DropDown drpAno = new DropDown(); + public void setDrpMes( DropDown dd ) + { + this.drpMes = dd; + } + private PanelGroup groupPanel5 = new PanelGroup(); - public DropDown getDrpAno() { - return drpAno; - } + public PanelGroup getGroupPanel5() + { + return groupPanel5; + } - public void setDrpAno(DropDown dd) { - this.drpAno = dd; - } + public void setGroupPanel5( PanelGroup pg ) + { + this.groupPanel5 = pg; + } + private StaticText lblDia = new StaticText(); - private PanelGroup groupPanel4 = new PanelGroup(); + public StaticText getLblDia() + { + return lblDia; + } - public PanelGroup getGroupPanel4() { - return groupPanel4; - } + public void setLblDia( StaticText st ) + { + this.lblDia = st; + } + private DropDown drpDia = new DropDown(); - public void setGroupPanel4(PanelGroup pg) { - this.groupPanel4 = pg; - } + public DropDown getDrpDia() + { + return drpDia; + } - private StaticText lblMes = new StaticText(); + public void setDrpDia( DropDown dd ) + { + this.drpDia = dd; + } + private PanelGroup groupPanel6 = new PanelGroup(); - public StaticText getLblMes() { - return lblMes; - } + public PanelGroup getGroupPanel6() + { + return groupPanel6; + } - public void setLblMes(StaticText st) { - this.lblMes = st; - } + public void setGroupPanel6( PanelGroup pg ) + { + this.groupPanel6 = pg; + } + private StaticText staticText9 = new StaticText(); - private DropDown drpMes = new DropDown(); + public StaticText getStaticText9() + { + return staticText9; + } - public DropDown getDrpMes() { - return drpMes; - } + public void setStaticText9( StaticText st ) + { + this.staticText9 = st; + } + private TextField txtNome = new TextField(); - public void setDrpMes(DropDown dd) { - this.drpMes = dd; - } + public TextField getTxtNome() + { + return txtNome; + } - private PanelGroup groupPanel5 = new PanelGroup(); + public void setTxtNome( TextField tf ) + { + this.txtNome = tf; + } + private Button butPesquisar = new Button(); - public PanelGroup getGroupPanel5() { - return groupPanel5; - } + public Button getButPesquisar() + { + return butPesquisar; + } - public void setGroupPanel5(PanelGroup pg) { - this.groupPanel5 = pg; - } + public void setButPesquisar( Button b ) + { + this.butPesquisar = b; + } + private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); - private StaticText lblDia = new StaticText(); + public HtmlPanelGrid getGridPanel8() + { + return gridPanel8; + } - public StaticText getLblDia() { - return lblDia; - } + public void setGridPanel8( HtmlPanelGrid hpg ) + { + this.gridPanel8 = hpg; + } + private Table table3 = new Table(); - public void setLblDia(StaticText st) { - this.lblDia = st; - } + public Table getTable3() + { + return table3; + } - private DropDown drpDia = new DropDown(); + public void setTable3( Table t ) + { + this.table3 = t; + } + private TableRowGroup tableRowGroup3 = new TableRowGroup(); - public DropDown getDrpDia() { - return drpDia; - } + public TableRowGroup getTableRowGroup3() + { + return tableRowGroup3; + } - public void setDrpDia(DropDown dd) { - this.drpDia = dd; - } + public void setTableRowGroup3( TableRowGroup trg ) + { + this.tableRowGroup3 = trg; + } + private TableColumn tableColumn7 = new TableColumn(); - private PanelGroup groupPanel6 = new PanelGroup(); + public TableColumn getTableColumn7() + { + return tableColumn7; + } - public PanelGroup getGroupPanel6() { - return groupPanel6; - } + public void setTableColumn7( TableColumn tc ) + { + this.tableColumn7 = tc; + } + private Hyperlink lnkDataConcluida = new Hyperlink(); - public void setGroupPanel6(PanelGroup pg) { - this.groupPanel6 = pg; - } + public Hyperlink getLnkDataConcluida() + { + return lnkDataConcluida; + } - private StaticText staticText9 = new StaticText(); + public void setLnkDataConcluida( Hyperlink h ) + { + this.lnkDataConcluida = h; + } + private TableColumn tableColumn8 = new TableColumn(); - public StaticText getStaticText9() { - return staticText9; - } + public TableColumn getTableColumn8() + { + return tableColumn8; + } - public void setStaticText9(StaticText st) { - this.staticText9 = st; - } + public void setTableColumn8( TableColumn tc ) + { + this.tableColumn8 = tc; + } + private Hyperlink lnkNrConcluida = new Hyperlink(); - private TextField txtNome = new TextField(); + public Hyperlink getLnkNrConcluida() + { + return lnkNrConcluida; + } - public TextField getTxtNome() { - return txtNome; - } + public void setLnkNrConcluida( Hyperlink h ) + { + this.lnkNrConcluida = h; + } + private TableColumn tableColumn9 = new TableColumn(); - public void setTxtNome(TextField tf) { - this.txtNome = tf; - } + public TableColumn getTableColumn9() + { + return tableColumn9; + } - private Button butPesquisar = new Button(); + public void setTableColumn9( TableColumn tc ) + { + this.tableColumn9 = tc; + } + private Hyperlink lnkNomeConcluida = new Hyperlink(); - public Button getButPesquisar() { - return butPesquisar; - } + public Hyperlink getLnkNomeConcluida() + { + return lnkNomeConcluida; + } - 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 setLnkNomeConcluida( Hyperlink h ) + { + this.lnkNomeConcluida = h; + } + private StaticText txtSearchMsg = new StaticText(); - public void setTableColumn8(TableColumn tc) { - this.tableColumn8 = tc; - } + public StaticText getTxtSearchMsg() + { + return txtSearchMsg; + } - private Hyperlink lnkNrConcluida = new Hyperlink(); + public void setTxtSearchMsg( StaticText st ) + { + this.txtSearchMsg = st; + } + private TableColumn tableColumn10 = new TableColumn(); - public Hyperlink getLnkNrConcluida() { - return lnkNrConcluida; - } + public TableColumn getTableColumn10() + { + return tableColumn10; + } - public void setLnkNrConcluida(Hyperlink h) { - this.lnkNrConcluida = h; - } + public void setTableColumn10( TableColumn tc ) + { + this.tableColumn10 = tc; + } + private Hyperlink lnkFase = new Hyperlink(); - private TableColumn tableColumn9 = new TableColumn(); + public Hyperlink getLnkFase() + { + return lnkFase; + } - public TableColumn getTableColumn9() { - return tableColumn9; - } + public void setLnkFase( Hyperlink h ) + { + this.lnkFase = h; + } + private Hyperlink lnkEstabelecimento = new Hyperlink(); - public void setTableColumn9(TableColumn tc) { - this.tableColumn9 = tc; - } + public Hyperlink getLnkEstabelecimento() + { + return lnkEstabelecimento; + } - private Hyperlink lnkNomeConcluida = new Hyperlink(); + public void setLnkEstabelecimento( Hyperlink h ) + { + this.lnkEstabelecimento = h; + } + private TableColumn tableColumn11 = new TableColumn(); - public Hyperlink getLnkNomeConcluida() { - return lnkNomeConcluida; - } + public TableColumn getTableColumn11() + { + return tableColumn11; + } - public void setLnkNomeConcluida(Hyperlink h) { - this.lnkNomeConcluida = h; - } + public void setTableColumn11( TableColumn tc ) + { + this.tableColumn11 = tc; + } + private Hyperlink lnkFaseSeg = new Hyperlink(); - private StaticText txtSearchMsg = new StaticText(); + public Hyperlink getLnkFaseSeg() + { + return lnkFaseSeg; + } - public StaticText getTxtSearchMsg() { - return txtSearchMsg; - } + public void setLnkFaseSeg( Hyperlink h ) + { + this.lnkFaseSeg = h; + } + private Hyperlink lnkEstabelecimentoSeg = new Hyperlink(); - public void setTxtSearchMsg(StaticText st) { - this.txtSearchMsg = st; - } + public Hyperlink getLnkEstabelecimentoSeg() + { + return lnkEstabelecimentoSeg; + } - private TableColumn tableColumn10 = new TableColumn(); + public void setLnkEstabelecimentoSeg( Hyperlink h ) + { + this.lnkEstabelecimentoSeg = h; + } + private TableColumn tableColumn12 = new TableColumn(); - public TableColumn getTableColumn10() { - return tableColumn10; - } + public TableColumn getTableColumn12() + { + return tableColumn12; + } - public void setTableColumn10(TableColumn tc) { - this.tableColumn10 = tc; - } + public void setTableColumn12( TableColumn tc ) + { + this.tableColumn12 = tc; + } + private TableColumn tableColumn13 = new TableColumn(); - private Hyperlink lnkFase = new Hyperlink(); + public TableColumn getTableColumn13() + { + return tableColumn13; + } - public Hyperlink getLnkFase() { - return lnkFase; - } + public void setTableColumn13( TableColumn tc ) + { + this.tableColumn13 = tc; + } + private TableColumn tableColumn14 = new TableColumn(); - public void setLnkFase(Hyperlink h) { - this.lnkFase = h; - } + public TableColumn getTableColumn14() + { + return tableColumn14; + } - private Hyperlink lnkEstabelecimento = new Hyperlink(); + public void setTableColumn14( TableColumn tc ) + { + this.tableColumn14 = tc; + } + private TableColumn tableColumn15 = new TableColumn(); - public Hyperlink getLnkEstabelecimento() { - return lnkEstabelecimento; - } + public TableColumn getTableColumn15() + { + return tableColumn15; + } - public void setLnkEstabelecimento(Hyperlink h) { - this.lnkEstabelecimento = h; - } + public void setTableColumn15( TableColumn tc ) + { + this.tableColumn15 = tc; + } + private Hyperlink lnkPor = new Hyperlink(); - private TableColumn tableColumn11 = new TableColumn(); + public Hyperlink getLnkPor() + { + return lnkPor; + } - public TableColumn getTableColumn11() { - return tableColumn11; - } + public void setLnkPor( Hyperlink h ) + { + this.lnkPor = h; + } + private Hyperlink lnkPorSeg = new Hyperlink(); - public void setTableColumn11(TableColumn tc) { - this.tableColumn11 = tc; - } + public Hyperlink getLnkPorSeg() + { + return lnkPorSeg; + } - private Hyperlink lnkFaseSeg = new Hyperlink(); + public void setLnkPorSeg( Hyperlink h ) + { + this.lnkPorSeg = h; + } + private Hyperlink lnkPorConcluida = new Hyperlink(); - public Hyperlink getLnkFaseSeg() { - return lnkFaseSeg; - } + public Hyperlink getLnkPorConcluida() + { + return lnkPorConcluida; + } - public void setLnkFaseSeg(Hyperlink h) { - this.lnkFaseSeg = h; - } + public void setLnkPorConcluida( Hyperlink h ) + { + this.lnkPorConcluida = h; + } + private Hyperlink lnkEstabConcluida = new Hyperlink(); - private Hyperlink lnkEstabelecimentoSeg = new Hyperlink(); + public Hyperlink getLnkEstabConcluida() + { + return lnkEstabConcluida; + } - public Hyperlink getLnkEstabelecimentoSeg() { - return lnkEstabelecimentoSeg; - } + public void setLnkEstabConcluida( Hyperlink h ) + { + this.lnkEstabConcluida = h; + } + private PanelGroup groupPanel7 = new PanelGroup(); - public void setLnkEstabelecimentoSeg(Hyperlink h) { - this.lnkEstabelecimentoSeg = h; - } + public PanelGroup getGroupPanel7() + { + return groupPanel7; + } + public void setGroupPanel7( PanelGroup pg ) + { + this.groupPanel7 = pg; + } + private StaticText staticText3 = new StaticText(); - private TableColumn tableColumn12 = new TableColumn(); + public StaticText getStaticText3() + { + return staticText3; + } - public TableColumn getTableColumn12() { - return tableColumn12; - } + public void setStaticText3( StaticText st ) + { + this.staticText3 = st; + } + private TextField txtPor = new TextField(); - public void setTableColumn12(TableColumn tc) { - this.tableColumn12 = tc; - } + public TextField getTxtPor() + { + return txtPor; + } - private TableColumn tableColumn13 = new TableColumn(); + public void setTxtPor( TextField tf ) + { + this.txtPor = tf; + } + private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid(); - public TableColumn getTableColumn13() { - return tableColumn13; - } + public HtmlPanelGrid getGridPanel9() + { + return gridPanel9; + } - public void setTableColumn13(TableColumn tc) { - this.tableColumn13 = tc; - } + public void setGridPanel9( HtmlPanelGrid hpg ) + { + this.gridPanel9 = hpg; + } + private PanelGroup groupPanel8 = new PanelGroup(); - private TableColumn tableColumn14 = new TableColumn(); + public PanelGroup getGroupPanel8() + { + return groupPanel8; + } - public TableColumn getTableColumn14() { - return tableColumn14; - } + public void setGroupPanel8( PanelGroup pg ) + { + this.groupPanel8 = pg; + } + private StaticText staticText1 = new StaticText(); - public void setTableColumn14(TableColumn tc) { - this.tableColumn14 = tc; - } + public StaticText getStaticText1() + { + return staticText1; + } - private TableColumn tableColumn15 = new TableColumn(); + public void setStaticText1( StaticText st ) + { + this.staticText1 = st; + } + private ImageComponent image3 = new ImageComponent(); - public TableColumn getTableColumn15() { - return tableColumn15; - } + public ImageComponent getImage3() + { + return image3; + } - public void setTableColumn15(TableColumn tc) { - this.tableColumn15 = tc; - } + public void setImage3( ImageComponent ic ) + { + this.image3 = ic; + } + private StaticText staticText10 = new StaticText(); - private Hyperlink lnkPor = new Hyperlink(); + public StaticText getStaticText10() + { + return staticText10; + } - public Hyperlink getLnkPor() { - return lnkPor; - } + public void setStaticText10( StaticText st ) + { + this.staticText10 = st; + } + private HtmlPanelGrid gridPanel10 = new HtmlPanelGrid(); - public void setLnkPor(Hyperlink h) { - this.lnkPor = h; - } + public HtmlPanelGrid getGridPanel10() + { + return gridPanel10; + } - private Hyperlink lnkPorSeg = new Hyperlink(); + public void setGridPanel10( HtmlPanelGrid hpg ) + { + this.gridPanel10 = hpg; + } + private StaticText txtMsg1 = new StaticText(); - public Hyperlink getLnkPorSeg() { - return lnkPorSeg; - } + public StaticText getTxtMsg1() + { + return txtMsg1; + } - public void setLnkPorSeg(Hyperlink h) { - this.lnkPorSeg = h; - } + public void setTxtMsg1( StaticText st ) + { + this.txtMsg1 = st; + } + private TableColumn tableColumn16 = new TableColumn(); - private Hyperlink lnkPorConcluida = new Hyperlink(); + public TableColumn getTableColumn16() + { + return tableColumn16; + } - public Hyperlink getLnkPorConcluida() { - return lnkPorConcluida; - } + public void setTableColumn16( TableColumn tc ) + { + this.tableColumn16 = tc; + } + private Hyperlink lnkDataAbertura = new Hyperlink(); - public void setLnkPorConcluida(Hyperlink h) { - this.lnkPorConcluida = h; - } + public Hyperlink getLnkDataAbertura() + { + return lnkDataAbertura; + } - private Hyperlink lnkEstabConcluida = new Hyperlink(); + public void setLnkDataAbertura( Hyperlink h ) + { + this.lnkDataAbertura = h; + } + private TableColumn tableColumn17 = new TableColumn(); - public Hyperlink getLnkEstabConcluida() { - return lnkEstabConcluida; - } + public TableColumn getTableColumn17() + { + return tableColumn17; + } - public void setLnkEstabConcluida(Hyperlink h) { - this.lnkEstabConcluida = h; - } + public void setTableColumn17( TableColumn tc ) + { + this.tableColumn17 = tc; + } + private Hyperlink lnkDataAberturaSeg = new Hyperlink(); - private PanelGroup groupPanel7 = new PanelGroup(); + public Hyperlink getLnkDataAberturaSeg() + { + return lnkDataAberturaSeg; + } - public PanelGroup getGroupPanel7() { - return groupPanel7; - } + public void setLnkDataAberturaSeg( Hyperlink h ) + { + this.lnkDataAberturaSeg = h; + } + private TableColumn tableColumn18 = new TableColumn(); - public void setGroupPanel7(PanelGroup pg) { - this.groupPanel7 = pg; - } + public TableColumn getTableColumn18() + { + return tableColumn18; + } - private StaticText staticText3 = new StaticText(); + public void setTableColumn18( TableColumn tc ) + { + this.tableColumn18 = tc; + } + private TableColumn tableColumn19 = new TableColumn(); - public StaticText getStaticText3() { - return staticText3; - } + public TableColumn getTableColumn19() + { + return tableColumn19; + } - public void setStaticText3(StaticText st) { - this.staticText3 = st; - } + public void setTableColumn19( TableColumn tc ) + { + this.tableColumn19 = tc; + } + private TableColumn tableColumn20 = new TableColumn(); - private TextField txtPor = new TextField(); + public TableColumn getTableColumn20() + { + return tableColumn20; + } - public TextField getTxtPor() { - return txtPor; - } + public void setTableColumn20( TableColumn tc ) + { + this.tableColumn20 = tc; + } + private Hyperlink lnkDataAberturaConcluida = new Hyperlink(); - public void setTxtPor(TextField tf) { - this.txtPor = tf; - } + public Hyperlink getLnkDataAberturaConcluida() + { + return lnkDataAberturaConcluida; + } - private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid(); + public void setLnkDataAberturaConcluida( Hyperlink h ) + { + this.lnkDataAberturaConcluida = h; + } + private Hyperlink lnkPlanosActuacao = new Hyperlink(); - public HtmlPanelGrid getGridPanel9() { - return gridPanel9; - } + public Hyperlink getLnkPlanosActuacao() + { + return lnkPlanosActuacao; + } - public void setGridPanel9(HtmlPanelGrid hpg) { - this.gridPanel9 = hpg; - } + public void setLnkPlanosActuacao( Hyperlink h ) + { + this.lnkPlanosActuacao = h; + } + private StaticText lblUser = new StaticText(); - private PanelGroup groupPanel8 = new PanelGroup(); + public StaticText getLblUser() + { + return lblUser; + } - public PanelGroup getGroupPanel8() { - return groupPanel8; - } + public void setLblUser( StaticText st ) + { + this.lblUser = st; + } + private HtmlPanelGrid gridPanelFilterActual = new HtmlPanelGrid(); - public void setGroupPanel8(PanelGroup pg) { - this.groupPanel8 = pg; - } + public HtmlPanelGrid getGridPanelFilterActual() + { + return this.gridPanelFilterActual; + } - private StaticText staticText1 = new StaticText(); + public void setGridPanelFilterActual( HtmlPanelGrid pg ) + { + this.gridPanelFilterActual = pg; + } + private PanelGroup groupPanelFilterActual = new PanelGroup(); - public StaticText getStaticText1() { - return staticText1; - } + public PanelGroup getGroupPanelFilterActual() + { + return this.groupPanelFilterActual; + } - public void setStaticText1(StaticText st) { - this.staticText1 = st; - } + public void setGroupPanelFilterActual( PanelGroup pg ) + { + this.groupPanelFilterActual = pg; + } + private StaticText labelFilterNameActual = new StaticText(); - private ImageComponent image3 = new ImageComponent(); + public StaticText getLabelFilterNameActual() + { + return this.labelFilterNameActual; + } - public ImageComponent getImage3() { - return image3; - } + public void setLabelFilterNameActual( StaticText st ) + { + this.labelFilterNameActual = st; + } + private TextField textFilterNameActual = new TextField(); - public void setImage3(ImageComponent ic) { - this.image3 = ic; - } + public TextField getTextFilterNameActual() + { + return this.textFilterNameActual; + } - private StaticText staticText10 = new StaticText(); + public void setTextFilterNameActual( TextField tf ) + { + this.textFilterNameActual = tf; + } + private com.sun.rave.web.ui.component.Calendar calFilterDateActual = new com.sun.rave.web.ui.component.Calendar(); - public StaticText getStaticText10() { - return staticText10; - } + public com.sun.rave.web.ui.component.Calendar getCalFilterDateActual() + { + return this.calFilterDateActual; + } - public void setStaticText10(StaticText st) { - this.staticText10 = st; - } + public void setCalFilterDateActual( com.sun.rave.web.ui.component.Calendar c ) + { + this.calFilterDateActual = c; + } + private TextField textFilterPORActual = new TextField(); - private HtmlPanelGrid gridPanel10 = new HtmlPanelGrid(); + public TextField getTextFilterPORActual() + { + return textFilterPORActual; + } - public HtmlPanelGrid getGridPanel10() { - return gridPanel10; - } + public void setTextFilterPORActual( TextField textFilterPORActual ) + { + this.textFilterPORActual = textFilterPORActual; + } + private Button buttonFilterActual = new Button(); - public void setGridPanel10(HtmlPanelGrid hpg) { - this.gridPanel10 = hpg; - } + public Button getButtonFilterActual() + { + return this.buttonFilterActual; + } - private StaticText txtMsg1 = new StaticText(); + public void setButtonFilterActual( Button b ) + { + this.buttonFilterActual = b; + } + private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid(); - public StaticText getTxtMsg1() { - return txtMsg1; - } + public HtmlPanelGrid getGridPanelFilterSeg() + { + return this.gridPanelFilterSeg; + } - public void setTxtMsg1(StaticText st) { - this.txtMsg1 = st; - } + public void setGridPanelFilterSeg( HtmlPanelGrid pg ) + { + this.gridPanelFilterSeg = pg; + } + private PanelGroup groupPanelFilterSeg = new PanelGroup(); - private TableColumn tableColumn16 = new TableColumn(); + public PanelGroup getGroupPanelFilterSeg() + { + return this.groupPanelFilterSeg; + } - public TableColumn getTableColumn16() { - return tableColumn16; - } + public void setGroupPanelFilterSeg( PanelGroup pg ) + { + this.groupPanelFilterSeg = pg; + } + private StaticText labelFilterNameSeg = new StaticText(); - public void setTableColumn16(TableColumn tc) { - this.tableColumn16 = tc; - } + public StaticText getLabelFilterNameSeg() + { + return this.labelFilterNameSeg; + } - private Hyperlink lnkDataAbertura = new Hyperlink(); + public void setLabelFilterNameSeg( StaticText st ) + { + this.labelFilterNameSeg = st; + } + private TextField textFilterNameSeg = new TextField(); - public Hyperlink getLnkDataAbertura() { - return lnkDataAbertura; - } + public TextField getTextFilterNameSeg() + { + return this.textFilterNameSeg; + } - public void setLnkDataAbertura(Hyperlink h) { - this.lnkDataAbertura = h; - } + public void setTextFilterNameSeg( TextField tf ) + { + this.textFilterNameSeg = tf; + } + private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar(); - private TableColumn tableColumn17 = new TableColumn(); + public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg() + { + return this.calFilterDateSeg; + } - public TableColumn getTableColumn17() { - return tableColumn17; - } + public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c ) + { + this.calFilterDateSeg = c; + } + private TextField textFilterPORSeg = new TextField(); - public void setTableColumn17(TableColumn tc) { - this.tableColumn17 = tc; - } + public TextField getTextFilterPORSeg() + { + return textFilterPORSeg; + } - private Hyperlink lnkDataAberturaSeg = new Hyperlink(); + public void setTextFilterPORSeg( TextField textFilterPORSeg ) + { + this.textFilterPORSeg = textFilterPORSeg; + } + private Button buttonFilterSeg = new Button(); - public Hyperlink getLnkDataAberturaSeg() { - return lnkDataAberturaSeg; - } + public Button getButtonFilterSeg() + { + return this.buttonFilterSeg; + } - public void setLnkDataAberturaSeg(Hyperlink h) { - this.lnkDataAberturaSeg = h; - } + public void setButtonFilterSeg( Button b ) + { + this.buttonFilterSeg = b; + } + private DropDown dropCurrentYear = new DropDown(); - private TableColumn tableColumn18 = new TableColumn(); + public DropDown getDropCurrentYear() + { + return dropCurrentYear; + } - public TableColumn getTableColumn18() { - return tableColumn18; - } + public void setDropCurrentYear( DropDown dropCurrentYear ) + { + this.dropCurrentYear = dropCurrentYear; + } + private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" ); + //
- public void setTableColumn18(TableColumn tc) { - this.tableColumn18 = tc; - } + /** + *

Construct a new Page bean instance.

+ */ + public FormRH() + { + } - private TableColumn tableColumn19 = new TableColumn(); + /** + *

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.

+ */ + @Override + public void init() + { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + + // + // 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 ); + } - public TableColumn getTableColumn19() { - return tableColumn19; - } + // + // Perform application initialization that must complete + // *after* managed components are initialized - public void setTableColumn19(TableColumn tc) { - this.tableColumn19 = tc; - } + if ( !getSessionBean1().isLoggedIn() ) + { + try + { + getExternalContext().redirect( "Login.jsp" ); + } + catch ( Exception e ) + { + // . . . handle exception . . . + } + } + } - private TableColumn tableColumn20 = new TableColumn(); + /** + *

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.

+ */ + @Override + public void preprocess() + { + } - public TableColumn getTableColumn20() { - return tableColumn20; - } + private void fillInitialForm() + { + Integer fromYear = getSelectedYear(); + String responsavel_loja = getSessionBean1().getCurrentUser().getResponsavel_loja(); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - public void setTableColumn20(TableColumn tc) { - this.tableColumn20 = tc; - } + table1.setRendered( true ); - private Hyperlink lnkDataAberturaConcluida = new Hyperlink(); + ArrayList actuaisList = adp.getAnalisesActuaisRhList( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), responsavel_loja, fromYear ); + getSessionBean1().getAnalisesActualDataProvider().setList( actuaisList ); + } + catch ( Exception ex ) + { + table1.setRendered( false ); + ErrorLogger.logException( ex ); + } - public Hyperlink getLnkDataAberturaConcluida() { - return lnkDataAberturaConcluida; - } + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + table2.setRendered( true ); - public void setLnkDataAberturaConcluida(Hyperlink h) { - this.lnkDataAberturaConcluida = h; - } - private Hyperlink lnkPlanosActuacao = new Hyperlink(); + ArrayList seguimentoList = adp.getAnalisesSeguimentoRhList( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), responsavel_loja, fromYear ); + getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); + } + catch ( Exception ex ) + { + table2.setRendered( false ); + ErrorLogger.logException( ex ); + } - public Hyperlink getLnkPlanosActuacao() { - return lnkPlanosActuacao; - } + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + table3.setRendered( true ); - public void setLnkPlanosActuacao(Hyperlink h) { - this.lnkPlanosActuacao = h; - } - private StaticText lblUser = new StaticText(); + ArrayList concluidasList = adp.getAnalisesConcluidasList( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), fromYear ); + getSessionBean1().getAnalisesConcluidasDataProvider().setList( concluidasList ); + } + catch ( Exception ex ) + { + table3.setRendered( false ); + ErrorLogger.logException( ex ); + } + } - public StaticText getLblUser() { - return lblUser; - } + /** + *

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.

+ */ + @Override + public void prerender() + { + System.out.println( "=== FORM_RH ===" ); + lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); - public void setLblUser(StaticText st) { - this.lblUser = st; - } + String responsavel_loja = getSessionBean1().getCurrentUser().getResponsavel_loja(); + if ( responsavel_loja.matches( "n" ) ) + { + lnkPlanosActuacao.setDisabled( true ); + } + HttpServletRequest request = ( HttpServletRequest ) getExternalContext().getRequest(); + String referer = request.getRequestURI(); + String pageFrom = Utils.getPageFrom( referer ); + if ( !pageFrom.matches( "FormRH.jsp" ) ) + { + fillCurrentYearDrop(); + fillInitialForm(); + fillAnoDropDown(); + } - private HtmlPanelGrid gridPanelFilterActual = new HtmlPanelGrid(); - public HtmlPanelGrid getGridPanelFilterActual() - { - return this.gridPanelFilterActual; - } - public void setGridPanelFilterActual( HtmlPanelGrid pg ) - { - this.gridPanelFilterActual = pg; + txtMsg1.setText( getSessionBean1().getMsg() ); + getSessionBean1().setMsg( "" ); } - private PanelGroup groupPanelFilterActual = new PanelGroup(); - public PanelGroup getGroupPanelFilterActual() - { - return this.groupPanelFilterActual; - } - public void setGroupPanelFilterActual( PanelGroup pg ) + /** + *

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).

+ */ + @Override + public void destroy() { - this.groupPanelFilterActual = pg; } - private StaticText labelFilterNameActual = new StaticText(); - public StaticText getLabelFilterNameActual() + /** + *

Return a reference to the scoped data bean.

+ */ + protected SessionBean1 getSessionBean1() { - return this.labelFilterNameActual; + return ( SessionBean1 ) getBean( "SessionBean1" ); } - public void setLabelFilterNameActual( StaticText st ) + + /** + *

Return a reference to the scoped data bean.

+ */ + protected RequestBean1 getRequestBean1() { - this.labelFilterNameActual = st; + return ( RequestBean1 ) getBean( "RequestBean1" ); } - private TextField textFilterNameActual = new TextField(); - public TextField getTextFilterNameActual() + /** + *

Return a reference to the scoped data bean.

+ */ + protected ApplicationBean1 getApplicationBean1() { - return this.textFilterNameActual; + return ( ApplicationBean1 ) getBean( "ApplicationBean1" ); } - public void setTextFilterNameActual( TextField tf ) + + public String lnkLogout_action() { - this.textFilterNameActual = tf; + Utils.doLogout( getExternalContext(), true ); + return null; } - private com.sun.rave.web.ui.component.Calendar calFilterDateActual = new com.sun.rave.web.ui.component.Calendar(); - public com.sun.rave.web.ui.component.Calendar getCalFilterDateActual() + + public String butNovaAnalise_action() { - return this.calFilterDateActual; + return null; } - public void setCalFilterDateActual( com.sun.rave.web.ui.component.Calendar c ) + + public String lnkDataAcidente_action() { - this.calFilterDateActual = c; + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormRH" ); + return "analise_acidente"; } - private TextField textFilterPORActual = new TextField(); - - public TextField getTextFilterPORActual() { - return textFilterPORActual; + public String lnkDataAbertura_action() + { + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormRH" ); + return "analise_acidente"; } - public void setTextFilterPORActual(TextField textFilterPORActual) { - this.textFilterPORActual = textFilterPORActual; + public String lnkNr_action() + { + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormRH" ); + return "analise_acidente"; } - - private Button buttonFilterActual = new Button(); - public Button getButtonFilterActual() + public String lnkNomeAcidentado_action() { - return this.buttonFilterActual; + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormRH" ); + return "analise_acidente"; } - public void setButtonFilterActual( Button b ) + + private AnaliseAcidente getTableActivosRowData() { - this.buttonFilterActual = b; + 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 HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid(); - public HtmlPanelGrid getGridPanelFilterSeg() + public String lnkDataAcidenteSeg_action() { - return this.gridPanelFilterSeg; + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormRH" ); + return "view_analise"; } - public void setGridPanelFilterSeg( HtmlPanelGrid pg ) + + public String lnkDataAberturaSeg_action() { - this.gridPanelFilterSeg = pg; + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormRH" ); + return "view_analise"; } - private PanelGroup groupPanelFilterSeg = new PanelGroup(); - public PanelGroup getGroupPanelFilterSeg() + public String lnkNrSeg_action() { - return this.groupPanelFilterSeg; + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormRH" ); + return "view_analise"; } - public void setGroupPanelFilterSeg( PanelGroup pg ) + + public String lnkNomeAcidentadoSeg_action() { - this.groupPanelFilterSeg = pg; + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormRH" ); + return "view_analise"; } - private StaticText labelFilterNameSeg = new StaticText(); - public StaticText getLabelFilterNameSeg() + private AnaliseAcidente getTableSeguimentoRowData() { - return this.labelFilterNameSeg; + 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 setLabelFilterNameSeg( StaticText st ) + + private AnaliseAcidente getTableConcluidasRowData() { - this.labelFilterNameSeg = st; + 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; } - private TextField textFilterNameSeg = new TextField(); - public TextField getTextFilterNameSeg() + public void drpAno_processValueChange( ValueChangeEvent event ) { - return this.textFilterNameSeg; + 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 setTextFilterNameSeg( TextField tf ) + + public void drpMes_processValueChange( ValueChangeEvent event ) { - this.textFilterNameSeg = tf; + Object mes = event.getNewValue(); + if ( mes == null ) + { + lblDia.setVisible( false ); + drpDia.setVisible( false ); + } + else + { + lblDia.setVisible( true ); + drpDia.setVisible( true ); + //fillDiaDropDown(); + } } - private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar(); - public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg() + public void drpDia_processValueChange( ValueChangeEvent event ) { - return this.calFilterDateSeg; } - public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c ) + + public String butPesquisar_action() { - this.calFilterDateSeg = c; - } + Object obAno = null; + Object obMes = null; + Object obDia = null; + try + { + obAno = drpAno.getSelected(); + obMes = drpMes.getSelected(); + obDia = drpDia.getSelected(); + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } - private TextField textFilterPORSeg = new TextField(); + Integer ano = null; + Integer mes = null; + Integer dia = null; - public TextField getTextFilterPORSeg() { - return textFilterPORSeg; - } + if ( obAno != null ) + { + ano = ( Integer ) obAno; + } - public void setTextFilterPORSeg(TextField textFilterPORSeg) { - this.textFilterPORSeg = textFilterPORSeg; - } - + if ( obMes != null ) + { + mes = ( Integer ) obMes; + } - private Button buttonFilterSeg = new Button(); - public Button getButtonFilterSeg() - { - return this.buttonFilterSeg; - } - public void setButtonFilterSeg( Button b ) - { - this.buttonFilterSeg = b; - } + if ( obDia != null ) + { + dia = ( Integer ) obDia; + } + String por = null; + if ( txtPor.getText() != null ) + { + por = ( String ) txtPor.getText(); + if ( por.trim().length() == 0 ) + { + por = null; + } + } - private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" ); - //
- - /** - *

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() { - System.out.println("=== FORM_RH ==="); - lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); - - String responsavel_loja = getSessionBean1().getCurrentUser().getResponsavel_loja(); - if(responsavel_loja.matches("n")) - { - lnkPlanosActuacao.setDisabled(true); - } -// if(getSessionBean1().getCurrentUser().getTipo().intValue() == 7) // director rh -// { -// //////stSep.setText("|"); -// } -// else //rh -// { -// //////stSep.setText(" "); -// //////lnkNewUser.setRendered(false); -// stSep1.setRendered(false); -// } - - - HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest(); - String referer = request.getRequestURI(); - String pageFrom = Utils.getPageFrom(referer); - if(!pageFrom.matches("FormRH.jsp")) - { - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - //lblActivos.setRendered(true); - table1.setRendered(true); - - //ArrayList actuaisList = adp.getAnalisesActuaisList(getSessionBean1().getCurrentUser().getEstabelecimento_id()); - ArrayList actuaisList = adp.getAnalisesActuaisRhList(getSessionBean1().getCurrentUser().getEstabelecimento_id(), responsavel_loja); - getSessionBean1().getAnalisesActualDataProvider().setList(actuaisList); - } - catch(Exception ex) - { - //lblActivos.setRendered(false); - table1.setRendered(false); - ErrorLogger.logException( ex ); - } - - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - //lblActivos.setRendered(true); - table2.setRendered(true); - - ArrayList seguimentoList = adp.getAnalisesSeguimentoRhList(getSessionBean1().getCurrentUser().getEstabelecimento_id(), responsavel_loja); - getSessionBean1().getAnalisesSeguimentoDataProvider().setList(seguimentoList); - } - catch(Exception ex) - { - //lblActivos.setRendered(false); - table2.setRendered(false); - ErrorLogger.logException( ex ); - } - - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - //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); - ErrorLogger.logException( ex ); - } - fillAnoDropDown(); - } - - txtMsg1.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 lnkLogout_action() - { - Utils.doLogout( getExternalContext(), true ); - return null; - } - - 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 lnkDataAbertura_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("FormRH"); - return "view_analise"; - } - - public String lnkDataAberturaSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormRH"); - return "view_analise"; - } - - public String lnkNrSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormRH"); - return "view_analise"; - } - - - public String lnkNomeAcidentadoSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormRH"); - 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) - { - ErrorLogger.logException( ex ); - } - - 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 por = null; - if(txtPor.getText() != null) - { - por = (String) txtPor.getText(); - if(por.trim().length() == 0) - { - por = null; - } - } - - String nome = null; - if(txtNome.getText() != null) - { - nome = (String) txtNome.getText(); - if(nome.trim().length() == 0) - { - nome = null; - } - } - - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList()); - ArrayList concluidasList = adp.searchAanalisesConcluidasList( - getSessionBean1().getCurrentUser().getEstabelecimento_id(), - ano, mes, dia, por, nome, null ); + String nome = null; + if ( txtNome.getText() != null ) + { + nome = ( String ) txtNome.getText(); + if ( nome.trim().length() == 0 ) + { + nome = null; + } + } - table3.setRendered(true); - txtSearchMsg.setRendered(false); - getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList()); + ArrayList concluidasList = adp.searchAnalisesConcluidasList( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), + ano, mes, dia, por, nome, null, getSelectedYear() ); - } - catch(Exception ex) - { - table3.setRendered(false); - txtSearchMsg.setRendered(true); - txtSearchMsg.setText("Não foram encontrados registos para a sua pesquisa !"); - ErrorLogger.logException( ex ); - } + 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 !" ); + ErrorLogger.logException( ex ); + } + return null; + } - return null; - } - // private String getPageFrom(String referer) // { // String pageFrom = referer.substring(referer.lastIndexOf("/")+1); // return pageFrom; // } - - private void fillAnoDropDown() - { + private void fillAnoDropDown() + { // ArrayList anosList = new ArrayList(); // for(int ano=2007; ano<2051; ano++) // { // anosList.add(new Integer(ano)); // } - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - ArrayList anosList = adp.getAnosListFromAnalises(); - 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) ); - - } - catch(Exception ex) - { - ErrorLogger.logException( ex ); - } - - } - - - 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() - { + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList anosList = adp.getAnosListFromAnalises(); + 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) ); + + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } + } + + 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; @@ -1740,134 +1851,120 @@ public class FormRH extends AbstractPageBean { // Calendar cal = new GregorianCalendar(); // int day = cal.get(Calendar.DAY_OF_MONTH); // drpDia.setSelected( new Integer(0) ); - } - - public String lnkEditUser_action() { - // TODO: Replace with your code - getSessionBean1().setNavFrom("FormRH"); - getSessionBean1().setModoEdicaoUtilizador("edit"); - return "user"; - } - - public String lnkDataConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormRH"); - return "view_analise"; - } - - public String lnkDataAberturaConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormRH"); - return "view_analise"; - } - - public String lnkNrConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormRH"); - return "view_analise"; - } - - public String lnkNomeConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormRH"); - return "view_analise"; - } - - public String lnkFase_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableActivosRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormRH"); - return "analise_acidente"; - } - - public String lnkEstabelecimento_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableActivosRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormRH"); - return "analise_acidente"; - } - - - public String lnkFaseSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormRH"); - return "view_analise"; - } - - public String lnkEstabelecimentoSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormRH"); - return "view_analise"; - } - - public String lnkPor_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableActivosRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormRH"); - return "analise_acidente"; - } - - public String lnkPorSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormRH"); - return "view_analise"; - } - - public String lnkPorConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormRH"); - return "view_analise"; - } - - public String lnkEstabConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormRH"); - return "view_analise"; - } - - public String lnkNewUser_action() { - // TODO: Replace with your code - - getSessionBean1().setNavFrom("FormRH"); - getSessionBean1().setModoEdicaoUtilizador("new"); - return "user"; - } - - public String lnkAjuda_action() { - // TODO: Replace with your code + } + + public String lnkEditUser_action() + { + getSessionBean1().setNavFrom( "FormRH" ); + getSessionBean1().setModoEdicaoUtilizador( "edit" ); + return "user"; + } + + public String lnkDataConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormRH" ); + return "view_analise"; + } + + public String lnkDataAberturaConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormRH" ); + return "view_analise"; + } + + public String lnkNrConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormRH" ); + return "view_analise"; + } + + public String lnkNomeConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormRH" ); + return "view_analise"; + } + + public String lnkFase_action() + { + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormRH" ); + return "analise_acidente"; + } + + public String lnkEstabelecimento_action() + { + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormRH" ); + return "analise_acidente"; + } + + public String lnkFaseSeg_action() + { + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormRH" ); + return "view_analise"; + } + + public String lnkEstabelecimentoSeg_action() + { + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormRH" ); + return "view_analise"; + } + + public String lnkPor_action() + { + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormRH" ); + return "analise_acidente"; + } + + public String lnkPorSeg_action() + { + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormRH" ); + return "view_analise"; + } + + public String lnkPorConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormRH" ); + return "view_analise"; + } + + public String lnkEstabConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormRH" ); + return "view_analise"; + } + + public String lnkNewUser_action() + { + getSessionBean1().setNavFrom( "FormRH" ); + getSessionBean1().setModoEdicaoUtilizador( "new" ); + return "user"; + } + + public String lnkAjuda_action() + { // ServletContext theApplicationsServletContext = // (ServletContext) this.getExternalContext().getContext(); // String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL); @@ -1882,15 +1979,15 @@ public class FormRH extends AbstractPageBean { // { // ErrorLogger.logException( ex ); // } - return null; - } + return null; + } - public String lnkPlanosActuacao_action() { - // TODO: Replace with your code - Utilizador u = getSessionBean1().getCurrentUser(); + public String lnkPlanosActuacao_action() + { + Utilizador u = getSessionBean1().getCurrentUser(); // String curUser = "?user=" + u.getId().toString(); - FacesContext fc = getFacesContext().getCurrentInstance(); - Global.redirectToPlanos(fc, u); + FacesContext fc = getFacesContext().getCurrentInstance(); + Global.redirectToPlanos( fc, u ); // Utilizador u = getSessionBean1().getCurrentUser(); // String curUser = "?user=" + u.getId().toString(); // FacesContext fc = getFacesContext().getCurrentInstance(); @@ -1902,15 +1999,13 @@ public class FormRH extends AbstractPageBean { // { // // } - return null; - } - - public String lnkAnalisesAcidente_action() { - // TODO: Replace with your code - return null; - } - + return null; + } + public String lnkAnalisesAcidente_action() + { + return null; + } public String buttonFilterActual_action() { @@ -1931,36 +2026,36 @@ public class FormRH extends AbstractPageBean { } } - String nome = null; - if ( textFilterNameActual.getText() != null ) - { - nome = (( String ) textFilterNameActual.getText()).trim(); - if( nome.length() == 0 ) - { - nome = null; - } - } - - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - ArrayList actualList = adp.searchAnalisesActualRH( - getSessionBean1().getCurrentUser().getEstabelecimento_id(), + String nome = null; + if ( textFilterNameActual.getText() != null ) + { + nome = ( ( String ) textFilterNameActual.getText() ).trim(); + if ( nome.length() == 0 ) + { + nome = null; + } + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList actualList = adp.searchAnalisesActualRH( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), nome, visitaDateStr, POR, - getSessionBean1().getCurrentUser().getResponsavel_loja() ); + getSessionBean1().getCurrentUser().getResponsavel_loja(), getSelectedYear() ); table1.setRendered( true ); - txtSearchMsg.setRendered( false ); - getSessionBean1().getAnalisesActualDataProvider().setList( actualList ); - } - catch( Exception e ) - { + txtSearchMsg.setRendered( false ); + getSessionBean1().getAnalisesActualDataProvider().setList( actualList ); + } + catch ( Exception e ) + { table1.setRendered( false ); - txtSearchMsg.setRendered( true ); - txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); + txtSearchMsg.setRendered( true ); + txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); ErrorLogger.logException( e ); - } + } return null; } @@ -1984,39 +2079,78 @@ public class FormRH extends AbstractPageBean { } } - String nome = null; - if ( textFilterNameSeg.getText() != null ) - { - nome = (( String ) textFilterNameSeg.getText()).trim(); - if( nome.length() == 0 ) - { - nome = null; - } - } - - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - ArrayList seguimentoList = adp.searchAnalisesSeguimentoRH( - getSessionBean1().getCurrentUser().getEstabelecimento_id(), + String nome = null; + if ( textFilterNameSeg.getText() != null ) + { + nome = ( ( String ) textFilterNameSeg.getText() ).trim(); + if ( nome.length() == 0 ) + { + nome = null; + } + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList seguimentoList = adp.searchAnalisesSeguimentoRH( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), nome, visitaDateStr, POR, - getSessionBean1().getCurrentUser().getResponsavel_loja() ); + getSessionBean1().getCurrentUser().getResponsavel_loja(), getSelectedYear() ); table2.setRendered( true ); - txtSearchMsg.setRendered( false ); - getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); - } - catch( Exception e ) - { + txtSearchMsg.setRendered( false ); + getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); + } + catch ( Exception e ) + { table2.setRendered( false ); - txtSearchMsg.setRendered( true ); - txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); + txtSearchMsg.setRendered( true ); + txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); ErrorLogger.logException( e ); - } + } return null; } - + + public void dropCurrentYear_valueChangeListener( ValueChangeEvent event ) + { + Object oldValue = event.getOldValue(); + Object newValue = event.getNewValue(); + + if ( newValue != null && newValue instanceof Integer ) + { + Integer newYear = ( Integer ) newValue; + Integer oldYear = oldValue != null && oldValue instanceof Integer ? ( Integer ) oldValue : null; + if ( oldYear == null || !newYear.equals( oldYear ) ) + { + fillInitialForm(); + } + } + } + + private Integer getSelectedYear() + { + Integer result = null; + if ( dropCurrentYear != null ) + { + Object selected = dropCurrentYear.getSelected(); + if ( selected != null && selected instanceof Integer ) + { + result = ( Integer ) selected; + } + } + return result; + } + + private void fillCurrentYearDrop() + { + Integer selectedYear = getSelectedYear(); + + Option[] opts = Utils.getYearDropValues(); + dropCurrentYear.setItems( opts ); + + dropCurrentYear.setSelected( selectedYear != null ? selectedYear : opts.length > 0 ? opts[ 0].getValue() : null ); + } } diff --git a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormSeguranca.java b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormSeguranca.java index db3dbb9a..0bb1bee8 100644 --- a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormSeguranca.java +++ b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/FormSeguranca.java @@ -58,1515 +58,1680 @@ import utils.Utils; * 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 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 HtmlPanelGrid getGridSeguimento() { - return gridSeguimento; - } + public Page getPage1() + { + return page1; + } - public void setGridSeguimento(HtmlPanelGrid hpg) { - this.gridSeguimento = hpg; - } + public void setPage1( Page p ) + { + this.page1 = p; + } + private Html html1 = new Html(); - private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); + public Html getHtml1() + { + return html1; + } - public HtmlPanelGrid getGridPanel2() { - return gridPanel2; - } + public void setHtml1( Html h ) + { + this.html1 = h; + } + private Head head1 = new Head(); - public void setGridPanel2(HtmlPanelGrid hpg) { - this.gridPanel2 = hpg; - } + public Head getHead1() + { + return head1; + } - private StaticText staticText2 = new StaticText(); + public void setHead1( Head h ) + { + this.head1 = h; + } + private Link link1 = new Link(); - public StaticText getStaticText2() { - return staticText2; - } + public Link getLink1() + { + return link1; + } - public void setStaticText2(StaticText st) { - this.staticText2 = st; - } + public void setLink1( Link l ) + { + this.link1 = l; + } + private Body body1 = new Body(); - private HtmlPanelGrid gridConcluidos = new HtmlPanelGrid(); + public Body getBody1() + { + return body1; + } - public HtmlPanelGrid getGridConcluidos() { - return gridConcluidos; - } + public void setBody1( Body b ) + { + this.body1 = b; + } + private Form form1 = new Form(); - public void setGridConcluidos(HtmlPanelGrid hpg) { - this.gridConcluidos = hpg; - } + public Form getForm1() + { + return form1; + } - private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); + public void setForm1( Form f ) + { + this.form1 = f; + } + private HtmlPanelGrid gridBase = new HtmlPanelGrid(); - public HtmlPanelGrid getGridPanel3() { - return gridPanel3; - } + public HtmlPanelGrid getGridBase() + { + return gridBase; + } - public void setGridPanel3(HtmlPanelGrid hpg) { - this.gridPanel3 = hpg; - } + public void setGridBase( HtmlPanelGrid hpg ) + { + this.gridBase = hpg; + } + private HtmlPanelGrid gridLayout = new HtmlPanelGrid(); - private StaticText staticText3 = new StaticText(); + public HtmlPanelGrid getGridLayout() + { + return gridLayout; + } - public StaticText getStaticText3() { - return staticText3; - } + public void setGridLayout( HtmlPanelGrid hpg ) + { + this.gridLayout = hpg; + } + private HtmlPanelGrid gridLayoutTop = new HtmlPanelGrid(); - public void setStaticText3(StaticText st) { - this.staticText3 = st; - } + public HtmlPanelGrid getGridLayoutTop() + { + return gridLayoutTop; + } - private Link link2 = new Link(); + public void setGridLayoutTop( HtmlPanelGrid hpg ) + { + this.gridLayoutTop = hpg; + } + private HtmlPanelGrid gridActual = new HtmlPanelGrid(); - public Link getLink2() { - return link2; - } + public HtmlPanelGrid getGridActual() + { + return gridActual; + } - public void setLink2(Link l) { - this.link2 = l; - } + public void setGridActual( HtmlPanelGrid hpg ) + { + this.gridActual = hpg; + } + private HtmlPanelGrid gridPanel1 = new HtmlPanelGrid(); - private Button butNovaAnalise = new Button(); + public HtmlPanelGrid getGridPanel1() + { + return gridPanel1; + } - public Button getButNovaAnalise() { - return butNovaAnalise; - } + public void setGridPanel1( HtmlPanelGrid hpg ) + { + this.gridPanel1 = hpg; + } + private StaticText staticText1 = new StaticText(); - public void setButNovaAnalise(Button b) { - this.butNovaAnalise = b; - } + public StaticText getStaticText1() + { + return staticText1; + } - private StaticText staticText4 = new StaticText(); + public void setStaticText1( StaticText st ) + { + this.staticText1 = st; + } + private HtmlPanelGrid gridSeguimento = new HtmlPanelGrid(); - public StaticText getStaticText4() { - return staticText4; - } + public HtmlPanelGrid getGridSeguimento() + { + return gridSeguimento; + } - public void setStaticText4(StaticText st) { - this.staticText4 = st; - } + public void setGridSeguimento( HtmlPanelGrid hpg ) + { + this.gridSeguimento = hpg; + } + private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid(); - private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); + public HtmlPanelGrid getGridPanel2() + { + return gridPanel2; + } - public HtmlPanelGrid getGridPanel4() { - return gridPanel4; - } + public void setGridPanel2( HtmlPanelGrid hpg ) + { + this.gridPanel2 = hpg; + } + private StaticText staticText2 = new StaticText(); - public void setGridPanel4(HtmlPanelGrid hpg) { - this.gridPanel4 = hpg; - } + public StaticText getStaticText2() + { + return staticText2; + } - private Table table1 = new Table(); + public void setStaticText2( StaticText st ) + { + this.staticText2 = st; + } + private HtmlPanelGrid gridConcluidos = new HtmlPanelGrid(); - public Table getTable1() { - return table1; - } + public HtmlPanelGrid getGridConcluidos() + { + return gridConcluidos; + } - public void setTable1(Table t) { - this.table1 = t; - } + public void setGridConcluidos( HtmlPanelGrid hpg ) + { + this.gridConcluidos = hpg; + } + private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid(); - private TableRowGroup tableRowGroup1 = new TableRowGroup(); + public HtmlPanelGrid getGridPanel3() + { + return gridPanel3; + } - public TableRowGroup getTableRowGroup1() { - return tableRowGroup1; - } + public void setGridPanel3( HtmlPanelGrid hpg ) + { + this.gridPanel3 = hpg; + } + private StaticText staticText3 = new StaticText(); - public void setTableRowGroup1(TableRowGroup trg) { - this.tableRowGroup1 = trg; - } + public StaticText getStaticText3() + { + return staticText3; + } - private TableColumn tableColumn1 = new TableColumn(); + public void setStaticText3( StaticText st ) + { + this.staticText3 = st; + } + private Link link2 = new Link(); - public TableColumn getTableColumn1() { - return tableColumn1; - } + public Link getLink2() + { + return link2; + } - public void setTableColumn1(TableColumn tc) { - this.tableColumn1 = tc; - } + public void setLink2( Link l ) + { + this.link2 = l; + } + private Button butNovaAnalise = new Button(); - private TableColumn tableColumn2 = new TableColumn(); + public Button getButNovaAnalise() + { + return butNovaAnalise; + } - public TableColumn getTableColumn2() { - return tableColumn2; - } + public void setButNovaAnalise( Button b ) + { + this.butNovaAnalise = b; + } + private StaticText staticText4 = new StaticText(); - public void setTableColumn2(TableColumn tc) { - this.tableColumn2 = tc; - } + public StaticText getStaticText4() + { + return staticText4; + } - private TableColumn tableColumn3 = new TableColumn(); + public void setStaticText4( StaticText st ) + { + this.staticText4 = st; + } + private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid(); - public TableColumn getTableColumn3() { - return tableColumn3; - } + public HtmlPanelGrid getGridPanel4() + { + return gridPanel4; + } - public void setTableColumn3(TableColumn tc) { - this.tableColumn3 = tc; - } + public void setGridPanel4( HtmlPanelGrid hpg ) + { + this.gridPanel4 = hpg; + } + private Table table1 = new Table(); - private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); + public Table getTable1() + { + return table1; + } - public HtmlPanelGrid getGridPanel5() { - return gridPanel5; - } + public void setTable1( Table t ) + { + this.table1 = t; + } + private TableRowGroup tableRowGroup1 = new TableRowGroup(); - public void setGridPanel5(HtmlPanelGrid hpg) { - this.gridPanel5 = hpg; - } + public TableRowGroup getTableRowGroup1() + { + return tableRowGroup1; + } - private Table table2 = new Table(); + public void setTableRowGroup1( TableRowGroup trg ) + { + this.tableRowGroup1 = trg; + } + private TableColumn tableColumn1 = new TableColumn(); - public Table getTable2() { - return table2; - } + public TableColumn getTableColumn1() + { + return tableColumn1; + } - public void setTable2(Table t) { - this.table2 = t; - } + public void setTableColumn1( TableColumn tc ) + { + this.tableColumn1 = tc; + } + private TableColumn tableColumn2 = new TableColumn(); - private TableRowGroup tableRowGroup2 = new TableRowGroup(); + public TableColumn getTableColumn2() + { + return tableColumn2; + } - public TableRowGroup getTableRowGroup2() { - return tableRowGroup2; - } + public void setTableColumn2( TableColumn tc ) + { + this.tableColumn2 = tc; + } + private TableColumn tableColumn3 = new TableColumn(); - public void setTableRowGroup2(TableRowGroup trg) { - this.tableRowGroup2 = trg; - } + public TableColumn getTableColumn3() + { + return tableColumn3; + } - private TableColumn tableColumn4 = new TableColumn(); + public void setTableColumn3( TableColumn tc ) + { + this.tableColumn3 = tc; + } + private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid(); - public TableColumn getTableColumn4() { - return tableColumn4; - } + public HtmlPanelGrid getGridPanel5() + { + return gridPanel5; + } - public void setTableColumn4(TableColumn tc) { - this.tableColumn4 = tc; - } + public void setGridPanel5( HtmlPanelGrid hpg ) + { + this.gridPanel5 = hpg; + } + private Table table2 = new Table(); - private TableColumn tableColumn5 = new TableColumn(); + public Table getTable2() + { + return table2; + } - public TableColumn getTableColumn5() { - return tableColumn5; - } + public void setTable2( Table t ) + { + this.table2 = t; + } + private TableRowGroup tableRowGroup2 = new TableRowGroup(); - public void setTableColumn5(TableColumn tc) { - this.tableColumn5 = tc; - } + public TableRowGroup getTableRowGroup2() + { + return tableRowGroup2; + } - private TableColumn tableColumn6 = new TableColumn(); + public void setTableRowGroup2( TableRowGroup trg ) + { + this.tableRowGroup2 = trg; + } + private TableColumn tableColumn4 = new TableColumn(); - public TableColumn getTableColumn6() { - return tableColumn6; - } + public TableColumn getTableColumn4() + { + return tableColumn4; + } - public void setTableColumn6(TableColumn tc) { - this.tableColumn6 = tc; - } + public void setTableColumn4( TableColumn tc ) + { + this.tableColumn4 = tc; + } + private TableColumn tableColumn5 = new TableColumn(); - private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); + public TableColumn getTableColumn5() + { + return tableColumn5; + } - public HtmlPanelGrid getGridPanel6() { - return gridPanel6; - } + public void setTableColumn5( TableColumn tc ) + { + this.tableColumn5 = tc; + } + private TableColumn tableColumn6 = new TableColumn(); - public void setGridPanel6(HtmlPanelGrid hpg) { - this.gridPanel6 = hpg; - } + public TableColumn getTableColumn6() + { + return tableColumn6; + } - private PanelGroup groupPanel1 = new PanelGroup(); + public void setTableColumn6( TableColumn tc ) + { + this.tableColumn6 = tc; + } + private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid(); - public PanelGroup getGroupPanel1() { - return groupPanel1; - } + public HtmlPanelGrid getGridPanel6() + { + return gridPanel6; + } - public void setGroupPanel1(PanelGroup pg) { - this.groupPanel1 = pg; - } + public void setGridPanel6( HtmlPanelGrid hpg ) + { + this.gridPanel6 = hpg; + } + private PanelGroup groupPanel1 = new PanelGroup(); - private StaticText staticText11 = new StaticText(); + public PanelGroup getGroupPanel1() + { + return groupPanel1; + } - public StaticText getStaticText11() { - return staticText11; - } + public void setGroupPanel1( PanelGroup pg ) + { + this.groupPanel1 = pg; + } + private StaticText staticText11 = new StaticText(); - public void setStaticText11(StaticText st) { - this.staticText11 = st; - } + public StaticText getStaticText11() + { + return staticText11; + } - private DropDown drpAno = new DropDown(); + public void setStaticText11( StaticText st ) + { + this.staticText11 = st; + } + private DropDown drpAno = new DropDown(); - public DropDown getDrpAno() { - return drpAno; - } + public DropDown getDrpAno() + { + return drpAno; + } - public void setDrpAno(DropDown dd) { - this.drpAno = dd; - } + public void setDrpAno( DropDown dd ) + { + this.drpAno = dd; + } + private PanelGroup groupPanel2 = new PanelGroup(); - private PanelGroup groupPanel2 = new PanelGroup(); + public PanelGroup getGroupPanel2() + { + return groupPanel2; + } - public PanelGroup getGroupPanel2() { - return groupPanel2; - } + public void setGroupPanel2( PanelGroup pg ) + { + this.groupPanel2 = pg; + } + private StaticText lblMes = new StaticText(); - public void setGroupPanel2(PanelGroup pg) { - this.groupPanel2 = pg; - } + public StaticText getLblMes() + { + return lblMes; + } - private StaticText lblMes = new StaticText(); + public void setLblMes( StaticText st ) + { + this.lblMes = st; + } + private DropDown drpMes = new DropDown(); - public StaticText getLblMes() { - return lblMes; - } + public DropDown getDrpMes() + { + return drpMes; + } - public void setLblMes(StaticText st) { - this.lblMes = st; - } + public void setDrpMes( DropDown dd ) + { + this.drpMes = dd; + } + private PanelGroup groupPanel3 = new PanelGroup(); - private DropDown drpMes = new DropDown(); + public PanelGroup getGroupPanel3() + { + return groupPanel3; + } - public DropDown getDrpMes() { - return drpMes; - } + public void setGroupPanel3( PanelGroup pg ) + { + this.groupPanel3 = pg; + } + private StaticText lblDia = new StaticText(); - public void setDrpMes(DropDown dd) { - this.drpMes = dd; - } + public StaticText getLblDia() + { + return lblDia; + } - private PanelGroup groupPanel3 = new PanelGroup(); + public void setLblDia( StaticText st ) + { + this.lblDia = st; + } + private DropDown drpDia = new DropDown(); - public PanelGroup getGroupPanel3() { - return groupPanel3; - } + public DropDown getDrpDia() + { + return drpDia; + } - public void setGroupPanel3(PanelGroup pg) { - this.groupPanel3 = pg; - } + public void setDrpDia( DropDown dd ) + { + this.drpDia = dd; + } + private PanelGroup groupPanel4 = new PanelGroup(); - private StaticText lblDia = new StaticText(); + public PanelGroup getGroupPanel4() + { + return groupPanel4; + } - public StaticText getLblDia() { - return lblDia; - } + public void setGroupPanel4( PanelGroup pg ) + { + this.groupPanel4 = pg; + } + private StaticText staticText14 = new StaticText(); - public void setLblDia(StaticText st) { - this.lblDia = st; - } + public StaticText getStaticText14() + { + return staticText14; + } - private DropDown drpDia = new DropDown(); + public void setStaticText14( StaticText st ) + { + this.staticText14 = st; + } + private TextField txtNome = new TextField(); - public DropDown getDrpDia() { - return drpDia; - } + public TextField getTxtNome() + { + return txtNome; + } - public void setDrpDia(DropDown dd) { - this.drpDia = dd; - } + public void setTxtNome( TextField tf ) + { + this.txtNome = tf; + } + private Button butPesquisar = new Button(); - private PanelGroup groupPanel4 = new PanelGroup(); + public Button getButPesquisar() + { + return butPesquisar; + } - public PanelGroup getGroupPanel4() { - return groupPanel4; - } + public void setButPesquisar( Button b ) + { + this.butPesquisar = b; + } + private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); - public void setGroupPanel4(PanelGroup pg) { - this.groupPanel4 = pg; - } + public HtmlPanelGrid getGridPanel7() + { + return gridPanel7; + } - private StaticText staticText14 = new StaticText(); + public void setGridPanel7( HtmlPanelGrid hpg ) + { + this.gridPanel7 = hpg; + } + private Table table3 = new Table(); - public StaticText getStaticText14() { - return staticText14; - } + public Table getTable3() + { + return table3; + } - public void setStaticText14(StaticText st) { - this.staticText14 = st; - } + public void setTable3( Table t ) + { + this.table3 = t; + } + private TableRowGroup tableRowGroup3 = new TableRowGroup(); - private TextField txtNome = new TextField(); + public TableRowGroup getTableRowGroup3() + { + return tableRowGroup3; + } - public TextField getTxtNome() { - return txtNome; - } + public void setTableRowGroup3( TableRowGroup trg ) + { + this.tableRowGroup3 = trg; + } + private TableColumn tableColumn7 = new TableColumn(); - public void setTxtNome(TextField tf) { - this.txtNome = tf; - } + public TableColumn getTableColumn7() + { + return tableColumn7; + } - private Button butPesquisar = new Button(); + public void setTableColumn7( TableColumn tc ) + { + this.tableColumn7 = tc; + } + private TableColumn tableColumn8 = new TableColumn(); - public Button getButPesquisar() { - return butPesquisar; - } + public TableColumn getTableColumn8() + { + return tableColumn8; + } - public void setButPesquisar(Button b) { - this.butPesquisar = b; - } + public void setTableColumn8( TableColumn tc ) + { + this.tableColumn8 = tc; + } + private TableColumn tableColumn9 = new TableColumn(); - private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid(); + public TableColumn getTableColumn9() + { + return tableColumn9; + } - public HtmlPanelGrid getGridPanel7() { - return gridPanel7; - } + public void setTableColumn9( TableColumn tc ) + { + this.tableColumn9 = tc; + } + private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); - public void setGridPanel7(HtmlPanelGrid hpg) { - this.gridPanel7 = hpg; - } + public HtmlPanelGrid getGridPanel8() + { + return gridPanel8; + } - private Table table3 = new Table(); + public void setGridPanel8( HtmlPanelGrid hpg ) + { + this.gridPanel8 = hpg; + } + private PanelGroup groupPanel5 = new PanelGroup(); - public Table getTable3() { - return table3; - } + public PanelGroup getGroupPanel5() + { + return groupPanel5; + } - public void setTable3(Table t) { - this.table3 = t; - } + public void setGroupPanel5( PanelGroup pg ) + { + this.groupPanel5 = pg; + } + private ImageComponent image1 = new ImageComponent(); - private TableRowGroup tableRowGroup3 = new TableRowGroup(); + public ImageComponent getImage1() + { + return image1; + } - public TableRowGroup getTableRowGroup3() { - return tableRowGroup3; - } + public void setImage1( ImageComponent ic ) + { + this.image1 = ic; + } + private ImageComponent image2 = new ImageComponent(); - public void setTableRowGroup3(TableRowGroup trg) { - this.tableRowGroup3 = trg; - } + public ImageComponent getImage2() + { + return image2; + } - private TableColumn tableColumn7 = new TableColumn(); + public void setImage2( ImageComponent ic ) + { + this.image2 = ic; + } + private Hyperlink lnkDataAcidente = new Hyperlink(); - public TableColumn getTableColumn7() { - return tableColumn7; - } + public Hyperlink getLnkDataAcidente() + { + return lnkDataAcidente; + } - public void setTableColumn7(TableColumn tc) { - this.tableColumn7 = tc; - } + public void setLnkDataAcidente( Hyperlink h ) + { + this.lnkDataAcidente = h; + } + private Hyperlink lnkNr = new Hyperlink(); - private TableColumn tableColumn8 = new TableColumn(); + public Hyperlink getLnkNr() + { + return lnkNr; + } - public TableColumn getTableColumn8() { - return tableColumn8; - } + public void setLnkNr( Hyperlink h ) + { + this.lnkNr = h; + } + private Hyperlink lnkNomeAcidentado = new Hyperlink(); - public void setTableColumn8(TableColumn tc) { - this.tableColumn8 = tc; - } + public Hyperlink getLnkNomeAcidentado() + { + return lnkNomeAcidentado; + } - private TableColumn tableColumn9 = new TableColumn(); + public void setLnkNomeAcidentado( Hyperlink h ) + { + this.lnkNomeAcidentado = h; + } + private Hyperlink lnkDataAcidenteSeg = new Hyperlink(); - public TableColumn getTableColumn9() { - return tableColumn9; - } + public Hyperlink getLnkDataAcidenteSeg() + { + return lnkDataAcidenteSeg; + } - public void setTableColumn9(TableColumn tc) { - this.tableColumn9 = tc; - } + public void setLnkDataAcidenteSeg( Hyperlink h ) + { + this.lnkDataAcidenteSeg = h; + } + private Hyperlink lnkNrSeg = new Hyperlink(); - private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid(); + public Hyperlink getLnkNrSeg() + { + return lnkNrSeg; + } - public HtmlPanelGrid getGridPanel8() { - return gridPanel8; - } + public void setLnkNrSeg( Hyperlink h ) + { + this.lnkNrSeg = h; + } + private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink(); - public void setGridPanel8(HtmlPanelGrid hpg) { - this.gridPanel8 = hpg; - } + public Hyperlink getLnkNomeAcidentadoSeg() + { + return lnkNomeAcidentadoSeg; + } - private PanelGroup groupPanel5 = new PanelGroup(); + public void setLnkNomeAcidentadoSeg( Hyperlink h ) + { + this.lnkNomeAcidentadoSeg = h; + } + private Hyperlink lnkDataConcluida = new Hyperlink(); - public PanelGroup getGroupPanel5() { - return groupPanel5; - } + public Hyperlink getLnkDataConcluida() + { + return lnkDataConcluida; + } - 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 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 lnkEstabelecimento = new Hyperlink(); - - public Hyperlink getLnkEstabelecimento() { - return lnkEstabelecimento; - } - - public void setLnkEstabelecimento(Hyperlink h) { - this.lnkEstabelecimento = h; - } - - private Hyperlink lnkFaseSeg = new Hyperlink(); - - public Hyperlink getLnkFaseSeg() { - return lnkFaseSeg; - } - - public void setLnkFaseSeg(Hyperlink h) { - this.lnkFaseSeg = h; - } - - private Hyperlink lnkEstabelecimentoSeg = new Hyperlink(); - - public Hyperlink getLnkEstabelecimentoSeg() { - return lnkEstabelecimentoSeg; - } - - public void setLnkEstabelecimentoSeg(Hyperlink h) { - this.lnkEstabelecimentoSeg = h; - } - - private TableColumn tableColumn12 = new TableColumn(); - - public TableColumn getTableColumn12() { - return tableColumn12; - } - - public void setTableColumn12(TableColumn tc) { - this.tableColumn12 = tc; - } - - private TableColumn tableColumn13 = new TableColumn(); - - public TableColumn getTableColumn13() { - return tableColumn13; - } - - public void setTableColumn13(TableColumn tc) { - this.tableColumn13 = tc; - } - - private TableColumn tableColumn14 = new TableColumn(); - - public TableColumn getTableColumn14() { - return tableColumn14; - } - - public void setTableColumn14(TableColumn tc) { - this.tableColumn14 = tc; - } - - private TableColumn tableColumn15 = new TableColumn(); - - public TableColumn getTableColumn15() { - return tableColumn15; - } - - public void setTableColumn15(TableColumn tc) { - this.tableColumn15 = tc; - } + public void setLnkDataConcluida( Hyperlink h ) + { + this.lnkDataConcluida = h; + } + private Hyperlink lnkNrConcluida = new Hyperlink(); - private Hyperlink lnkPor = new Hyperlink(); + public Hyperlink getLnkNrConcluida() + { + return lnkNrConcluida; + } - public Hyperlink getLnkPor() { - return lnkPor; - } + public void setLnkNrConcluida( Hyperlink h ) + { + this.lnkNrConcluida = h; + } + private Hyperlink lnkNomeConcluida = new Hyperlink(); - public void setLnkPor(Hyperlink h) { - this.lnkPor = h; - } + public Hyperlink getLnkNomeConcluida() + { + return lnkNomeConcluida; + } - private Hyperlink lnkPorSeg = new Hyperlink(); + public void setLnkNomeConcluida( Hyperlink h ) + { + this.lnkNomeConcluida = h; + } + private StaticText txtSearchMsg = new StaticText(); - public Hyperlink getLnkPorSeg() { - return lnkPorSeg; - } + public StaticText getTxtSearchMsg() + { + return txtSearchMsg; + } - public void setLnkPorSeg(Hyperlink h) { - this.lnkPorSeg = h; - } + public void setTxtSearchMsg( StaticText st ) + { + this.txtSearchMsg = st; + } + private TableColumn tableColumn10 = new TableColumn(); - private Hyperlink lnkPorConcluida = new Hyperlink(); + public TableColumn getTableColumn10() + { + return tableColumn10; + } - public Hyperlink getLnkPorConcluida() { - return lnkPorConcluida; - } + public void setTableColumn10( TableColumn tc ) + { + this.tableColumn10 = tc; + } + private TableColumn tableColumn11 = new TableColumn(); - public void setLnkPorConcluida(Hyperlink h) { - this.lnkPorConcluida = h; - } + public TableColumn getTableColumn11() + { + return tableColumn11; + } - private Hyperlink lnkEstabConcluida = new Hyperlink(); + public void setTableColumn11( TableColumn tc ) + { + this.tableColumn11 = tc; + } + private Hyperlink lnkFase = new Hyperlink(); - public Hyperlink getLnkEstabConcluida() { - return lnkEstabConcluida; - } + public Hyperlink getLnkFase() + { + return lnkFase; + } - public void setLnkEstabConcluida(Hyperlink h) { - this.lnkEstabConcluida = h; - } + public void setLnkFase( Hyperlink h ) + { + this.lnkFase = h; + } + private Hyperlink lnkEstabelecimento = new Hyperlink(); - private PanelGroup groupPanel7 = new PanelGroup(); + public Hyperlink getLnkEstabelecimento() + { + return lnkEstabelecimento; + } - public PanelGroup getGroupPanel7() { - return groupPanel7; - } + public void setLnkEstabelecimento( Hyperlink h ) + { + this.lnkEstabelecimento = h; + } + private Hyperlink lnkFaseSeg = new Hyperlink(); - public void setGroupPanel7(PanelGroup pg) { - this.groupPanel7 = pg; - } + public Hyperlink getLnkFaseSeg() + { + return lnkFaseSeg; + } - private StaticText staticText5 = new StaticText(); + public void setLnkFaseSeg( Hyperlink h ) + { + this.lnkFaseSeg = h; + } + private Hyperlink lnkEstabelecimentoSeg = new Hyperlink(); - public StaticText getStaticText5() { - return staticText5; - } + public Hyperlink getLnkEstabelecimentoSeg() + { + return lnkEstabelecimentoSeg; + } - public void setStaticText5(StaticText st) { - this.staticText5 = st; - } + public void setLnkEstabelecimentoSeg( Hyperlink h ) + { + this.lnkEstabelecimentoSeg = h; + } + private TableColumn tableColumn12 = new TableColumn(); - private TextField txtPor = new TextField(); + public TableColumn getTableColumn12() + { + return tableColumn12; + } - public TextField getTxtPor() { - return txtPor; - } + public void setTableColumn12( TableColumn tc ) + { + this.tableColumn12 = tc; + } + private TableColumn tableColumn13 = new TableColumn(); - public void setTxtPor(TextField tf) { - this.txtPor = tf; - } + public TableColumn getTableColumn13() + { + return tableColumn13; + } - private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid(); + public void setTableColumn13( TableColumn tc ) + { + this.tableColumn13 = tc; + } + private TableColumn tableColumn14 = new TableColumn(); - public HtmlPanelGrid getGridPanel9() { - return gridPanel9; - } + public TableColumn getTableColumn14() + { + return tableColumn14; + } - public void setGridPanel9(HtmlPanelGrid hpg) { - this.gridPanel9 = hpg; - } + public void setTableColumn14( TableColumn tc ) + { + this.tableColumn14 = tc; + } + private TableColumn tableColumn15 = new TableColumn(); - private PanelGroup groupPanel8 = new PanelGroup(); + public TableColumn getTableColumn15() + { + return tableColumn15; + } - public PanelGroup getGroupPanel8() { - return groupPanel8; - } + public void setTableColumn15( TableColumn tc ) + { + this.tableColumn15 = tc; + } + private Hyperlink lnkPor = new Hyperlink(); - public void setGroupPanel8(PanelGroup pg) { - this.groupPanel8 = pg; - } + public Hyperlink getLnkPor() + { + return lnkPor; + } - private StaticText staticText6 = new StaticText(); + public void setLnkPor( Hyperlink h ) + { + this.lnkPor = h; + } + private Hyperlink lnkPorSeg = new Hyperlink(); - public StaticText getStaticText6() { - return staticText6; - } + public Hyperlink getLnkPorSeg() + { + return lnkPorSeg; + } - public void setStaticText6(StaticText st) { - this.staticText6 = st; - } + public void setLnkPorSeg( Hyperlink h ) + { + this.lnkPorSeg = h; + } + private Hyperlink lnkPorConcluida = new Hyperlink(); - private ImageComponent image3 = new ImageComponent(); + public Hyperlink getLnkPorConcluida() + { + return lnkPorConcluida; + } - public ImageComponent getImage3() { - return image3; - } + public void setLnkPorConcluida( Hyperlink h ) + { + this.lnkPorConcluida = h; + } + private Hyperlink lnkEstabConcluida = new Hyperlink(); - public void setImage3(ImageComponent ic) { - this.image3 = ic; - } + public Hyperlink getLnkEstabConcluida() + { + return lnkEstabConcluida; + } - private StaticText staticText7 = new StaticText(); + public void setLnkEstabConcluida( Hyperlink h ) + { + this.lnkEstabConcluida = h; + } + private PanelGroup groupPanel7 = new PanelGroup(); - public StaticText getStaticText7() { - return staticText7; - } + public PanelGroup getGroupPanel7() + { + return groupPanel7; + } - public void setStaticText7(StaticText st) { - this.staticText7 = st; - } + public void setGroupPanel7( PanelGroup pg ) + { + this.groupPanel7 = pg; + } + private StaticText staticText5 = new StaticText(); - private StaticText staticText8 = new StaticText(); + public StaticText getStaticText5() + { + return staticText5; + } - public StaticText getStaticText8() { - return staticText8; - } + public void setStaticText5( StaticText st ) + { + this.staticText5 = st; + } + private TextField txtPor = new TextField(); - public void setStaticText8(StaticText st) { - this.staticText8 = st; - } + public TextField getTxtPor() + { + return txtPor; + } - private HtmlPanelGrid gridPanel10 = new HtmlPanelGrid(); + public void setTxtPor( TextField tf ) + { + this.txtPor = tf; + } + private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid(); - public HtmlPanelGrid getGridPanel10() { - return gridPanel10; - } + public HtmlPanelGrid getGridPanel9() + { + return gridPanel9; + } - public void setGridPanel10(HtmlPanelGrid hpg) { - this.gridPanel10 = hpg; - } + public void setGridPanel9( HtmlPanelGrid hpg ) + { + this.gridPanel9 = hpg; + } + private PanelGroup groupPanel8 = new PanelGroup(); - private StaticText txtMsg = new StaticText(); + public PanelGroup getGroupPanel8() + { + return groupPanel8; + } - public StaticText getTxtMsg() { - return txtMsg; - } + public void setGroupPanel8( PanelGroup pg ) + { + this.groupPanel8 = pg; + } + private StaticText staticText6 = new StaticText(); - public void setTxtMsg(StaticText st) { - this.txtMsg = st; - } + public StaticText getStaticText6() + { + return staticText6; + } - private TableColumn tableColumn16 = new TableColumn(); + public void setStaticText6( StaticText st ) + { + this.staticText6 = st; + } + private ImageComponent image3 = new ImageComponent(); - public TableColumn getTableColumn16() { - return tableColumn16; - } + public ImageComponent getImage3() + { + return image3; + } - public void setTableColumn16(TableColumn tc) { - this.tableColumn16 = tc; - } + public void setImage3( ImageComponent ic ) + { + this.image3 = ic; + } + private StaticText staticText7 = new StaticText(); - private Hyperlink lnkDataAbertura = new Hyperlink(); + public StaticText getStaticText7() + { + return staticText7; + } - public Hyperlink getLnkDataAbertura() { - return lnkDataAbertura; - } + public void setStaticText7( StaticText st ) + { + this.staticText7 = st; + } + private StaticText staticText8 = new StaticText(); - public void setLnkDataAbertura(Hyperlink h) { - this.lnkDataAbertura = h; - } + public StaticText getStaticText8() + { + return staticText8; + } - private TableColumn tableColumn17 = new TableColumn(); + public void setStaticText8( StaticText st ) + { + this.staticText8 = st; + } + private HtmlPanelGrid gridPanel10 = new HtmlPanelGrid(); - public TableColumn getTableColumn17() { - return tableColumn17; - } + public HtmlPanelGrid getGridPanel10() + { + return gridPanel10; + } - public void setTableColumn17(TableColumn tc) { - this.tableColumn17 = tc; - } + public void setGridPanel10( HtmlPanelGrid hpg ) + { + this.gridPanel10 = hpg; + } + private StaticText txtMsg = new StaticText(); - private Hyperlink lnkDataAberturaSeg = new Hyperlink(); + public StaticText getTxtMsg() + { + return txtMsg; + } - public Hyperlink getLnkDataAberturaSeg() { - return lnkDataAberturaSeg; - } + public void setTxtMsg( StaticText st ) + { + this.txtMsg = st; + } + private TableColumn tableColumn16 = new TableColumn(); - public void setLnkDataAberturaSeg(Hyperlink h) { - this.lnkDataAberturaSeg = h; - } + public TableColumn getTableColumn16() + { + return tableColumn16; + } - private TableColumn tableColumn18 = new TableColumn(); + public void setTableColumn16( TableColumn tc ) + { + this.tableColumn16 = tc; + } + private Hyperlink lnkDataAbertura = new Hyperlink(); - public TableColumn getTableColumn18() { - return tableColumn18; - } + public Hyperlink getLnkDataAbertura() + { + return lnkDataAbertura; + } - public void setTableColumn18(TableColumn tc) { - this.tableColumn18 = tc; - } + public void setLnkDataAbertura( Hyperlink h ) + { + this.lnkDataAbertura = h; + } + private TableColumn tableColumn17 = new TableColumn(); + public TableColumn getTableColumn17() + { + return tableColumn17; + } - private TableColumn tableColumn19 = new TableColumn(); + public void setTableColumn17( TableColumn tc ) + { + this.tableColumn17 = tc; + } + private Hyperlink lnkDataAberturaSeg = new Hyperlink(); - public TableColumn getTableColumn19() { - return tableColumn19; - } + public Hyperlink getLnkDataAberturaSeg() + { + return lnkDataAberturaSeg; + } - public void setTableColumn19(TableColumn tc) { - this.tableColumn19 = tc; - } + public void setLnkDataAberturaSeg( Hyperlink h ) + { + this.lnkDataAberturaSeg = h; + } + private TableColumn tableColumn18 = new TableColumn(); - private TableColumn tableColumn20 = new TableColumn(); + public TableColumn getTableColumn18() + { + return tableColumn18; + } - public TableColumn getTableColumn20() { - return tableColumn20; - } + public void setTableColumn18( TableColumn tc ) + { + this.tableColumn18 = tc; + } + private TableColumn tableColumn19 = new TableColumn(); - public void setTableColumn20(TableColumn tc) { - this.tableColumn20 = tc; - } + public TableColumn getTableColumn19() + { + return tableColumn19; + } - private Hyperlink lnkDataAberturaConcluida = new Hyperlink(); + public void setTableColumn19( TableColumn tc ) + { + this.tableColumn19 = tc; + } + private TableColumn tableColumn20 = new TableColumn(); - public Hyperlink getLnkDataAberturaConcluida() { - return lnkDataAberturaConcluida; - } + public TableColumn getTableColumn20() + { + return tableColumn20; + } - public void setLnkDataAberturaConcluida(Hyperlink h) { - this.lnkDataAberturaConcluida = h; - } - private StaticText lblUser = new StaticText(); + public void setTableColumn20( TableColumn tc ) + { + this.tableColumn20 = tc; + } + private Hyperlink lnkDataAberturaConcluida = new Hyperlink(); - public StaticText getLblUser() { - return lblUser; - } + public Hyperlink getLnkDataAberturaConcluida() + { + return lnkDataAberturaConcluida; + } - public void setLblUser(StaticText st) { - this.lblUser = st; - } - private Hyperlink lnkPlanosActuacao = new Hyperlink(); + public void setLnkDataAberturaConcluida( Hyperlink h ) + { + this.lnkDataAberturaConcluida = h; + } + private StaticText lblUser = new StaticText(); - public Hyperlink getLnkPlanosActuacao() { - return lnkPlanosActuacao; - } + public StaticText getLblUser() + { + return lblUser; + } - public void setLnkPlanosActuacao(Hyperlink h) { - this.lnkPlanosActuacao = h; - } + public void setLblUser( StaticText st ) + { + this.lblUser = st; + } + private Hyperlink lnkPlanosActuacao = new Hyperlink(); + public Hyperlink getLnkPlanosActuacao() + { + return lnkPlanosActuacao; + } + public void setLnkPlanosActuacao( Hyperlink h ) + { + this.lnkPlanosActuacao = h; + } private HtmlPanelGrid gridPanelFilterSeg = new HtmlPanelGrid(); + public HtmlPanelGrid getGridPanelFilterSeg() { return this.gridPanelFilterSeg; } + public void setGridPanelFilterSeg( HtmlPanelGrid pg ) { this.gridPanelFilterSeg = pg; } - private PanelGroup groupPanelFilterSeg = new PanelGroup(); + public PanelGroup getGroupPanelFilterSeg() { return this.groupPanelFilterSeg; } + public void setGroupPanelFilterSeg( PanelGroup pg ) { this.groupPanelFilterSeg = pg; } - private StaticText labelFilterNameSeg = new StaticText(); + public StaticText getLabelFilterNameSeg() { return this.labelFilterNameSeg; } + public void setLabelFilterNameSeg( StaticText st ) { this.labelFilterNameSeg = st; } - private TextField textFilterNameSeg = new TextField(); + public TextField getTextFilterNameSeg() { return this.textFilterNameSeg; } + public void setTextFilterNameSeg( TextField tf ) { this.textFilterNameSeg = tf; } - private com.sun.rave.web.ui.component.Calendar calFilterDateSeg = new com.sun.rave.web.ui.component.Calendar(); + public com.sun.rave.web.ui.component.Calendar getCalFilterDateSeg() { return this.calFilterDateSeg; } + public void setCalFilterDateSeg( com.sun.rave.web.ui.component.Calendar c ) { this.calFilterDateSeg = c; } - private TextField textFilterPORSeg = new TextField(); - public TextField getTextFilterPORSeg() { + public TextField getTextFilterPORSeg() + { return textFilterPORSeg; } - public void setTextFilterPORSeg(TextField textFilterPORSeg) { + public void setTextFilterPORSeg( TextField textFilterPORSeg ) + { this.textFilterPORSeg = textFilterPORSeg; } - - private Button buttonFilterSeg = new Button(); + public Button getButtonFilterSeg() { return this.buttonFilterSeg; } + public void setButtonFilterSeg( Button b ) { this.buttonFilterSeg = b; } - - private HtmlPanelGrid gridPanelFilterActual = new HtmlPanelGrid(); + public HtmlPanelGrid getGridPanelFilterActual() { return this.gridPanelFilterActual; } + public void setGridPanelFilterActual( HtmlPanelGrid pg ) { this.gridPanelFilterActual = pg; } - private PanelGroup groupPanelFilterActual = new PanelGroup(); + public PanelGroup getGroupPanelFilterActual() { return this.groupPanelFilterActual; } + public void setGroupPanelFilterActual( PanelGroup pg ) { this.groupPanelFilterActual = pg; } - private StaticText labelFilterNameActual = new StaticText(); + public StaticText getLabelFilterNameActual() { return this.labelFilterNameActual; } + public void setLabelFilterNameActual( StaticText st ) { this.labelFilterNameActual = st; } - private TextField textFilterNameActual = new TextField(); + public TextField getTextFilterNameActual() { return this.textFilterNameActual; } + public void setTextFilterNameActual( TextField tf ) { this.textFilterNameActual = tf; } - private com.sun.rave.web.ui.component.Calendar calFilterDateActual = new com.sun.rave.web.ui.component.Calendar(); + public com.sun.rave.web.ui.component.Calendar getCalFilterDateActual() { return this.calFilterDateActual; } + public void setCalFilterDateActual( com.sun.rave.web.ui.component.Calendar c ) { this.calFilterDateActual = c; } - private TextField textFilterPORActual = new TextField(); - public TextField getTextFilterPORActual() { + public TextField getTextFilterPORActual() + { return textFilterPORActual; } - public void setTextFilterPORActual(TextField textFilterPORActual) { + public void setTextFilterPORActual( TextField textFilterPORActual ) + { this.textFilterPORActual = textFilterPORActual; } - - private Button buttonFilterActual = new Button(); + public Button getButtonFilterActual() { return this.buttonFilterActual; } + public void setButtonFilterActual( Button b ) { this.buttonFilterActual = b; } + private DropDown dropCurrentYear = new DropDown(); + public DropDown getDropCurrentYear() + { + return dropCurrentYear; + } + + public void setDropCurrentYear( DropDown dropCurrentYear ) + { + this.dropCurrentYear = dropCurrentYear; + } private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" ); - //
- - /** - *

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() { - System.out.println("=== FORM_SEGURANCA ==="); - lblUser.setText( getSessionBean1().getCurrentUser().getLogin()); - String responsavel_loja = getSessionBean1().getCurrentUser().getResponsavel_loja(); - if(responsavel_loja.matches("n")) - { - lnkPlanosActuacao.setDisabled(true); - } - - - HttpServletRequest request = (HttpServletRequest) getExternalContext().getRequest(); - String referer = request.getRequestURI(); - String pageFrom = Utils.getPageFrom(referer); - if( ! pageFrom.matches( "FormSeguranca.jsp" ) ) - { - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - //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(), responsavel_loja ); - getSessionBean1().getAnalisesActualDataProvider().setList(actuaisList); - } - catch(Exception ex) - { - //lblActivos.setRendered(false); - table1.setRendered(false); - ErrorLogger.logException( ex ); - } - - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - //lblActivos.setRendered(true); - table2.setRendered( true ); - - ArrayList seguimentoList = adp.getAnalisesSeguimentoSegList( - getSessionBean1().getCurrentUser().getEstabelecimento_id(), responsavel_loja ); - getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); - } - catch(Exception ex) - { - //lblActivos.setRendered(false); - table2.setRendered(false); - ErrorLogger.logException( ex ); - } - - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - //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); - ErrorLogger.logException( ex ); - } - fillAnoDropDown(); - } - 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() { - } - - + //
+ + /** + *

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.

+ */ + @Override + public void init() + { + // Perform initializations inherited from our superclass + super.init(); + // Perform application initialization that must complete + // *before* managed components are initialized + + // + // 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 + + 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.

+ */ + @Override + public void preprocess() + { + } + + private void fillInitialForm() + { + Integer fromYear = getSelectedYear(); + String responsavel_loja = getSessionBean1().getCurrentUser().getResponsavel_loja(); + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + table1.setRendered( true ); + + ArrayList actuaisList = adp.getAnalisesActuaisSegList( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), responsavel_loja, fromYear ); + getSessionBean1().getAnalisesActualDataProvider().setList( actuaisList ); + } + catch ( Exception ex ) + { + table1.setRendered( false ); + ErrorLogger.logException( ex ); + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + table2.setRendered( true ); + + ArrayList seguimentoList = adp.getAnalisesSeguimentoSegList( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), responsavel_loja, fromYear ); + getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); + } + catch ( Exception ex ) + { + table2.setRendered( false ); + ErrorLogger.logException( ex ); + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + table3.setRendered( true ); + + ArrayList concluidasList = adp.getAnalisesConcluidasList( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), fromYear ); + getSessionBean1().getAnalisesConcluidasDataProvider().setList( concluidasList ); + } + catch ( Exception ex ) + { + table3.setRendered( false ); + ErrorLogger.logException( ex ); + } + } + + /** + *

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.

+ */ + @Override + public void prerender() + { + System.out.println( "=== FORM_SEGURANCA ===" ); + lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); + String responsavel_loja = getSessionBean1().getCurrentUser().getResponsavel_loja(); + if ( responsavel_loja.matches( "n" ) ) + { + lnkPlanosActuacao.setDisabled( true ); + } + + HttpServletRequest request = ( HttpServletRequest ) getExternalContext().getRequest(); + String referer = request.getRequestURI(); + String pageFrom = Utils.getPageFrom( referer ); + if ( !pageFrom.matches( "FormSeguranca.jsp" ) ) + { + fillCurrentYearDrop(); + fillInitialForm(); + fillAnoDropDown(); + } + 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).

+ */ + @Override + public void destroy() + { + } + // private void fillDateDropDowns() // { // fillAnoDropDown(); // //fillMesDropDown(); // //fillDiaDropDown(); // } - - private void fillAnoDropDown() - { + private void fillAnoDropDown() + { // ArrayList anosList = new ArrayList(); // for(int ano=2007; ano<2051; ano++) // { // anosList.add(new Integer(ano)); // } - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - ArrayList anosList = adp.getAnosListFromAnalises(); - 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) ); - - } - catch(Exception ex) - { - ErrorLogger.logException( ex ); - } - - } - - 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() + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList anosList = adp.getAnosListFromAnalises(); + 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) ); + + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } + + } + + 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; dia < dias + 1; dia++ ) + { + diasList.add( new Integer( dia ) ); + } + com.sun.rave.web.ui.model.Option[] diaOptions = new com.sun.rave.web.ui.model.Option[ diasList.size() + 1 ]; + ListIterator iter = diasList.listIterator(); + diaOptions[0] = new Option( "", "" ); + int j = 1; + while ( iter.hasNext() ) + { + Integer dia = ( Integer ) iter.next(); + + diaOptions[j] = new Option( dia, dia.toString() ); + j++; + } + getSessionBean1().setDiaOptions( diaOptions ); + Calendar cal = new GregorianCalendar(); + int day = cal.get( Calendar.DAY_OF_MONTH ); + drpDia.setSelected( new Integer( 0 ) ); + } + + /** + *

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() { Utils.doLogout( getExternalContext(), true ); - return null; - } - - 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(); - } - } + return null; + } + + public void drpAno_processValueChange( ValueChangeEvent event ) + { + 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 ) + { + Object mes = event.getNewValue(); + if ( mes == null ) + { + lblDia.setVisible( false ); + drpDia.setVisible( false ); + } + else + { + lblDia.setVisible( true ); + drpDia.setVisible( true ); + fillDiaDropDown(); + } + } public String buttonFilterActual_action() { @@ -1587,37 +1752,37 @@ public class FormSeguranca extends AbstractPageBean { } } - String nome = null; - if ( textFilterNameActual.getText() != null ) - { - nome = (( String ) textFilterNameActual.getText()).trim(); - if( nome.length() == 0 ) - { - nome = null; - } - } - - - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - ArrayList actualList = adp.searchAnalisesActualSeg( - getSessionBean1().getCurrentUser().getEstabelecimento_id(), + String nome = null; + if ( textFilterNameActual.getText() != null ) + { + nome = ( ( String ) textFilterNameActual.getText() ).trim(); + if ( nome.length() == 0 ) + { + nome = null; + } + } + + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList actualList = adp.searchAnalisesActualSeg( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), nome, visitaDateStr, POR, - getSessionBean1().getCurrentUser().getResponsavel_loja() ); + getSessionBean1().getCurrentUser().getResponsavel_loja(), getSelectedYear() ); table1.setRendered( true ); - txtSearchMsg.setRendered( false ); - getSessionBean1().getAnalisesActualDataProvider().setList( actualList ); - } - catch( Exception e ) - { + txtSearchMsg.setRendered( false ); + getSessionBean1().getAnalisesActualDataProvider().setList( actualList ); + } + catch ( Exception e ) + { table1.setRendered( false ); - txtSearchMsg.setRendered( true ); - txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); + txtSearchMsg.setRendered( true ); + txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); ErrorLogger.logException( e ); - } + } return null; } @@ -1641,357 +1806,340 @@ public class FormSeguranca extends AbstractPageBean { } } - String nome = null; - if ( textFilterNameSeg.getText() != null ) - { - nome = (( String ) textFilterNameSeg.getText()).trim(); - if( nome.length() == 0 ) - { - nome = null; - } - } - - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - ArrayList seguimentoList = adp.searchAnalisesSeguimentoSeg( - getSessionBean1().getCurrentUser().getEstabelecimento_id(), + String nome = null; + if ( textFilterNameSeg.getText() != null ) + { + nome = ( ( String ) textFilterNameSeg.getText() ).trim(); + if ( nome.length() == 0 ) + { + nome = null; + } + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + + ArrayList seguimentoList = adp.searchAnalisesSeguimentoSeg( + getSessionBean1().getCurrentUser().getEstabelecimento_id(), nome, visitaDateStr, POR, - getSessionBean1().getCurrentUser().getResponsavel_loja() ); + getSessionBean1().getCurrentUser().getResponsavel_loja(), getSelectedYear() ); table2.setRendered( true ); - txtSearchMsg.setRendered( false ); - getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); - } - catch( Exception e ) - { + txtSearchMsg.setRendered( false ); + getSessionBean1().getAnalisesSeguimentoDataProvider().setList( seguimentoList ); + } + catch ( Exception e ) + { table2.setRendered( false ); - txtSearchMsg.setRendered( true ); - txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); + txtSearchMsg.setRendered( true ); + txtSearchMsg.setText( "Não foram encontrados registos para a sua pesquisa !" ); ErrorLogger.logException( e ); - } + } return null; } - 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) - { - ErrorLogger.logException( ex ); - } - - 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 por = null; - if(txtPor.getText() != null) - { - por = (String) txtPor.getText(); - if(por.trim().length() == 0) - { - por = null; - } - } - - - String nome = null; - if(txtNome.getText() != null) - { - nome = (String) txtNome.getText(); - if(nome.trim().length() == 0) - { - nome = null; - } - } - - try - { - AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); - - //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList()); - ArrayList concluidasList = adp.searchAanalisesConcluidasList( + public String butPesquisar_action() + { + Object obAno = null; + Object obMes = null; + Object obDia = null; + try + { + obAno = drpAno.getSelected(); + obMes = drpMes.getSelected(); + obDia = drpDia.getSelected(); + } + catch ( Exception ex ) + { + ErrorLogger.logException( ex ); + } + + 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 por = null; + if ( txtPor.getText() != null ) + { + por = ( String ) txtPor.getText(); + if ( por.trim().length() == 0 ) + { + por = null; + } + } + + + String nome = null; + if ( txtNome.getText() != null ) + { + nome = ( String ) txtNome.getText(); + if ( nome.trim().length() == 0 ) + { + nome = null; + } + } + + try + { + AnalisesDataProvider adp = AnalisesDataProvider.getInstance(); + ArrayList concluidasList = adp.searchAnalisesConcluidasList( getSessionBean1().getCurrentUser().getEstabelecimento_id(), - ano, mes, dia, por, nome, null ); - - 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 !"); - ErrorLogger.logException( ex ); - } - - return null; - } - - public void drpDia_processValueChange(ValueChangeEvent vce) { - // TODO: Replace with your code - - } - + ano, mes, dia, por, nome, null, getSelectedYear() ); + + 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 !" ); + ErrorLogger.logException( ex ); + } + + return null; + } + + public void drpDia_processValueChange( ValueChangeEvent vce ) + { + } + // private String getPageFrom(String referer) // { // String pageFrom = referer.substring(referer.lastIndexOf("/")+1); // return pageFrom; // } + public String butNovaAnalise_action() + { + getSessionBean1().setNavFrom( "FormSeguranca" ); + getSessionBean1().setCurrentAnalise( null ); + return "analise_acidente"; + } + + public String lnkDataAcidente_action() + { + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormSeguranca" ); + return "analise_acidente"; + } + + public String lnkDataAbertura_action() + { + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormSeguranca" ); + return "analise_acidente"; + } + + public String lnkNr_action() + { + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormSeguranca" ); + return "analise_acidente"; + } + + public String lnkNomeAcidentado_action() + { + 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() + { + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormSeguranca" ); + return "view_analise"; + } + + public String lnkDataAberturaSeg_action() + { + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormSeguranca" ); + return "view_analise"; + } + + public String lnkNrSeg_action() + { + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormSeguranca" ); + return "view_analise"; + } + + public String lnkNomeAcidentadoSeg_action() + { + 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() + { + System.out.println( "EDIT USER" ); + getSessionBean1().setNavFrom( "FormSeguranca" ); + getSessionBean1().setModoEdicaoUtilizador( "edit" ); + return "user"; + } + + public String lnkDataConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormSeguranca" ); + return "view_analise"; + } - 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 lnkDataAbertura_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 lnkDataAberturaSeg_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() { - System.out.println("EDIT USER"); - // 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 lnkDataAberturaConcluida_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 lnkEstabelecimento_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"; - } - - public String lnkEstabelecimentoSeg_action() { - // TODO: Replace with your code - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormSeguranca"); - return "view_analise"; - } - - public String lnkPor_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableActivosRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormSeguranca"); - return "analise_acidente"; } - - public String lnkPorSeg_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableSeguimentoRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormSeguranca"); - return "view_analise"; - } - - public String lnkPorConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormSeguranca"); - return "view_analise"; - } - - public String lnkEstabConcluida_action() { - // TODO: Replace with your code - - AnaliseAcidente a = getTableConcluidasRowData(); - getSessionBean1().setCurrentAnalise(a); - getSessionBean1().setNavFrom("FormSeguranca"); - return "view_analise"; - } - - public String lnkNewUser_action() { - // TODO: Replace with your code - - return null; - } - - public String lnkAjuda_action() { - System.out.println("AJUDA"); -// // TODO: Replace with your code + public String lnkDataAberturaConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormSeguranca" ); + return "view_analise"; + } + + public String lnkNrConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormSeguranca" ); + return "view_analise"; + } + + public String lnkNomeConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormSeguranca" ); + return "view_analise"; + } + + public String lnkFase_action() + { + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormSeguranca" ); + return "analise_acidente"; + } + + public String lnkEstabelecimento_action() + { + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormSeguranca" ); + return "analise_acidente"; + } + + public String lnkFaseSeg_action() + { + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormSeguranca" ); + return "view_analise"; + } + + public String lnkEstabelecimentoSeg_action() + { + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormSeguranca" ); + return "view_analise"; + } + + public String lnkPor_action() + { + AnaliseAcidente a = getTableActivosRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormSeguranca" ); + return "analise_acidente"; + } + + public String lnkPorSeg_action() + { + AnaliseAcidente a = getTableSeguimentoRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormSeguranca" ); + return "view_analise"; + } + + public String lnkPorConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormSeguranca" ); + return "view_analise"; + } + + public String lnkEstabConcluida_action() + { + AnaliseAcidente a = getTableConcluidasRowData(); + getSessionBean1().setCurrentAnalise( a ); + getSessionBean1().setNavFrom( "FormSeguranca" ); + return "view_analise"; + } + + public String lnkNewUser_action() + { + return null; + } + + public String lnkAjuda_action() + { + System.out.println( "AJUDA" ); // ServletContext theApplicationsServletContext = // (ServletContext) this.getExternalContext().getContext(); // String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL); @@ -2007,45 +2155,44 @@ public class FormSeguranca extends AbstractPageBean { // ErrorLogger.logException( ex ); // return null; // } - return null; - } - - private void showPdf(String pdfFilePath) throws Exception - { - - File pdfFile = new File(pdfFilePath); - FileInputStream fis = new FileInputStream(pdfFile); - byte[] buf = new byte[(int)pdfFile.length()]; - while ((fis.read(buf)) > 0) - { - //fos.write(buf, 0, buf.length); - } - fis.close(); - FacesContext ctx = FacesContext.getCurrentInstance(); - if (!ctx.getResponseComplete()) - { - HttpServletResponse response = (HttpServletResponse)ctx.getExternalContext().getResponse(); - String contentType = "application/pdf"; - response.setContentType(contentType); - response.setHeader("Content-Disposition","attachment;filename=\"" + "Ajuda.pdf" + "\""); - - ServletOutputStream out = response.getOutputStream(); - - //out.write(model.getInfo().getBytes()); - out.write(buf, 0, buf.length); - out.flush(); - out.close(); - ctx.responseComplete(); - ctx.release(); - } - } - - public String lnkPlanosActuacao_action() { - // TODO: Replace with your code - Utilizador u = getSessionBean1().getCurrentUser(); + return null; + } + + private void showPdf( String pdfFilePath ) throws Exception + { + File pdfFile = new File( pdfFilePath ); + FileInputStream fis = new FileInputStream( pdfFile ); + byte[] buf = new byte[ ( int ) pdfFile.length() ]; + while ( ( fis.read( buf ) ) > 0 ) + { + //fos.write(buf, 0, buf.length); + } + fis.close(); + FacesContext ctx = FacesContext.getCurrentInstance(); + if ( !ctx.getResponseComplete() ) + { + HttpServletResponse response = ( HttpServletResponse ) ctx.getExternalContext().getResponse(); + String contentType = "application/pdf"; + response.setContentType( contentType ); + response.setHeader( "Content-Disposition", "attachment;filename=\"" + "Ajuda.pdf" + "\"" ); + + ServletOutputStream out = response.getOutputStream(); + + //out.write(model.getInfo().getBytes()); + out.write( buf, 0, buf.length ); + out.flush(); + out.close(); + ctx.responseComplete(); + ctx.release(); + } + } + + public String lnkPlanosActuacao_action() + { + Utilizador u = getSessionBean1().getCurrentUser(); // String curUser = "?user=" + u.getId().toString(); - FacesContext fc = getFacesContext().getCurrentInstance(); - Global.redirectToPlanos(fc, u); + FacesContext fc = getFacesContext().getCurrentInstance(); + Global.redirectToPlanos( fc, u ); // Utilizador u = getSessionBean1().getCurrentUser(); // String curUser = "?user=" + u.getId().toString(); // FacesContext fc = getFacesContext().getCurrentInstance(); @@ -2057,12 +2204,52 @@ public class FormSeguranca extends AbstractPageBean { // { // // } - return null; - } - - public String lnkAnalisesAcidente_action() { - return null; - } + return null; + } + public String lnkAnalisesAcidente_action() + { + return null; + } + + public void dropCurrentYear_valueChangeListener( ValueChangeEvent event ) + { + Object oldValue = event.getOldValue(); + Object newValue = event.getNewValue(); + + if ( newValue != null && newValue instanceof Integer ) + { + Integer newYear = ( Integer ) newValue; + Integer oldYear = oldValue != null && oldValue instanceof Integer ? ( Integer ) oldValue : null; + if ( oldYear == null || !newYear.equals( oldYear ) ) + { + fillInitialForm(); + } + } + } + + private Integer getSelectedYear() + { + Integer result = null; + if ( dropCurrentYear != null ) + { + Object selected = dropCurrentYear.getSelected(); + if ( selected != null && selected instanceof Integer ) + { + result = ( Integer ) selected; + } + } + return result; + } + + private void fillCurrentYearDrop() + { + Integer selectedYear = getSelectedYear(); + + Option[] opts = Utils.getYearDropValues(); + dropCurrentYear.setItems( opts ); + + dropCurrentYear.setSelected( selectedYear != null ? selectedYear : opts.length > 0 ? opts[ 0].getValue() : null ); + } } diff --git a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/GestaoUtilizadores.java b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/GestaoUtilizadores.java index 7af0eff2..cc35dec5 100644 --- a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/GestaoUtilizadores.java +++ b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/GestaoUtilizadores.java @@ -49,7 +49,8 @@ import utils.Utils; * lifecycle methods and event handlers where you may add behavior * to respond to incoming events.

*/ -public class GestaoUtilizadores extends AbstractPageBean { +public class GestaoUtilizadores extends AbstractPageBean +{ // private int __placeholder; @@ -793,12 +794,13 @@ public class GestaoUtilizadores extends AbstractPageBean { * values submitted with this request. Instead, they represent the * property values that were saved for this view when it was rendered.

*/ - public void init() { + @Override + 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 @@ -813,14 +815,18 @@ public class GestaoUtilizadores extends AbstractPageBean { // // 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 . . . - } - } + + if ( ! getSessionBean1().isLoggedIn() ) + { + try + { + getExternalContext().redirect("Login.jsp"); + } + catch ( Exception e ) + { + // . . . handle exception . . . + } + } else { lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); @@ -963,13 +969,13 @@ public class GestaoUtilizadores extends AbstractPageBean { /** *

Return a reference to the scoped data bean.

*/ - protected ApplicationBean1 getApplicationBean1() { + protected ApplicationBean1 getApplicationBean1() + { return (ApplicationBean1)getBean("ApplicationBean1"); } - public String lnkEditUser_action() { - // TODO: Replace with your code - + public String lnkEditUser_action() + { getSessionBean1().setNavFrom("GestaoUtilizadores"); getSessionBean1().setModoEdicaoUtilizador("edit"); return "user"; @@ -979,88 +985,75 @@ public class GestaoUtilizadores extends AbstractPageBean { { Utils.doLogout( getExternalContext(), true ); return null; - } - 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. - + public String butNovaAnalise_action() + { return null; } - public String lnkDataAcidente_action() { - // TODO: Replace with your code - + public String lnkDataAcidente_action() + { return null; } - public String lnkNr_action() { - // TODO: Replace with your code - + public String lnkNr_action() + { return null; } - public String lnkPor_action() { - // TODO: Replace with your code - + public String lnkPor_action() + { return null; } - public String lnkNomeAcidentado_action() { - // TODO: Replace with your code - + public String lnkNomeAcidentado_action() + { return null; } - public String lnkFase_action() { - // TODO: Replace with your code - + public String lnkFase_action() + { return null; } - public String lnkDataAcidenteSeg_action() { - // TODO: Replace with your code - + public String lnkDataAcidenteSeg_action() + { return null; } - public String lnkNrSeg_action() { - // TODO: Replace with your code - + public String lnkNrSeg_action() + { return null; } - public String lnkPorSeg_action() { - // TODO: Replace with your code - + public String lnkPorSeg_action() + { return null; } - public String lnkNomeAcidentadoSeg_action() { - // TODO: Replace with your code - + public String lnkNomeAcidentadoSeg_action() + { return null; } - public String lnkFaseSeg_action() { - // TODO: Replace with your code - + public String lnkFaseSeg_action() + { return null; } - public void drpAno_processValueChange(ValueChangeEvent event) { - // TODO: Replace with your code + public void drpAno_processValueChange(ValueChangeEvent event) + { } - public void drpMes_processValueChange(ValueChangeEvent event) { - // TODO: Replace with your code - + public void drpMes_processValueChange(ValueChangeEvent event) + { + } - public void drpDia_processValueChange(ValueChangeEvent event) { - // TODO: Replace with your code + public void drpDia_processValueChange(ValueChangeEvent event) + { } @@ -1220,8 +1213,8 @@ public class GestaoUtilizadores extends AbstractPageBean { return "user_fields"; } - public String lnkNomeInactivos_action() { - // TODO: Replace with your code + public String lnkNomeInactivos_action() + { Utilizador u = getUtilizadorInactivoRowData(); getSessionBean1().setEditUser(u); getSessionBean1().setModoEdicaoUtilizador("edit"); @@ -1238,8 +1231,8 @@ public class GestaoUtilizadores extends AbstractPageBean { return "user_fields"; } - public String lnkCategoriaInactivos_action() { - // TODO: Replace with your code + public String lnkCategoriaInactivos_action() + { Utilizador u = getUtilizadorInactivoRowData(); getSessionBean1().setEditUser(u); getSessionBean1().setModoEdicaoUtilizador("edit"); @@ -1247,8 +1240,8 @@ public class GestaoUtilizadores extends AbstractPageBean { return "user_fields"; } - public String lnkEstabelecimentoInactivos_action() { - // TODO: Replace with your code + public String lnkEstabelecimentoInactivos_action() + { Utilizador u = getUtilizadorInactivoRowData(); getSessionBean1().setEditUser(u); getSessionBean1().setModoEdicaoUtilizador("edit"); @@ -1267,21 +1260,18 @@ public class GestaoUtilizadores extends AbstractPageBean { } - public String lnkNewUser_action() { - // TODO: Replace with your code - + public String lnkNewUser_action() + { return null; } - public String butNovoUtilizador_action() { - // TODO: Process the button click action. Return value is a navigation - // case name where null will return to the same page. - + public String butNovoUtilizador_action() + { return "novo_utilizador"; } - public String lnkAnalisesAcidente_action() { - // TODO: Replace with your code + public String lnkAnalisesAcidente_action() + { String nav_from = getSessionBean1().getNavFrom(); Integer tipo_utilizador = getSessionBean1().getCurrentUser().getTipo(); if(tipo_utilizador.intValue() == Global.TIPO_UTILIZADOR_DIRECTOR_SIPRP) @@ -1295,8 +1285,8 @@ public class GestaoUtilizadores extends AbstractPageBean { return null; } - public String lnkAjuda_action() { - // TODO: Replace with your code + public String lnkAjuda_action() + { // ServletContext theApplicationsServletContext = // (ServletContext) this.getExternalContext().getContext(); // String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL); @@ -1314,8 +1304,8 @@ public class GestaoUtilizadores extends AbstractPageBean { return null; } - public String lnkPlanosActuacao_action() { - // TODO: Replace with your code + public String lnkPlanosActuacao_action() + { Utilizador u = getSessionBean1().getCurrentUser(); // String curUser = "?user=" + u.getId().toString(); FacesContext fc = getFacesContext().getCurrentInstance(); diff --git a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Header.java b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Header.java index c76d8289..6c79782a 100644 --- a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Header.java +++ b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Header.java @@ -17,7 +17,8 @@ import utils.Utils; * lifecycle methods and event handlers where you may add behavior * to respond to incoming events.

*/ -public class Header extends AbstractFragmentBean { +public class Header extends AbstractFragmentBean +{ // private int __placeholder; @@ -30,7 +31,9 @@ public class Header extends AbstractFragmentBean { } // - public Header() { + public Header() + { + } /** @@ -41,12 +44,13 @@ public class Header extends AbstractFragmentBean { * *

The default implementation does nothing.

*/ - public void init() { + @Override + 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 // @@ -62,7 +66,6 @@ public class Header extends AbstractFragmentBean { // // Perform application initialization that must complete // *after* managed components are initialized - // TODO - add your own initialization code here } /** @@ -73,7 +76,10 @@ public class Header extends AbstractFragmentBean { * *

The default implementation does nothing.

*/ - public void destroy() { + @Override + public void destroy() + { + } /** @@ -97,28 +103,28 @@ public class Header extends AbstractFragmentBean { return (ApplicationBean1)getBean("ApplicationBean1"); } - public String lnkAnalisesAcidente_action() { - // TODO: Replace with your code + public String lnkAnalisesAcidente_action() + { return null; } - public String lnkPlanosActuacao_action() { - // TODO: Replace with your code + public String lnkPlanosActuacao_action() + { return null; } - public String lnkNewUser_action() { - // TODO: Replace with your code + public String lnkNewUser_action() + { return null; } - public String lnkEditUser_action() { - // TODO: Replace with your code + public String lnkEditUser_action() + { return null; } - public String lnkAjuda_action() { - // TODO: Replace with your code + public String lnkAjuda_action() + { return null; } diff --git a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/LoadImage.java b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/LoadImage.java index b94b260a..bb7f1053 100644 --- a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/LoadImage.java +++ b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/LoadImage.java @@ -218,12 +218,13 @@ public class LoadImage extends AbstractPageBean { * values submitted with this request. Instead, they represent the * property values that were saved for this view when it was rendered.

*/ - public void init() { + @Override + 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 @@ -238,15 +239,18 @@ public class LoadImage extends AbstractPageBean { // // 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 . . . - } - } + if (!getSessionBean1().isLoggedIn()) + { + try + { + getExternalContext().redirect("Login.jsp"); + } + catch(Exception e) + { + // . . . handle exception . . . + } + } else { @@ -266,9 +270,6 @@ public class LoadImage extends AbstractPageBean { ErrorLogger.logException( ex ); } } - - - } /** @@ -278,7 +279,10 @@ public class LoadImage extends AbstractPageBean { * is processing a form submit. Customize this method to allocate * resources that will be required in your event handlers.

*/ - public void preprocess() { + @Override + public void preprocess() + { + } /** @@ -289,7 +293,9 @@ public class LoadImage extends AbstractPageBean { * this method to allocate resources that will be required for rendering * this page.

*/ - public void prerender() { + @Override + public void prerender() + { //String uploadedFileName = (String) this.txtFileName.getValue(); //if ( uploadedFileName != null ) { // IMAGE_URL += getSessionBean1().getImageName(); @@ -297,8 +303,7 @@ public class LoadImage extends AbstractPageBean { //image1.setUrl(IMAGE_URL); // } txtMsg.setText(getSessionBean1().getMsg()); - getSessionBean1().setMsg(""); - + getSessionBean1().setMsg(""); } /** @@ -309,7 +314,10 @@ public class LoadImage extends AbstractPageBean { * preprocess(), or prerender() methods (or * acquired during execution of an event handler).

*/ - public void destroy() { + @Override + public void destroy() + { + } /** @@ -339,37 +347,32 @@ public class LoadImage extends AbstractPageBean { return null; } - public String lnkNome_action() { - // TODO: Replace with your code - + public String lnkNome_action() + { return null; } - public String lnkDataNascimento_action() { - // TODO: Replace with your code - + public String lnkDataNascimento_action() + { return null; } - public String butCancelar_action() { - getSessionBean1().setImageName(null); - return "analise_acidente"; + public String butCancelar_action() + { + getSessionBean1().setImageName( null ); + return "analise_acidente"; } - 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. - + public String butUpload_action() + { //realImageFilePath += "/tmp" + getSessionBean1().getCurrentUser().getLogin(); System.out.println("REAL IMAGE FILE PATH : " + realImageFilePath); File fdir = new File(realImageFilePath); System.out.println("FDIR : " + fdir); - UploadedFile uploadedFile = fileUpload1.getUploadedFile(); if(uploadedFile != null) { - String uploadedFileName = uploadedFile.getOriginalName(); // Some browsers return complete path name, some don't diff --git a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Login.java b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Login.java index 9318e035..cd9e49c7 100644 --- a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Login.java +++ b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/Login.java @@ -381,10 +381,6 @@ public class Login extends AbstractPageBean Utils.doLogin( getExternalContext(), u ); - - - - //Login Ok ! // if(u.getPrimeiro_login().matches("y") || mustChangePassword(u)) if(u.getPrimeiro_login().matches("y") ) diff --git a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/RequestBean1.java b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/RequestBean1.java index 66ece1e4..0db656c6 100644 --- a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/RequestBean1.java +++ b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/RequestBean1.java @@ -20,7 +20,8 @@ import javax.faces.FacesException; * or method binding expression that references a managed bean using * this class.

*/ -public class RequestBean1 extends AbstractRequestBean { +public class RequestBean1 extends AbstractRequestBean +{ // private int __placeholder; @@ -36,7 +37,9 @@ public class RequestBean1 extends AbstractRequestBean { /** *

Construct a new request data bean instance.

*/ - public RequestBean1() { + public RequestBean1() + { + } /** @@ -49,12 +52,13 @@ public class RequestBean1 extends AbstractRequestBean { *

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

*/ - public void init() { + @Override + 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 @@ -69,7 +73,6 @@ public class RequestBean1 extends AbstractRequestBean { // // Perform application initialization that must complete // *after* managed components are initialized - // TODO - add your own initialization code here } /** @@ -81,20 +84,25 @@ public class RequestBean1 extends AbstractRequestBean { * during the execution of the init() method, or * at any later time during the lifetime of the request.

*/ - public void destroy() { + @Override + public void destroy() + { + } /** *

Return a reference to the scoped data bean.

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

Return a reference to the scoped data bean.

*/ - protected ApplicationBean1 getApplicationBean1() { + protected ApplicationBean1 getApplicationBean1() + { return (ApplicationBean1)getBean("ApplicationBean1"); } } diff --git a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/ViewAnaliseAcidenteTrabalho.java b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/ViewAnaliseAcidenteTrabalho.java index 343a54ba..0f0b1623 100644 --- a/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/ViewAnaliseAcidenteTrabalho.java +++ b/trunk/AnaliseAcidentesTrabalho/src/java/analiseacidentestrabalho/ViewAnaliseAcidenteTrabalho.java @@ -46,7 +46,8 @@ import utils.Utils; * lifecycle methods and event handlers where you may add behavior * to respond to incoming events.

*/ -public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean { +public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean +{ // private int __placeholder; @@ -2170,7 +2171,6 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean { super.init(); // Perform application initialization that must complete // *before* managed components are initialized - // TODO - add your own initialiation code here // // Initialize automatically managed components @@ -2185,15 +2185,19 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean { // // 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 . . . + + if (!getSessionBean1().isLoggedIn()) + { + try + { + getExternalContext().redirect("Login.jsp"); + } + catch(Exception e) + { + // . . . handle exception . . . System.out.println("LOGGED IN = " + e.getMessage()); - } - } + } + } else { lblUser.setText( getSessionBean1().getCurrentUser().getLogin() ); @@ -2302,21 +2306,24 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean { /** *

Return a reference to the scoped data bean.

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

Return a reference to the scoped data bean.

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

Return a reference to the scoped data bean.

*/ - protected ApplicationBean1 getApplicationBean1() { + protected ApplicationBean1 getApplicationBean1() + { return (ApplicationBean1)getBean("ApplicationBean1"); } @@ -2326,15 +2333,13 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean { return null; } - public String lnkNome_action() { - // TODO: Replace with your code - + public String lnkNome_action() + { return null; } - public String lnkDataNascimento_action() { - // TODO: Replace with your code - + public String lnkDataNascimento_action() + { return null; } @@ -4438,10 +4443,8 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean { } } - public String butVoltar_action() { - // TODO: Replace with your code - - + public String butVoltar_action() + { String navFrom = getSessionBean1().getNavFrom(); if(navFrom.matches("FormSeguranca")) { @@ -4471,10 +4474,8 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean { else if(navFrom.matches("FormGestor")) { return "form_gestor"; - } - + } return null; - } public String lnkAnalisesAcidente_action() @@ -4537,22 +4538,20 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean { return null; } - public String lnkNewUser_action() { - // TODO: Replace with your code - + public String lnkNewUser_action() + { return null; } - public String lnkEditUser_action() { - // TODO: Replace with your code - + public String lnkEditUser_action() + { getSessionBean1().setNavFrom("ViewAnaliseAcidenteTrabalho"); getSessionBean1().setModoEdicaoUtilizador("edit"); return "user"; } - public String lnkAjuda_action() { - // TODO: Replace with your code + public String lnkAjuda_action() + { // ServletContext theApplicationsServletContext = // (ServletContext) this.getExternalContext().getContext(); // String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL); @@ -4570,9 +4569,8 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean { return null; } - public String butEliminar_action() { - // TODO: Process the button click action. Return value is a navigation - // case name where null will return to the same page. + public String butEliminar_action() + { hidConfDelete.setValue("apagar"); return null; } @@ -4645,8 +4643,8 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean { // } } - public String lnkPlanosActuacao_action() { - // TODO: Replace with your code + public String lnkPlanosActuacao_action() + { return null; } diff --git a/trunk/AnaliseAcidentesTrabalho/src/java/app.properties b/trunk/AnaliseAcidentesTrabalho/src/java/app.properties index eb561548..45a694c3 100644 --- a/trunk/AnaliseAcidentesTrabalho/src/java/app.properties +++ b/trunk/AnaliseAcidentesTrabalho/src/java/app.properties @@ -12,6 +12,22 @@ database.siprp_local = siprp_local_3 username.siprp_local = postgres #password.siprp_local = + + +# tests localhost +#server.siprp = localhost +#port.siprp = 5432 +#database.siprp = siprp +#username.siprp = postgres +#password.siprp = Typein +# +#server.siprp_local = localhost +#port.siprp_local = 5432 +#database.siprp_local = siprp_local_3 +#username.siprp_local = postgres +#password.siprp_local = Typein + + # tests evoserver #server.siprp = evoserver #port.siprp = 5432 diff --git a/trunk/AnaliseAcidentesTrabalho/src/java/db/EstatisticasConstants.java b/trunk/AnaliseAcidentesTrabalho/src/java/db/EstatisticasConstants.java index 25244279..f6bbee30 100644 --- a/trunk/AnaliseAcidentesTrabalho/src/java/db/EstatisticasConstants.java +++ b/trunk/AnaliseAcidentesTrabalho/src/java/db/EstatisticasConstants.java @@ -13,7 +13,7 @@ public interface EstatisticasConstants { public static final String[] KEY_NAMES = new String[] { "POR", "Nome", "Ano Ocorrência", "Data Ocorrência", "Hora Ocorrência", "Horas Trabalhadas no Turno", - /*"Departamento", */"Secção", "Causas do Acidente", "Turno de Trabalho", "Formação SHST" + /*"Departamento", */"Estabelecimento", "Secção", "Causas do Acidente", "Turno de Trabalho", "Formação SHST" //TODO: falta os 2 ultimos }; @@ -26,6 +26,7 @@ public interface EstatisticasConstants public static final String KEY_HORAS_TRABALHADAS = "analises_acidentes.horas_turno"; // public static final String KEY_DEPARTAMENTO = "departamentos.descricao"; + public static final String KEY_ESTABELECIMENTO = "analises_acidentes.estabelecimento_id"; public static final String KEY_SECCAO = "analises_acidentes.seccao_id"; public static final String KEY_CAUSAS_ACIDENTE = "analises_acidentes.causas"; diff --git a/trunk/AnaliseAcidentesTrabalho/src/java/db/providers/AnalisesDataProvider.java b/trunk/AnaliseAcidentesTrabalho/src/java/db/providers/AnalisesDataProvider.java index e294d3d7..a94eebe1 100644 --- a/trunk/AnaliseAcidentesTrabalho/src/java/db/providers/AnalisesDataProvider.java +++ b/trunk/AnaliseAcidentesTrabalho/src/java/db/providers/AnalisesDataProvider.java @@ -23,6 +23,10 @@ import beans.Seccao; import beans.TecnicoSaude; import beans.TipoUtilizador; import beans.Trabalhador; +import com.evolute.utils.arrays.Virtual2DArray; +import com.evolute.utils.sql.Expression; +import com.evolute.utils.sql.Field; +import com.evolute.utils.sql.Select2; import com.evolute.utils.strings.StringPlainer; import com.sun.rave.web.ui.model.Option; import global.Global; @@ -36,6 +40,8 @@ import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; import java.util.ListIterator; import java.util.StringTokenizer; import utils.Strings; @@ -49,27 +55,6 @@ public class AnalisesDataProvider extends GenericDataProvider { private static AnalisesDataProvider INSTANCE = null; -// 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 AnalisesDataProvider() throws Exception { @@ -155,7 +140,6 @@ public class AnalisesDataProvider extends GenericDataProvider joinConditions += "acidentados.id = analises_acidentes.acidentado_id AND "; } - if ( nome != null ) { nome = StringPlainer.convertString( nome.trim() ); @@ -190,12 +174,12 @@ public class AnalisesDataProvider extends GenericDataProvider /*************************************************************************/ public ArrayList searchAnalisesActualSeg( Integer estabelecimento_id, - String nome, String visitaDate, String POR, String responsavel_loja ) + String nome, String visitaDate, String POR, String responsavel_loja, Integer fromYear ) throws Exception { if ( nome == null && visitaDate == null && POR == null ) { - return getAnalisesActuaisSegList( estabelecimento_id, responsavel_loja ); + return getAnalisesActuaisSegList( estabelecimento_id, responsavel_loja, fromYear ); } Statement st = createStatement(); @@ -220,48 +204,90 @@ public class AnalisesDataProvider extends GenericDataProvider return list; } - public ArrayList getAnalisesActuaisSegList(Integer estabelecimento_id, String responsavel_loja) throws Exception + public ArrayList getAnalisesActuaisSegList( Integer estabelecimentoID, String responsavel_loja, Integer fromYear ) + throws Exception { - Statement st = createStatement(); - String sql = ""; - if(responsavel_loja.matches("y")) - { - sql ="SELECT * FROM analises_acidentes WHERE (estado = " + Global.ESTADO_SEG + " OR (averiguacao_posterior = 'y' AND averiguacao_obs = '')" + " OR estado = " + Global.ESTADO_ASSINATURA_SEG + ")" + " AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' ORDER BY analise_nr"; - } - else - { - sql ="SELECT * FROM analises_acidentes WHERE (estado = " + Global.ESTADO_SEG + " OR (averiguacao_posterior = 'y' AND averiguacao_obs = ''))" + " AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' ORDER BY analise_nr"; - } + Expression where = new Field( "analises_acidentes.apagada" ).isEqual( "n" ); + where = where.and( new Field( "analises_acidentes.estabelecimento_id" ).isEqual( estabelecimentoID ) ); + if ( fromYear != null ) + { + where = where.and( new Field( "EXTRACT( year FROM analises_acidentes.data_acidente )" ).isEqual( fromYear ) ); + } - ResultSet rs = st.executeQuery(sql); - ArrayList list = fillAnaliseFields(rs); + Expression states = new Field( "analises_acidentes.estado" ).isEqual( Global.ESTADO_SEG ) + .or( + new Field( "analises_acidentes.averiguacao_posterior" ).isEqual( "y" ) + .and( new Field( "analises_acidentes.averiguacao_obs" ).isEqual( "" ) ) + ); + if ( "y".equals( responsavel_loja ) ) + { + states = states.or( new Field( "analises_acidentes.estado" ).isEqual( Global.ESTADO_ASSINATURA_SEG ) ); + } + where = where.and( states ); + + Select2 query = new Select2( + new String[] { "analises_acidentes" }, + new Integer[] {}, + new Expression[] {}, + new String[] { "*" }, + where, + new String[] { "analises_acidentes.analise_nr" }, + null, null, null + ); + +// String sql = ""; +// if ( responsavel_loja.matches( "y" ) ) +// { +// sql = "SELECT * " + +// "FROM analises_acidentes " + +// "WHERE " + +// "(estado = " + Global.ESTADO_SEG + " OR (averiguacao_posterior = 'y' AND averiguacao_obs = '')" + +// " OR estado = " + Global.ESTADO_ASSINATURA_SEG + ")" + +// " AND estabelecimento_id = " + estabelecimentoID + +// " AND apagada = 'n' " + +// "ORDER BY analise_nr"; +// } +// else +// { +// sql = "SELECT * " + +// "FROM analises_acidentes " + +// "WHERE " + +// "( estado = " + Global.ESTADO_SEG + " OR (averiguacao_posterior = 'y' AND averiguacao_obs = '') )" + +// " AND estabelecimento_id = " + estabelecimentoID + +// " AND apagada = 'n' " + +// "ORDER BY analise_nr"; +// } + + Statement st = createStatement(); + ResultSet rs = st.executeQuery( query.toString() ); + ArrayList list = fillAnaliseFields( rs ); return list; } public ArrayList searchAnalisesActualRH( Integer estabelecimento_id, - String nome, String visitaDate, String POR, String responsavel_loja ) + String nome, String visitaDate, String POR, String responsavel_loja, Integer fromYear ) throws Exception { if ( nome == null && visitaDate == null && POR == null ) { - return getAnalisesActuaisRhList( estabelecimento_id, responsavel_loja ); + return getAnalisesActuaisRhList( estabelecimento_id, responsavel_loja, fromYear ); } Statement st = createStatement(); String sql = getExpression( nome, null, visitaDate, POR ); - if(responsavel_loja.matches("y")) + if ( responsavel_loja.matches( "y" ) ) { sql += "AND (estado = " + Global.ESTADO_RH1 + " OR estado = " + Global.ESTADO_RH2 + - " OR estado = " + Global.ESTADO_ASSINATURA_RH + ") AND estabelecimento_id = " + estabelecimento_id + - " ORDER BY analise_nr"; + " OR estado = " + Global.ESTADO_ASSINATURA_RH + ") AND estabelecimento_id = " + estabelecimento_id + + " ORDER BY analise_nr"; } else { sql += "AND (estado = " + Global.ESTADO_RH1 + " OR estado = " + Global.ESTADO_RH2 + - ") AND estabelecimento_id = " + estabelecimento_id + - " ORDER BY analise_nr"; + ") AND estabelecimento_id = " + estabelecimento_id + + " ORDER BY analise_nr"; } ResultSet rs = st.executeQuery( sql ); @@ -269,32 +295,72 @@ public class AnalisesDataProvider extends GenericDataProvider return list; } - public ArrayList getAnalisesActuaisRhList(Integer estabelecimento_id, String responsavel_loja) throws Exception + public ArrayList getAnalisesActuaisRhList( Integer estabelecimentoID, String responsavel_loja, Integer fromYear ) + throws Exception { - Statement st = createStatement(); - String sql = ""; - if(responsavel_loja.matches("y")) - { - sql ="SELECT * FROM analises_acidentes WHERE (estado = " + Global.ESTADO_RH1 + " OR estado = " + Global.ESTADO_RH2 + " OR estado = " + Global.ESTADO_ASSINATURA_RH + ") AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' ORDER BY analise_nr"; - } - else - { - sql ="SELECT * FROM analises_acidentes WHERE (estado = " + Global.ESTADO_RH1 + " OR estado = " + Global.ESTADO_RH2 + ") AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' ORDER BY analise_nr"; - } + Expression where = new Field( "apagada" ).isEqual( "n" ); + where = where.and( new Field( "estabelecimento_id" ).isEqual( estabelecimentoID ) ); + if ( fromYear != null ) + { + where = where.and( new Field( "EXTRACT( year FROM analises_acidentes.data_acidente )" ).isEqual( fromYear ) ); + } - ResultSet rs = st.executeQuery(sql); - ArrayList list = fillAnaliseFields(rs); + Expression or = new Field( "estado" ).isEqual( Global.ESTADO_RH1 ) + .or( new Field( "estado" ).isEqual( Global.ESTADO_RH2 ) ); + if ( "y".equals( responsavel_loja ) ) + { + or = or.or( new Field( "estado" ).isEqual( Global.ESTADO_ASSINATURA_RH ) ); + } + where = where.and( or ); + + Select2 query = new Select2( + new String[] { "analises_acidentes" }, + new Integer[] {}, + new Expression[] {}, + new String[] { "*" }, + where, + new String[] { "analise_nr" }, + null, null, null + ); + +// String sql = ""; +// if ( responsavel_loja.matches( "y" ) ) +// { +// sql = "SELECT * " + +// "FROM analises_acidentes " + +// "WHERE " + +// "(estado = " + Global.ESTADO_RH1 + " OR estado = " + Global.ESTADO_RH2 + " OR estado = " + Global.ESTADO_ASSINATURA_RH + ") " + +// "AND estabelecimento_id = " + estabelecimentoID + +// " AND apagada = 'n' " + +// "ORDER BY analise_nr"; +// } +// else +// { +// sql = "SELECT * " + +// "FROM analises_acidentes " + +// "WHERE " + +// "(estado = " + Global.ESTADO_RH1 + " OR estado = " + Global.ESTADO_RH2 + ") " + +// "AND estabelecimento_id = " + estabelecimentoID + +// " AND apagada = 'n' " + +// "ORDER BY analise_nr"; +// } + + System.out.println( "\ngetAnalisesActuaisRhList() : " + query.toString() + "\n" ); + + Statement st = createStatement(); + ResultSet rs = st.executeQuery( query.toString() ); + ArrayList list = fillAnaliseFields( rs ); return list; } - public ArrayList searchAnalisesActuaisHS( Integer estabelecimento_id, - String nome, String estabelecimento, String visitaDate, String POR ) + public ArrayList searchAnalisesActuaisHS( Integer estabelecimento_id, + String nome, String estabelecimento, String visitaDate, String POR, Integer fromYear ) throws Exception { if ( nome == null && estabelecimento == null && visitaDate == null && POR == null ) { - return getAnalisesActuaisHsList( estabelecimento_id ); + return getAnalisesActuaisHsList( estabelecimento_id, fromYear ); } Statement st = createStatement(); @@ -309,42 +375,44 @@ public class AnalisesDataProvider extends GenericDataProvider return list; } - public ArrayList getAnalisesActuaisHsList(Integer estabelecimento_id) throws Exception + public ArrayList getAnalisesActuaisHsList( Integer estabelecimentoID, Integer fromYear ) throws Exception { - Statement st = createStatement(); - String sql ="SELECT * FROM analises_acidentes WHERE (estado = " + Global.ESTADO_HS + " OR estado = " + Global.ESTADO_FECHAR + " OR estado = " + Global.ESTADO_CONSOLIDACAO + ")" + " AND apagada = 'n' ORDER BY analise_nr"; //AND estabelecimento_id = " + estabelecimento_id; - ResultSet rs = st.executeQuery(sql); - ArrayList list = fillAnaliseFields(rs); - return list; - } + Expression where = new Field( "apagada" ).isEqual( "n" ).and( + new Field( "estado" ).isEqual( Global.ESTADO_HS ) + .or( new Field( "estado" ).isEqual( Global.ESTADO_FECHAR ) ) + .or( new Field( "estado" ).isEqual( Global.ESTADO_CONSOLIDACAO ) ) + ); -// public ArrayList searchAnalisesActuaisMedico( Integer estabelecimento_id, String nome ) -// throws Exception -// { -// if ( nome == null ) -// { -// return getAnalisesActuaisMedicoList( estabelecimento_id ); -// } -// -// Statement st = createStatement(); -// String sql = getExpression( nome, null ); -// -// sql += "AND (estado = " + Global.ESTADO_MEDICINA + " OR (estado = " + Global.ESTADO_ASSINATURAS + -// " AND estado_assinatura = 2 and ass_med = 'n')) AND estabelecimento_id = " + estabelecimento_id; -// -// ResultSet rs = st.executeQuery( sql ); -// ArrayList list = fillAnaliseFields( rs ); -// return list; -// } + if ( fromYear != null ) + { + where = where.and( new Field( "EXTRACT( year FROM data_acidente )" ).isEqual( fromYear ) ); + } + Select2 query = new Select2( + new String[] { "analises_acidentes" }, + new Integer[] {}, + new Expression[] {}, + new String[] { "*" }, + where, + new String[] { "analise_nr" }, + null, null, null + ); + +// String sql = "SELECT * " + +// "FROM analises_acidentes " + +// "WHERE " + +// "(estado = " + Global.ESTADO_HS + " OR estado = " + Global.ESTADO_FECHAR + +// " OR estado = " + Global.ESTADO_CONSOLIDACAO + ")" + +// " AND apagada = 'n' " + +// "ORDER BY analise_nr"; + + System.out.println( "\nAnalisesDataProvider . getAnalisesActuaisHsList() : " + query.toString() ); + + Statement st = createStatement(); + ResultSet rs = st.executeQuery( query.toString() ); + ArrayList list = fillAnaliseFields( rs ); + return list; + } -// public ArrayList getAnalisesActuaisMedicoList(Integer estabelecimento_id) throws Exception -// { -// Statement st = createStatement(); -// String sql ="SELECT * FROM analises_acidentes WHERE (estado = " + Global.ESTADO_MEDICINA + " OR (estado = " + Global.ESTADO_ASSINATURAS + " AND estado_assinatura = 2 and ass_med = 'n')) AND estabelecimento_id = " + estabelecimento_id; -// ResultSet rs = st.executeQuery(sql); -// ArrayList list = fillAnaliseFields(rs); -// return list; -// } @@ -354,12 +422,12 @@ public class AnalisesDataProvider extends GenericDataProvider /*************************************************************************/ public ArrayList searchAnalisesSeguimentoSeg( Integer estabelecimento_id, - String nome, String visitaDate, String POR, String responsavel_loja ) + String nome, String visitaDate, String POR, String responsavel_loja, Integer fromYear ) throws Exception { if ( nome == null && visitaDate == null && POR == null ) { - return getAnalisesSeguimentoSegList( estabelecimento_id, responsavel_loja ); + return getAnalisesSeguimentoSegList( estabelecimento_id, responsavel_loja, fromYear ); } Statement st = createStatement(); @@ -382,54 +450,59 @@ public class AnalisesDataProvider extends GenericDataProvider ")) OR estado = " + Global.ESTADO_FECHAR + ")" + " ORDER BY analise_nr"; } + System.out.println( "SQL: " + sql ); ResultSet rs = st.executeQuery( sql ); ArrayList list = fillAnaliseFields( rs ); return list; } - public ArrayList getAnalisesSeguimentoSegList( Integer estabelecimento_id, String responsavel_loja ) + public ArrayList getAnalisesSeguimentoSegList( Integer estabelecimento_id, String responsavel_loja, Integer fromYear ) throws Exception { - Statement st = createStatement(); String sql = null; + // TODO : change to Select2 if ( responsavel_loja.matches( "y" ) ) { - sql ="SELECT * FROM analises_acidentes WHERE " + + sql = "SELECT * FROM analises_acidentes WHERE " + "estabelecimento_id = " + estabelecimento_id + " AND (" + "estado > " + Global.ESTADO_SEG + " AND estado < " + Global.ESTADO_ASSINATURA_SEG + " AND (" + "averiguacao_posterior = 'n' OR (averiguacao_posterior = 'y' AND averiguacao_obs <> '')" + ") " + "OR (estado > " + Global.ESTADO_ASSINATURA_SEG + " AND estado < " + Global.ESTADO_CONCLUIDO + ")" + - ")" + " AND apagada = 'n' " + - "ORDER BY analise_nr"; -// sql ="SELECT * FROM analises_acidentes WHERE estabelecimento_id = " + estabelecimento_id + " AND ((estado = 7 and ass_resp_seg = 'y') OR (estado > 1 AND estado < 7 AND (averiguacao_posterior = 'n' OR (averiguacao_posterior = 'y' AND averiguacao_obs <> ''))) OR (estado > 7 AND estado < 10))"; + ")" + " AND apagada = 'n' "; } else { -// sql ="SELECT * FROM analises_acidentes WHERE estabelecimento_id = " + estabelecimento_id + " AND ((estado > " + Global.ESTADO_SEG + " AND estado < 8 AND (averiguacao_posterior = 'n' OR (averiguacao_posterior = 'y' AND averiguacao_obs <> ''))) OR (estado > 7 AND estado < 10))"; - sql ="SELECT * FROM analises_acidentes WHERE " + + sql = "SELECT * FROM analises_acidentes WHERE " + "estabelecimento_id = " + estabelecimento_id + " AND (" + "(estado > " + Global.ESTADO_SEG + " AND estado < " + Global.ESTADO_FECHAR + " AND (" + "averiguacao_posterior = 'n' OR (averiguacao_posterior = 'y' AND averiguacao_obs <> '')" + ")) OR estado = " + Global.ESTADO_FECHAR + - ")" + " AND apagada = 'n' " + - "ORDER BY analise_nr"; + ")" + " AND apagada = 'n' "; } + if ( fromYear != null ) + { + sql += " AND EXTRACT( year FROM analises_acidentes.data_acidente ) = " + fromYear + " "; + } + sql += " ORDER BY analise_nr "; + System.out.println( "\ngetAnalisesSeguimentoSegList() : " + sql + "\n" ); + + Statement st = createStatement(); ResultSet rs = st.executeQuery( sql ); ArrayList list = fillAnaliseFields( rs ); return list; } public ArrayList searchAnalisesSeguimentoHS( Integer estabelecimento_id, - String nome, String estabelecimento, String visitaDate, String POR ) + String nome, String estabelecimento, String visitaDate, String POR, Integer fromYear ) throws Exception { if ( nome == null && estabelecimento == null && visitaDate == null && POR == null ) { - return getAnalisesSeguimentoHsList( estabelecimento_id ); + return getAnalisesSeguimentoHsList( estabelecimento_id, fromYear ); } Statement st = createStatement(); @@ -445,32 +518,53 @@ public class AnalisesDataProvider extends GenericDataProvider return list; } - public ArrayList getAnalisesSeguimentoHsList( Integer estabelecimento_id ) + public ArrayList getAnalisesSeguimentoHsList( Integer estabelecimentoID, Integer fromYear ) throws Exception { - Statement st = createStatement(); - String sql = null; - - sql = "SELECT * FROM analises_acidentes WHERE (" + - "estado < " + Global.ESTADO_HS + " OR (estado > " + Global.ESTADO_HS + " AND estado < " + Global.ESTADO_CONSOLIDACAO + ") " + - "OR (estado > " + Global.ESTADO_CONSOLIDACAO + " AND estado < " + Global.ESTADO_FECHAR + ")" + - ")" + " AND apagada = 'n' " + - "ORDER BY analise_nr"; // AND estabelecimento_id = " + estabelecimento_id; - - ResultSet rs = st.executeQuery(sql); - System.out.println("SEGUIMENTO HS SQL : " + sql); - ArrayList list = fillAnaliseFields(rs); + Expression where = new Field( "analises_acidentes.apagada" ).isEqual( "n" ); + if ( fromYear != null ) + { + where = where.and( new Field( "EXTRACT( year FROM analises_acidentes.data_acidente )" ).isEqual( fromYear ) ); + } + where = where.and( + new Field( "estado" ).isLess( Global.ESTADO_HS ) + .or( new Field( "estado" ).isGreater( Global.ESTADO_HS ).and( new Field( "estado" ).isLess( Global.ESTADO_CONSOLIDACAO ) ) ) + .or( new Field( "estado" ).isGreater( Global.ESTADO_CONSOLIDACAO ).and( new Field( "estado" ).isLess( Global.ESTADO_FECHAR ) ) ) + ); + + Select2 query = new Select2( + new String[] { "analises_acidentes" }, + new Integer[] {}, + new Expression[] {}, + new String[] { "*" }, + where, + new String[] { "analises_acidentes.analise_nr" }, + null, null, null + ); + +// String sql = null; +// sql = "SELECT * FROM analises_acidentes WHERE (" + +// "estado < " + Global.ESTADO_HS + " OR (estado > " + Global.ESTADO_HS + " AND estado < " + Global.ESTADO_CONSOLIDACAO + ") " + +// "OR (estado > " + Global.ESTADO_CONSOLIDACAO + " AND estado < " + Global.ESTADO_FECHAR + ")" + +// ")" + " AND apagada = 'n' " + +// "ORDER BY analise_nr"; + // AND estabelecimento_id = " + estabelecimento_id; + + Statement st = createStatement(); + ResultSet rs = st.executeQuery( query.toString() ); + System.out.println( "SEGUIMENTO HS SQL : " + query.toString() ); + ArrayList list = fillAnaliseFields( rs ); return list; } public ArrayList searchAnalisesSeguimentoRH( Integer estabelecimento_id, - String nome, String visitaDate, String POR, String responsavel_loja ) + String nome, String visitaDate, String POR, String responsavel_loja, Integer fromYear ) throws Exception { if ( nome == null && visitaDate == null && POR == null ) { - return getAnalisesSeguimentoRhList( estabelecimento_id, responsavel_loja ); + return getAnalisesSeguimentoRhList( estabelecimento_id, responsavel_loja, fromYear ); } Statement st = createStatement(); @@ -491,49 +585,56 @@ public class AnalisesDataProvider extends GenericDataProvider ") AND estabelecimento_id = " + estabelecimento_id + " ORDER BY analise_nr"; } + ResultSet rs = st.executeQuery( sql ); ArrayList list = fillAnaliseFields( rs ); return list; } - public ArrayList getAnalisesSeguimentoRhList( Integer estabelecimento_id, String responsavel_loja ) + public ArrayList getAnalisesSeguimentoRhList( Integer estabelecimentoID, String responsavel_loja, Integer fromYear ) throws Exception { - Statement st = createStatement(); - String sql = null; + Expression where = new Field( "apagada" ).isEqual( "n" ); + where = where.and( new Field( "estabelecimento_id" ).isEqual( estabelecimentoID ) ); + if ( fromYear != null ) + { + where = where.and( new Field( "EXTRACT( year FROM analises_acidentes.data_acidente )" ).isEqual( fromYear ) ); + } - if ( responsavel_loja.matches( "y" ) ) - { -// sql ="SELECT * FROM analises_acidentes WHERE (estado = 1 OR estado = 3 OR estado = 6 OR (estado = 7 AND estado_assinatura < 2) OR estado = 9) AND estabelecimento_id = " + estabelecimento_id; -// sql ="SELECT * FROM analises_acidentes WHERE (estado = 1 OR estado = 3 OR estado = 6 OR (estado = 7 AND estado_assinatura < 2) OR (estado = 7 and ass_resp_rh = 'y') OR estado = 9) AND estabelecimento_id = " + estabelecimento_id; - sql ="SELECT * FROM analises_acidentes WHERE (" + - "estado = " + Global.ESTADO_SEG + " OR estado = " + Global.ESTADO_HS + " OR estado = " + Global.ESTADO_CONSOLIDACAO + - " OR estado = " + Global.ESTADO_ASSINATURA_SEG + " OR estado = " + Global.ESTADO_FECHAR + - ") AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' " + - "ORDER BY analise_nr"; - } - else - { - sql ="SELECT * FROM analises_acidentes WHERE (" + - "estado = " + Global.ESTADO_SEG + " OR estado = " + Global.ESTADO_HS + " OR estado = " + Global.ESTADO_CONSOLIDACAO + - " OR estado = " + Global.ESTADO_ASSINATURA_SEG + " OR estado = " + Global.ESTADO_ASSINATURA_RH + " OR estado = " + Global.ESTADO_FECHAR + - ") AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' " + - "ORDER BY analise_nr"; - } + Expression or = new Field( "estado" ).isEqual( Global.ESTADO_SEG ); + or = or.or( new Field( "estado" ).isEqual( Global.ESTADO_HS ) ); + or = or.or( new Field( "estado" ).isEqual( Global.ESTADO_CONSOLIDACAO ) ); + or = or.or( new Field( "estado" ).isEqual( Global.ESTADO_ASSINATURA_SEG ) ); + or = or.or( new Field( "estado" ).isEqual( Global.ESTADO_FECHAR ) ); + if ( ! "y".equals( responsavel_loja ) ) + { + or = or.or( new Field( "estado" ).isEqual( Global.ESTADO_ASSINATURA_RH ) ); + } + where = where.and( or ); + + Select2 query = new Select2( + new String[] { "analises_acidentes" }, + new Integer[] {}, + new Expression[] {}, + new String[] { "*" }, + where, + new String[] { "analise_nr" }, + null, null, null + ); - ResultSet rs = st.executeQuery(sql); - ArrayList list = fillAnaliseFields(rs); + Statement st = createStatement(); + ResultSet rs = st.executeQuery( query.toString() ); + ArrayList list = fillAnaliseFields( rs ); return list; } - public ArrayList searchAnalisesSeguimentoMedico( Integer estabelecimento_id, - String nome, String visitaDate, String POR ) + public ArrayList searchAnalisesSeguimentoMedico( Integer estabelecimento_id, String nome, String visitaDate, String POR, Integer fromYear ) throws Exception { if ( nome == null && visitaDate == null && POR == null ) { - return getAnalisesSeguimentoMedList( estabelecimento_id ); + return getAnalisesSeguimentoMedList( estabelecimento_id, fromYear ); } Statement st = createStatement(); @@ -549,126 +650,164 @@ public class AnalisesDataProvider extends GenericDataProvider return list; } - public ArrayList getAnalisesSeguimentoMedList( Integer estabelecimento_id ) + public ArrayList getAnalisesSeguimentoMedList( Integer estabelecimentoID, Integer fromYear ) 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 + " AND apagada = 'n' " + - "ORDER BY analise_nr"; - - ResultSet rs = st.executeQuery(sql); - ArrayList list = fillAnaliseFields(rs); +// 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 = " + estabelecimentoID + " AND apagada = 'n' "; +// if ( fromYear != null ) +// { +// sql += " AND EXTRACT( year FROM analises_acidentes.data_acidente ) = " + fromYear + " "; +// } +// sql += " ORDER BY analise_nr "; + + Expression where = new Field( "analises_acidentes.apagada" ).isEqual( "n" ); + where = where.and( new Field( "analises_acidentes.estabelecimento_id" ).isEqual( estabelecimentoID ) ); + if ( fromYear != null ) + { + where = where.and( new Field( "EXTRACT( year FROM analises_acidentes.data_acidente )" ).isEqual( fromYear ) ); + } + where = where.and( + new Field( "analises_acidentes.estado" ).isLess( 5 ) + .or( + new Field( "analises_acidentes.estado" ).isEqual( 6 ) + .and( new Field( "analises_acidentes.estado_assinatura" ).isDifferent( 2 ) ) + ) + .or( + new Field( "analises_acidentes.estado" ).isEqual( 6 ) + .and( new Field( "analises_acidentes.estado_assinatura" ).isEqual( 2 ) ) + .and( new Field( "analises_acidentes.ass_med" ).isEqual( "y" ) ) + ) + .or( + new Field( "analises_acidentes.estado" ).isGreater( 6 ) + .and( new Field( "analises_acidentes.estado" ).isLess( 9 ) ) + ) + ); + + Select2 query = new Select2( + new String[] { "analises_acidentes" }, + new Integer[] {}, + new Expression[] {}, + new String[] { "*" }, + where, + new String[] { "analises_acidentes.analise_nr" }, + null, null, null + ); + + Statement st = createStatement(); + ResultSet rs = st.executeQuery( query.toString() ); + ArrayList list = fillAnaliseFields( rs ); return list; } - - public ArrayList searchAnalisesSeguimentoDirSiprp( - String nome, String estabelecimento, String visitaDate, String POR ) + public ArrayList searchAnalisesSeguimentoDirSiprp( String nome, String estabelecimento, String visitaDate, String POR, Integer fromYear ) throws Exception { if ( nome == null && estabelecimento == null && visitaDate == null && POR == null ) { - return getAnalisesSeguimentoDirSiprpList(); + return getAnalisesSeguimentoDirSiprpList( fromYear ); } - Statement st = createStatement(); String sql = getExpression( nome, estabelecimento, visitaDate, POR ); sql += " AND estado < " + Global.ESTADO_CONCLUIDO + " ORDER BY analise_nr"; - ResultSet rs = st.executeQuery(sql); - ArrayList list = fillAnaliseFields(rs); + Statement st = createStatement(); + ResultSet rs = st.executeQuery( sql ); + ArrayList list = fillAnaliseFields( rs ); return list; } - public ArrayList getAnalisesSeguimentoDirSiprpList() throws Exception + public ArrayList getAnalisesSeguimentoDirSiprpList( Integer fromYear ) throws Exception { - Statement st = createStatement(); - String sql = null; - - sql = "SELECT * FROM analises_acidentes WHERE estado < " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr"; + Expression where = new Field( "apagada" ).isEqual( "n" ); + where = where.and( new Field( "estado" ).isLess( Global.ESTADO_CONCLUIDO ) ); + if ( fromYear != null ) + { + where = where.and( new Field( "EXTRACT( year FROM analises_acidentes.data_acidente )" ).isEqual( fromYear ) ); + } - ResultSet rs = st.executeQuery(sql); - ArrayList list = fillAnaliseFields(rs); + Select2 query = new Select2( + new String[] { "analises_acidentes" }, + new Integer[] {}, + new Expression[] {}, + new String[] { "*" }, + where, + new String[] { "analise_nr" }, + null, null, null + ); + + Statement st = createStatement(); + ResultSet rs = st.executeQuery( query.toString() ); + ArrayList list = fillAnaliseFields( rs ); return list; } public ArrayList searchAnalisesSeguimentoDirGerRh( - String nome, String estabelecimento, String visitaDate, String POR ) + String nome, String estabelecimento, String visitaDate, String POR, Integer fromYear ) throws Exception { - return searchAnalisesSeguimentoDirSiprp( nome, estabelecimento, visitaDate, POR ); + return searchAnalisesSeguimentoDirSiprp( nome, estabelecimento, visitaDate, POR, fromYear ); } - public ArrayList getAnalisesSeguimentoDirGerRhList() throws Exception + public ArrayList getAnalisesSeguimentoDirGerRhList( Integer fromYear ) throws Exception { - return getAnalisesSeguimentoDirSiprpList(); -// Statement st = createStatement(); -// String sql = null; -// -// sql ="SELECT * FROM analises_acidentes WHERE estado < " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr"; -// -// ResultSet rs = st.executeQuery(sql); -// ArrayList list = fillAnaliseFields(rs); -// return list; + return getAnalisesSeguimentoDirSiprpList( fromYear ); } public ArrayList searchAnalisesSeguimentoGestor( Integer estabelecimento_id, - String nome, String estabelecimento, String visitaDate, String POR ) + String nome, String estabelecimento, String visitaDate, String POR, Integer fromYear ) throws Exception { if ( nome == null && estabelecimento == null && visitaDate == null && POR == null ) { - return getAnalisesSeguimentoGestorList( estabelecimento_id ); + return getAnalisesSeguimentoGestorList( estabelecimento_id, fromYear ); } Statement st = createStatement(); String sql = getExpression( nome, estabelecimento, visitaDate, POR ); + sql += "AND estado < " + Global.ESTADO_CONCLUIDO + " "; - if ( estabelecimento_id == null ) + if ( estabelecimento_id != null ) { - sql += "AND estado < " + Global.ESTADO_CONCLUIDO + - " ORDER BY analise_nr"; + sql += " AND estabelecimento_id = " + estabelecimento_id + " "; } - else - { - sql += "AND estado < " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id + - " ORDER BY analise_nr"; - } - - ResultSet rs = st.executeQuery(sql); - ArrayList list = fillAnaliseFields(rs); + sql += " ORDER BY analise_nr"; + + ResultSet rs = st.executeQuery( sql ); + ArrayList list = fillAnaliseFields( rs ); return list; } - public ArrayList getAnalisesSeguimentoGestorList( Integer estabelecimento_id ) + public ArrayList getAnalisesSeguimentoGestorList( Integer estabelecimentoID, Integer fromYear ) throws Exception { - Statement st = createStatement(); - String sql = null; + Expression where = new Field( "apagada" ).isEqual( "n" ); + where = where.and( new Field( "estado" ).isLess( Global.ESTADO_CONCLUIDO ) ); + if ( estabelecimentoID != null ) + { + where = where.and( new Field( "estabelecimento_id" ).isEqual( estabelecimentoID ) ); + } + if ( fromYear != null ) + { + where = where.and( new Field( "EXTRACT( year FROM analises_acidentes.data_acidente )" ).isEqual( fromYear ) ); + } - if ( estabelecimento_id == null ) - { - sql = "SELECT * FROM analises_acidentes WHERE " + - "estado < " + Global.ESTADO_CONCLUIDO + - " AND apagada = 'n' " + - "ORDER BY analise_nr"; - } - else - { - sql = "SELECT * FROM analises_acidentes WHERE " + - "estado < " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id + - " AND apagada = 'n' " + - "ORDER BY analise_nr"; - } + Select2 query = new Select2( + new String[] { "analises_acidentes" }, + new Integer[] {}, + new Expression[] {}, + new String[] { "*" }, + where, + new String[] { "analise_nr" }, + null, null, null + ); - - ResultSet rs = st.executeQuery(sql); - ArrayList list = fillAnaliseFields(rs); + Statement st = createStatement(); + ResultSet rs = st.executeQuery( query.toString() ); + ArrayList list = fillAnaliseFields( rs ); return list; } @@ -680,37 +819,45 @@ public class AnalisesDataProvider extends GenericDataProvider /****************************** CONCLUIDOS *******************************/ /*************************************************************************/ - public ArrayList getAnalisesConcluidasList(Integer estabelecimento_id) throws Exception + public ArrayList getAnalisesConcluidasList( Integer estabelecimentoID, Integer fromYear ) throws Exception { Statement st = createStatement(); - String sql = ""; - if(estabelecimento_id == null) - { - sql ="SELECT * FROM analises_acidentes WHERE estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr"; - } - else - { - sql ="SELECT * FROM analises_acidentes WHERE estado = " + Global.ESTADO_CONCLUIDO + " AND estabelecimento_id = " + estabelecimento_id + " AND apagada = 'n' ORDER BY analise_nr"; - } - ResultSet rs = st.executeQuery(sql); - ArrayList list = fillAnaliseFields(rs); + Expression where = new Field( "estado" ).isEqual( Global.ESTADO_CONCLUIDO ); + where = where.and( new Field( "apagada" ).isEqual( "n" ) ); + if ( estabelecimentoID != null ) + { + where = where.and( new Field( "estabelecimento_id" ).isEqual( estabelecimentoID ) ); + } + if ( fromYear != null ) + { + where = where.and( new Field( "EXTRACT( year FROM data_acidente )" ).isEqual( fromYear ) ); + } + Select2 query = new Select2( + new String[] { "analises_acidentes" }, + new Integer[] {}, + new Expression[] {}, + new String[] { "*" }, + where, + new String[] { "analise_nr" }, + null, null, null + ); + + System.out.println( "\ngetAnalisesConcluidasList() : " + query.toString() + "\n" ); + + ResultSet rs = st.executeQuery( query.toString() ); + ArrayList list = fillAnaliseFields( rs ); return list; } - public ArrayList getAnalisesConcluidasHsList() throws Exception + public ArrayList getAnalisesConcluidasHsList( Integer fromYear ) throws Exception { - Statement st = createStatement(); - String sql ="SELECT * FROM analises_acidentes WHERE estado = " + Global.ESTADO_CONCLUIDO + " AND apagada = 'n' ORDER BY analise_nr"; - ResultSet rs = st.executeQuery(sql); - ArrayList list = fillAnaliseFields(rs); - - return list; + return getAnalisesConcluidasList( null, fromYear ); } - public ArrayList searchAanalisesConcluidasList( Integer estabelecimento_id, - Integer ano, Integer mes, Integer dia, String POR, String nome, String estabelecimento ) + public ArrayList searchAnalisesConcluidasList( Integer estabelecimento_id, + Integer ano, Integer mes, Integer dia, String POR, String nome, String estabelecimento, Integer fromYear ) throws Exception { String sql = null; @@ -771,7 +918,15 @@ public class AnalisesDataProvider extends GenericDataProvider } } - sql += "AND estado = " + Global.ESTADO_CONCLUIDO + " ORDER BY analises_acidentes.analise_nr ASC"; + sql += " AND estado = " + Global.ESTADO_CONCLUIDO + " "; + + // if search parameters are null, account with fromYear + if ( ano == null && mes == null && dia == null && POR == null && nome == null && estabelecimento == null && fromYear != null ) + { + sql += " AND EXTRACT( year FROM analises_acidentes.data_acidente ) = " + fromYear + " "; + } + + sql += " ORDER BY analises_acidentes.analise_nr ASC "; System.out.println( "CONCLUIDAS SQL: " + sql ); @@ -2840,27 +2995,58 @@ public class AnalisesDataProvider extends GenericDataProvider s.setDescricao(rs.getString("descricao")); return s; } - + + public List< Integer > getDistinctYears( Integer excludeYear ) throws Exception + { + List< Integer > result = new LinkedList< Integer >(); + + Expression where = new Field( "apagada" ).isEqual( "n" ); + if ( excludeYear != null ) + { + where = where.and( new Field( "EXTRACT( year FROM data_acidente )" ).notIn( new Integer[] { excludeYear } ) ); + } + Select2 query = new Select2( + new String[] { "analises_acidentes" }, + new Integer[] {}, + new Expression[] {}, + new String[] { "DISTINCT( cast( EXTRACT( year FROM data_acidente ) as integer ) ) AS ano" }, + where, + new String[] { "ano DESC" }, + null, null, null + ); + query.disableOrderFieldsVerification(); + Virtual2DArray array = getExecuter().executeQuery( query ); + for ( int i = 0; i < array.columnLength(); i++ ) + { + Integer ano = array.get( i, 0 ); + result.add( ano ); + } + return result; + } + public ArrayList getAnosListFromAnalises() throws Exception { ArrayList list = new ArrayList(); - Statement st = createStatement(); - String sql = null; - - sql ="select distinct extract(year from data_acidente) as ano from analises_acidentes where estado = " + Global.ESTADO_CONCLUIDO + " order by ano"; - ResultSet rs = st.executeQuery(sql); - if(rs.isBeforeFirst()) + String sql = "SELECT DISTINCT EXTRACT( year FROM data_acidente ) AS ano " + + "FROM analises_acidentes " + + "WHERE " + + "apagada = 'n' AND estado = " + Global.ESTADO_CONCLUIDO + + " ORDER BY ano"; + + Statement st = createStatement(); + ResultSet rs = st.executeQuery( sql ); + if ( rs.isBeforeFirst() ) { rs.first(); do { - Double dAno = new Double(rs.getDouble("ano")); - Integer iAno = new Integer(dAno.intValue()); - list.add(iAno); - }while(rs.next()); + Double dAno = new Double( rs.getDouble( "ano" ) ); + Integer iAno = new Integer( dAno.intValue() ); + list.add( iAno ); + } + while ( rs.next() ); } - return list; } diff --git a/trunk/AnaliseAcidentesTrabalho/src/java/db/providers/EstatisticasDataProvider.java b/trunk/AnaliseAcidentesTrabalho/src/java/db/providers/EstatisticasDataProvider.java index 3f68084c..2e429452 100644 --- a/trunk/AnaliseAcidentesTrabalho/src/java/db/providers/EstatisticasDataProvider.java +++ b/trunk/AnaliseAcidentesTrabalho/src/java/db/providers/EstatisticasDataProvider.java @@ -16,6 +16,8 @@ import com.evolute.utils.sql.Select2; import com.sun.rave.web.ui.model.Option; import db.data.siprp.outer.CausasData; import db.data.siprp.outer.SeccoesData; +import db.data.siprp_local.outer.EstabelecimentosData; +import global.Global; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; @@ -67,6 +69,7 @@ public class EstatisticasDataProvider extends GenericDataProvider String horaOcorrencia = ( String ) searchProperties.get( EstatisticasConstants.KEY_HORA_OCORRENCIA ); String horasTrabalhadas = ( String ) searchProperties.get( EstatisticasConstants.KEY_HORAS_TRABALHADAS ); // String departamento = ( String ) searchProperties.get( EstatisticasConstants.KEY_DEPARTAMENTO ); + Integer estabelecimentoID = ( Integer ) searchProperties.get( EstatisticasConstants.KEY_ESTABELECIMENTO ); Integer seccaoID = ( Integer ) searchProperties.get( EstatisticasConstants.KEY_SECCAO ); Integer causas = ( Integer ) searchProperties.get( EstatisticasConstants.KEY_CAUSAS_ACIDENTE ); String turno = ( String ) searchProperties.get( EstatisticasConstants.KEY_TURNO_TRABALHO ); @@ -153,6 +156,10 @@ public class EstatisticasDataProvider extends GenericDataProvider // departamento = departamento.replaceAll( " ", "%" ); // whereConditions += " AND " + EstatisticasConstants.KEY_DEPARTAMENTO + " ILIKE '%" + departamento + "%' "; // } + if ( estabelecimentoID != null ) + { + whereConditions += " AND " + EstatisticasConstants.KEY_ESTABELECIMENTO + " = " + estabelecimentoID + " "; + } if ( seccaoID != null ) { whereConditions += " AND " + EstatisticasConstants.KEY_SECCAO + " = " + seccaoID + " "; @@ -290,5 +297,47 @@ public class EstatisticasDataProvider extends GenericDataProvider } return causa; } + + public com.sun.rave.web.ui.model.Option[] getEstabelecimentos() throws Exception + { + com.sun.rave.web.ui.model.Option[] options = null; + + Select2 query = new Select2( + new String[] { EstabelecimentosData.TABLENAME }, + new Integer[] { }, + new Expression[] {}, + new String[] { + EstabelecimentosData.ID_FULL, EstabelecimentosData.NOME_FULL + }, + new Field( EstabelecimentosData.INACTIVO_FULL ).isDifferent( "y" ) + .and( new Field( EstabelecimentosData.EMPRESA_ID_FULL ).isEqual( Global.AUCHAN ) ), + new String[] { EstabelecimentosData.NOME_FULL }, + null, null, null ); + Virtual2DArray array = getLocalExecuter().executeQuery( query ); + if ( array != null ) + { + options = new com.sun.rave.web.ui.model.Option[ array.columnLength() + 1 ]; + options[ 0 ] = new Option( "", "" ); + for ( int i = 0; i < array.columnLength(); i++ ) + { + Integer estabelecimentoID = array.get( i, 0 ); + String estabelecimentoNome = array.get( i, 1 ); + options[ ( i + 1 ) ] = new Option( estabelecimentoID, estabelecimentoNome ); + } + } + return options; + } + + public String getEstabelecimentoByID( Integer estabelecimentoID ) throws Exception + { + String estabelecimento = ""; + EstabelecimentosData estabelecimentoData = getLocalProvider().load( EstabelecimentosData.class, estabelecimentoID, EstabelecimentosData.ID ); + if ( estabelecimentoData != null ) + { + estabelecimento = estabelecimentoData.getNome(); + } + return estabelecimento; + } + } diff --git a/trunk/AnaliseAcidentesTrabalho/src/java/utils/Utils.java b/trunk/AnaliseAcidentesTrabalho/src/java/utils/Utils.java index beb22b16..df94166f 100644 --- a/trunk/AnaliseAcidentesTrabalho/src/java/utils/Utils.java +++ b/trunk/AnaliseAcidentesTrabalho/src/java/utils/Utils.java @@ -12,12 +12,16 @@ package utils; import beans.Utilizador; import com.evolute.utils.Singleton; import com.evolute.utils.error.ErrorLogger; +import com.sun.rave.web.ui.model.Option; +import db.providers.AnalisesDataProvider; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; import java.util.HashMap; +import java.util.Iterator; +import java.util.List; import java.util.Map; import javax.faces.context.ExternalContext; import javax.servlet.ServletContext; @@ -505,4 +509,38 @@ public class Utils { } } + public static Option[] getYearDropValues() + { + Calendar calendar = Calendar.getInstance(); + calendar.setTime( new Date() ); + Integer currentYear = calendar.get( Calendar.YEAR ); + + Option[] opts = null; + try + { + int start = 0; + List< Integer > anosList = AnalisesDataProvider.getInstance().getDistinctYears( null ); + if ( anosList.contains( currentYear ) ) + { + opts = new Option[ anosList.size() ]; + } + else + { + opts = new Option[ anosList.size() + 1 ]; + opts[ start++ ] = new Option( currentYear, currentYear.toString() ); + } + Iterator< Integer > it = anosList.iterator(); + for ( ; it.hasNext(); start++ ) + { + Integer ano = it.next(); + opts[ start ] = new Option( ano, ano.toString() ); + } + } + catch ( Exception e ) + { + ErrorLogger.logException( e ); + } + return opts; + } + } diff --git a/trunk/AnaliseAcidentesTrabalho/web/EstatisticasProcesso.jsp b/trunk/AnaliseAcidentesTrabalho/web/EstatisticasProcesso.jsp index de5e86db..bf548c49 100644 --- a/trunk/AnaliseAcidentesTrabalho/web/EstatisticasProcesso.jsp +++ b/trunk/AnaliseAcidentesTrabalho/web/EstatisticasProcesso.jsp @@ -100,7 +100,10 @@ --> - + + + + diff --git a/trunk/AnaliseAcidentesTrabalho/web/FormDirGerRh.jsp b/trunk/AnaliseAcidentesTrabalho/web/FormDirGerRh.jsp index f0374089..e20cd938 100644 --- a/trunk/AnaliseAcidentesTrabalho/web/FormDirGerRh.jsp +++ b/trunk/AnaliseAcidentesTrabalho/web/FormDirGerRh.jsp @@ -54,6 +54,18 @@ + + + + + + + + + + + diff --git a/trunk/AnaliseAcidentesTrabalho/web/FormDirSiprp.jsp b/trunk/AnaliseAcidentesTrabalho/web/FormDirSiprp.jsp index 6f2c13c3..990e35aa 100755 --- a/trunk/AnaliseAcidentesTrabalho/web/FormDirSiprp.jsp +++ b/trunk/AnaliseAcidentesTrabalho/web/FormDirSiprp.jsp @@ -59,9 +59,17 @@ - + + + + + + + diff --git a/trunk/AnaliseAcidentesTrabalho/web/FormGestor.jsp b/trunk/AnaliseAcidentesTrabalho/web/FormGestor.jsp index 6de105cd..9bb4788b 100644 --- a/trunk/AnaliseAcidentesTrabalho/web/FormGestor.jsp +++ b/trunk/AnaliseAcidentesTrabalho/web/FormGestor.jsp @@ -54,6 +54,18 @@ + + + + + + + + + + + diff --git a/trunk/AnaliseAcidentesTrabalho/web/FormHS.jsp b/trunk/AnaliseAcidentesTrabalho/web/FormHS.jsp index c7624579..e3b05556 100644 --- a/trunk/AnaliseAcidentesTrabalho/web/FormHS.jsp +++ b/trunk/AnaliseAcidentesTrabalho/web/FormHS.jsp @@ -20,14 +20,11 @@ - - - - - - + + + @@ -36,10 +33,8 @@ - - - - + + @@ -56,16 +51,22 @@ - - - - - - + + + + - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - + - + - + @@ -137,9 +137,8 @@ - - - + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - + - + - + @@ -212,11 +208,9 @@ - - - - - + + + - - - - + + + + - + @@ -287,8 +281,8 @@ - + @@ -297,18 +291,16 @@ - - - - - - - - - + + + + + + + - + + } catch(err) {} diff --git a/trunk/AnaliseAcidentesTrabalho/web/FormMedico.jsp b/trunk/AnaliseAcidentesTrabalho/web/FormMedico.jsp index d5bb4e45..47c453c6 100644 --- a/trunk/AnaliseAcidentesTrabalho/web/FormMedico.jsp +++ b/trunk/AnaliseAcidentesTrabalho/web/FormMedico.jsp @@ -31,6 +31,18 @@ + + + + + + + + + + + diff --git a/trunk/AnaliseAcidentesTrabalho/web/FormRH.jsp b/trunk/AnaliseAcidentesTrabalho/web/FormRH.jsp index 18894590..9fee0cb2 100644 --- a/trunk/AnaliseAcidentesTrabalho/web/FormRH.jsp +++ b/trunk/AnaliseAcidentesTrabalho/web/FormRH.jsp @@ -54,9 +54,17 @@ - + + + + + + + diff --git a/trunk/AnaliseAcidentesTrabalho/web/FormSeguranca.jsp b/trunk/AnaliseAcidentesTrabalho/web/FormSeguranca.jsp index 12d2db0e..e6956188 100644 --- a/trunk/AnaliseAcidentesTrabalho/web/FormSeguranca.jsp +++ b/trunk/AnaliseAcidentesTrabalho/web/FormSeguranca.jsp @@ -55,9 +55,19 @@ - + + + + + + + + +