forked from Coded/SIPRP
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2080 lines
56 KiB
2080 lines
56 KiB
/*
|
|
* FormHS.java
|
|
*
|
|
* Created on October 1, 2007, 1:43 PM
|
|
* Copyright lluis
|
|
*/
|
|
package analiseacidentestrabalho;
|
|
|
|
import beans.Utilizador;
|
|
import beans.AnaliseAcidente;
|
|
import com.evolute.utils.error.ErrorLogger;
|
|
import com.sun.data.provider.RowKey;
|
|
import com.sun.rave.web.ui.appbase.AbstractPageBean;
|
|
import com.sun.rave.web.ui.component.Body;
|
|
import com.sun.rave.web.ui.component.Button;
|
|
import com.sun.rave.web.ui.component.DropDown;
|
|
import com.sun.rave.web.ui.component.Form;
|
|
import com.sun.rave.web.ui.component.Head;
|
|
import com.sun.rave.web.ui.component.Html;
|
|
import com.sun.rave.web.ui.component.Hyperlink;
|
|
import com.sun.rave.web.ui.component.ImageComponent;
|
|
import com.sun.rave.web.ui.component.Link;
|
|
import com.sun.rave.web.ui.component.Page;
|
|
import com.sun.rave.web.ui.component.PanelGroup;
|
|
import com.sun.rave.web.ui.component.StaticText;
|
|
import com.sun.rave.web.ui.component.Table;
|
|
import com.sun.rave.web.ui.component.TableColumn;
|
|
import com.sun.rave.web.ui.component.TableRowGroup;
|
|
import com.sun.rave.web.ui.component.TextField;
|
|
import com.sun.rave.web.ui.model.Option;
|
|
import db.AnalisesActualDataProvider;
|
|
import db.AnalisesConcluidasDataProvider;
|
|
import db.AnalisesDataProvider;
|
|
import db.AnalisesSeguimentoDataProvider;
|
|
import global.Global;
|
|
import java.text.DateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.ArrayList;
|
|
import java.util.Calendar;
|
|
import java.util.Date;
|
|
import java.util.GregorianCalendar;
|
|
import java.util.ListIterator;
|
|
import javax.faces.FacesException;
|
|
import javax.faces.component.html.HtmlPanelGrid;
|
|
import javax.faces.context.FacesContext;
|
|
import javax.faces.event.ValueChangeEvent;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import utils.Utils;
|
|
|
|
/**
|
|
* <p>Page bean that corresponds to a similarly named JSP page. This
|
|
* class contains component definitions (and initialization code) for
|
|
* all components that you have defined on this page, as well as
|
|
* lifecycle methods and event handlers where you may add behavior
|
|
* to respond to incoming events.</p>
|
|
*/
|
|
public class FormHS extends AbstractPageBean {
|
|
// <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
|
|
private int __placeholder;
|
|
|
|
/**
|
|
* <p>Automatically managed component initialization. <strong>WARNING:</strong>
|
|
* This method is automatically generated, so any user-specified code inserted
|
|
* here is subject to being replaced.</p>
|
|
*/
|
|
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 void setGridLayoutTop1(HtmlPanelGrid hpg) {
|
|
this.gridLayoutTop1 = hpg;
|
|
}
|
|
|
|
private HtmlPanelGrid gridActual1 = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridActual1() {
|
|
return gridActual1;
|
|
}
|
|
|
|
public void setGridActual1(HtmlPanelGrid hpg) {
|
|
this.gridActual1 = hpg;
|
|
}
|
|
|
|
private HtmlPanelGrid gridPanel2 = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridPanel2() {
|
|
return gridPanel2;
|
|
}
|
|
|
|
public void setGridPanel2(HtmlPanelGrid hpg) {
|
|
this.gridPanel2 = hpg;
|
|
}
|
|
|
|
private StaticText staticText4 = new StaticText();
|
|
|
|
public StaticText getStaticText4() {
|
|
return staticText4;
|
|
}
|
|
|
|
public void setStaticText4(StaticText st) {
|
|
this.staticText4 = st;
|
|
}
|
|
|
|
private StaticText staticText5 = new StaticText();
|
|
|
|
public StaticText getStaticText5() {
|
|
return staticText5;
|
|
}
|
|
|
|
public void setStaticText5(StaticText st) {
|
|
this.staticText5 = st;
|
|
}
|
|
|
|
private HtmlPanelGrid gridPanel3 = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridPanel3() {
|
|
return gridPanel3;
|
|
}
|
|
|
|
public void setGridPanel3(HtmlPanelGrid hpg) {
|
|
this.gridPanel3 = hpg;
|
|
}
|
|
|
|
private Table table1 = new Table();
|
|
|
|
public Table getTable1() {
|
|
return table1;
|
|
}
|
|
|
|
public void setTable1(Table t) {
|
|
this.table1 = t;
|
|
}
|
|
|
|
private TableRowGroup tableRowGroup1 = new TableRowGroup();
|
|
|
|
public TableRowGroup getTableRowGroup1() {
|
|
return tableRowGroup1;
|
|
}
|
|
|
|
public void setTableRowGroup1(TableRowGroup trg) {
|
|
this.tableRowGroup1 = trg;
|
|
}
|
|
|
|
private TableColumn tableColumn1 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn1() {
|
|
return tableColumn1;
|
|
}
|
|
|
|
public void setTableColumn1(TableColumn tc) {
|
|
this.tableColumn1 = tc;
|
|
}
|
|
|
|
private Hyperlink lnkDataAcidente = new Hyperlink();
|
|
|
|
public Hyperlink getLnkDataAcidente() {
|
|
return lnkDataAcidente;
|
|
}
|
|
|
|
public void setLnkDataAcidente(Hyperlink h) {
|
|
this.lnkDataAcidente = h;
|
|
}
|
|
|
|
private TableColumn tableColumn2 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn2() {
|
|
return tableColumn2;
|
|
}
|
|
|
|
public void setTableColumn2(TableColumn tc) {
|
|
this.tableColumn2 = tc;
|
|
}
|
|
|
|
private Hyperlink lnkNr = new Hyperlink();
|
|
|
|
public Hyperlink getLnkNr() {
|
|
return lnkNr;
|
|
}
|
|
|
|
public void setLnkNr(Hyperlink h) {
|
|
this.lnkNr = h;
|
|
}
|
|
|
|
private TableColumn tableColumn3 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn3() {
|
|
return tableColumn3;
|
|
}
|
|
|
|
public void setTableColumn3(TableColumn tc) {
|
|
this.tableColumn3 = tc;
|
|
}
|
|
|
|
private Hyperlink lnkNomeAcidentado = new Hyperlink();
|
|
|
|
public Hyperlink getLnkNomeAcidentado() {
|
|
return lnkNomeAcidentado;
|
|
}
|
|
|
|
public void setLnkNomeAcidentado(Hyperlink h) {
|
|
this.lnkNomeAcidentado = h;
|
|
}
|
|
|
|
private HtmlPanelGrid gridSeguimento1 = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridSeguimento1() {
|
|
return gridSeguimento1;
|
|
}
|
|
|
|
public void setGridSeguimento1(HtmlPanelGrid hpg) {
|
|
this.gridSeguimento1 = hpg;
|
|
}
|
|
|
|
private HtmlPanelGrid gridPanel4 = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridPanel4() {
|
|
return gridPanel4;
|
|
}
|
|
|
|
public void setGridPanel4(HtmlPanelGrid hpg) {
|
|
this.gridPanel4 = hpg;
|
|
}
|
|
|
|
private StaticText staticText6 = new StaticText();
|
|
|
|
public StaticText getStaticText6() {
|
|
return staticText6;
|
|
}
|
|
|
|
public void setStaticText6(StaticText st) {
|
|
this.staticText6 = st;
|
|
}
|
|
|
|
private HtmlPanelGrid gridPanel5 = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridPanel5() {
|
|
return gridPanel5;
|
|
}
|
|
|
|
public void setGridPanel5(HtmlPanelGrid hpg) {
|
|
this.gridPanel5 = hpg;
|
|
}
|
|
|
|
private Table table2 = new Table();
|
|
|
|
public Table getTable2() {
|
|
return table2;
|
|
}
|
|
|
|
public void setTable2(Table t) {
|
|
this.table2 = t;
|
|
}
|
|
|
|
private TableRowGroup tableRowGroup2 = new TableRowGroup();
|
|
|
|
public TableRowGroup getTableRowGroup2() {
|
|
return tableRowGroup2;
|
|
}
|
|
|
|
public void setTableRowGroup2(TableRowGroup trg) {
|
|
this.tableRowGroup2 = trg;
|
|
}
|
|
|
|
private TableColumn tableColumn4 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn4() {
|
|
return tableColumn4;
|
|
}
|
|
|
|
public void setTableColumn4(TableColumn tc) {
|
|
this.tableColumn4 = tc;
|
|
}
|
|
|
|
private Hyperlink lnkDataAcidenteSeg = new Hyperlink();
|
|
|
|
public Hyperlink getLnkDataAcidenteSeg() {
|
|
return lnkDataAcidenteSeg;
|
|
}
|
|
|
|
public void setLnkDataAcidenteSeg(Hyperlink h) {
|
|
this.lnkDataAcidenteSeg = h;
|
|
}
|
|
|
|
private TableColumn tableColumn5 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn5() {
|
|
return tableColumn5;
|
|
}
|
|
|
|
public void setTableColumn5(TableColumn tc) {
|
|
this.tableColumn5 = tc;
|
|
}
|
|
|
|
private Hyperlink lnkNrSeg = new Hyperlink();
|
|
|
|
public Hyperlink getLnkNrSeg() {
|
|
return lnkNrSeg;
|
|
}
|
|
|
|
public void setLnkNrSeg(Hyperlink h) {
|
|
this.lnkNrSeg = h;
|
|
}
|
|
|
|
private TableColumn tableColumn6 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn6() {
|
|
return tableColumn6;
|
|
}
|
|
|
|
public void setTableColumn6(TableColumn tc) {
|
|
this.tableColumn6 = tc;
|
|
}
|
|
|
|
private Hyperlink lnkNomeAcidentadoSeg = new Hyperlink();
|
|
|
|
public Hyperlink getLnkNomeAcidentadoSeg() {
|
|
return lnkNomeAcidentadoSeg;
|
|
}
|
|
|
|
public void setLnkNomeAcidentadoSeg(Hyperlink h) {
|
|
this.lnkNomeAcidentadoSeg = h;
|
|
}
|
|
|
|
private HtmlPanelGrid gridConcluidos1 = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridConcluidos1() {
|
|
return gridConcluidos1;
|
|
}
|
|
|
|
public void setGridConcluidos1(HtmlPanelGrid hpg) {
|
|
this.gridConcluidos1 = hpg;
|
|
}
|
|
|
|
private HtmlPanelGrid gridPanel6 = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridPanel6() {
|
|
return gridPanel6;
|
|
}
|
|
|
|
public void setGridPanel6(HtmlPanelGrid hpg) {
|
|
this.gridPanel6 = hpg;
|
|
}
|
|
|
|
private StaticText staticText7 = new StaticText();
|
|
|
|
public StaticText getStaticText7() {
|
|
return staticText7;
|
|
}
|
|
|
|
public void setStaticText7(StaticText st) {
|
|
this.staticText7 = st;
|
|
}
|
|
|
|
private HtmlPanelGrid gridPanel7 = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridPanel7() {
|
|
return gridPanel7;
|
|
}
|
|
|
|
public void setGridPanel7(HtmlPanelGrid hpg) {
|
|
this.gridPanel7 = hpg;
|
|
}
|
|
|
|
private PanelGroup groupPanel3 = new PanelGroup();
|
|
|
|
public PanelGroup getGroupPanel3() {
|
|
return groupPanel3;
|
|
}
|
|
|
|
public void setGroupPanel3(PanelGroup pg) {
|
|
this.groupPanel3 = pg;
|
|
}
|
|
|
|
private StaticText staticText8 = new StaticText();
|
|
|
|
public StaticText getStaticText8() {
|
|
return staticText8;
|
|
}
|
|
|
|
public void setStaticText8(StaticText st) {
|
|
this.staticText8 = st;
|
|
}
|
|
|
|
private DropDown drpAno = new DropDown();
|
|
|
|
public DropDown getDrpAno() {
|
|
return drpAno;
|
|
}
|
|
|
|
public void setDrpAno(DropDown dd) {
|
|
this.drpAno = dd;
|
|
}
|
|
|
|
private PanelGroup groupPanel4 = new PanelGroup();
|
|
|
|
public PanelGroup getGroupPanel4() {
|
|
return groupPanel4;
|
|
}
|
|
|
|
public void setGroupPanel4(PanelGroup pg) {
|
|
this.groupPanel4 = pg;
|
|
}
|
|
|
|
private StaticText lblMes = new StaticText();
|
|
|
|
public StaticText getLblMes() {
|
|
return lblMes;
|
|
}
|
|
|
|
public void setLblMes(StaticText st) {
|
|
this.lblMes = st;
|
|
}
|
|
|
|
private DropDown drpMes = new DropDown();
|
|
|
|
public DropDown getDrpMes() {
|
|
return drpMes;
|
|
}
|
|
|
|
public void setDrpMes(DropDown dd) {
|
|
this.drpMes = dd;
|
|
}
|
|
|
|
private PanelGroup groupPanel5 = new PanelGroup();
|
|
|
|
public PanelGroup getGroupPanel5() {
|
|
return groupPanel5;
|
|
}
|
|
|
|
public void setGroupPanel5(PanelGroup pg) {
|
|
this.groupPanel5 = pg;
|
|
}
|
|
|
|
private StaticText lblDia = new StaticText();
|
|
|
|
public StaticText getLblDia() {
|
|
return lblDia;
|
|
}
|
|
|
|
public void setLblDia(StaticText st) {
|
|
this.lblDia = st;
|
|
}
|
|
|
|
private DropDown drpDia = new DropDown();
|
|
|
|
public DropDown getDrpDia() {
|
|
return drpDia;
|
|
}
|
|
|
|
public void setDrpDia(DropDown dd) {
|
|
this.drpDia = dd;
|
|
}
|
|
|
|
private PanelGroup groupPanel6 = new PanelGroup();
|
|
|
|
public PanelGroup getGroupPanel6() {
|
|
return groupPanel6;
|
|
}
|
|
|
|
public void setGroupPanel6(PanelGroup pg) {
|
|
this.groupPanel6 = pg;
|
|
}
|
|
|
|
private StaticText staticText9 = new StaticText();
|
|
|
|
public StaticText getStaticText9() {
|
|
return staticText9;
|
|
}
|
|
|
|
public void setStaticText9(StaticText st) {
|
|
this.staticText9 = st;
|
|
}
|
|
|
|
private TextField txtNome = new TextField();
|
|
|
|
public TextField getTxtNome() {
|
|
return txtNome;
|
|
}
|
|
|
|
public void setTxtNome(TextField tf) {
|
|
this.txtNome = tf;
|
|
}
|
|
|
|
private Button butPesquisar = new Button();
|
|
|
|
public Button getButPesquisar() {
|
|
return butPesquisar;
|
|
}
|
|
|
|
public void setButPesquisar(Button b) {
|
|
this.butPesquisar = b;
|
|
}
|
|
|
|
private HtmlPanelGrid gridPanel8 = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridPanel8() {
|
|
return gridPanel8;
|
|
}
|
|
|
|
public void setGridPanel8(HtmlPanelGrid hpg) {
|
|
this.gridPanel8 = hpg;
|
|
}
|
|
|
|
private Table table3 = new Table();
|
|
|
|
public Table getTable3() {
|
|
return table3;
|
|
}
|
|
|
|
public void setTable3(Table t) {
|
|
this.table3 = t;
|
|
}
|
|
|
|
private TableRowGroup tableRowGroup3 = new TableRowGroup();
|
|
|
|
public TableRowGroup getTableRowGroup3() {
|
|
return tableRowGroup3;
|
|
}
|
|
|
|
public void setTableRowGroup3(TableRowGroup trg) {
|
|
this.tableRowGroup3 = trg;
|
|
}
|
|
|
|
private TableColumn tableColumn7 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn7() {
|
|
return tableColumn7;
|
|
}
|
|
|
|
public void setTableColumn7(TableColumn tc) {
|
|
this.tableColumn7 = tc;
|
|
}
|
|
|
|
private Hyperlink lnkDataConcluida = new Hyperlink();
|
|
|
|
public Hyperlink getLnkDataConcluida() {
|
|
return lnkDataConcluida;
|
|
}
|
|
|
|
public void setLnkDataConcluida(Hyperlink h) {
|
|
this.lnkDataConcluida = h;
|
|
}
|
|
|
|
private TableColumn tableColumn8 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn8() {
|
|
return tableColumn8;
|
|
}
|
|
|
|
public void setTableColumn8(TableColumn tc) {
|
|
this.tableColumn8 = tc;
|
|
}
|
|
|
|
private Hyperlink lnkNrConcluida = new Hyperlink();
|
|
|
|
public Hyperlink getLnkNrConcluida() {
|
|
return lnkNrConcluida;
|
|
}
|
|
|
|
public void setLnkNrConcluida(Hyperlink h) {
|
|
this.lnkNrConcluida = h;
|
|
}
|
|
|
|
private TableColumn tableColumn9 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn9() {
|
|
return tableColumn9;
|
|
}
|
|
|
|
public void setTableColumn9(TableColumn tc) {
|
|
this.tableColumn9 = tc;
|
|
}
|
|
|
|
private Hyperlink lnkNomeConcluida = new Hyperlink();
|
|
|
|
public Hyperlink getLnkNomeConcluida() {
|
|
return lnkNomeConcluida;
|
|
}
|
|
|
|
public void setLnkNomeConcluida(Hyperlink h) {
|
|
this.lnkNomeConcluida = h;
|
|
}
|
|
|
|
private StaticText txtSearchMsg = new StaticText();
|
|
|
|
public StaticText getTxtSearchMsg() {
|
|
return txtSearchMsg;
|
|
}
|
|
|
|
public void setTxtSearchMsg(StaticText st) {
|
|
this.txtSearchMsg = st;
|
|
}
|
|
|
|
private TableColumn tableColumn10 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn10() {
|
|
return tableColumn10;
|
|
}
|
|
|
|
public void setTableColumn10(TableColumn tc) {
|
|
this.tableColumn10 = tc;
|
|
}
|
|
|
|
private Hyperlink lnkFase = new Hyperlink();
|
|
|
|
public Hyperlink getLnkFase() {
|
|
return lnkFase;
|
|
}
|
|
|
|
public void setLnkFase(Hyperlink h) {
|
|
this.lnkFase = h;
|
|
}
|
|
|
|
private TableColumn tableColumn11 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn11() {
|
|
return tableColumn11;
|
|
}
|
|
|
|
public void setTableColumn11(TableColumn tc) {
|
|
this.tableColumn11 = tc;
|
|
}
|
|
|
|
private Hyperlink lnkFaseSeg = new Hyperlink();
|
|
|
|
public Hyperlink getLnkFaseSeg() {
|
|
return lnkFaseSeg;
|
|
}
|
|
|
|
public void setLnkFaseSeg(Hyperlink h) {
|
|
this.lnkFaseSeg = h;
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
private Hyperlink lnkPor = new Hyperlink();
|
|
|
|
public Hyperlink getLnkPor() {
|
|
return lnkPor;
|
|
}
|
|
|
|
public void setLnkPor(Hyperlink h) {
|
|
this.lnkPor = h;
|
|
}
|
|
|
|
private Hyperlink lnkPorSeg = new Hyperlink();
|
|
|
|
public Hyperlink getLnkPorSeg() {
|
|
return lnkPorSeg;
|
|
}
|
|
|
|
public void setLnkPorSeg(Hyperlink h) {
|
|
this.lnkPorSeg = h;
|
|
}
|
|
|
|
private Hyperlink lnkPorConcluida = new Hyperlink();
|
|
|
|
public Hyperlink getLnkPorConcluida() {
|
|
return lnkPorConcluida;
|
|
}
|
|
|
|
public void setLnkPorConcluida(Hyperlink h) {
|
|
this.lnkPorConcluida = h;
|
|
}
|
|
|
|
private Hyperlink lnkEstabConcluida = new Hyperlink();
|
|
|
|
public Hyperlink getLnkEstabConcluida() {
|
|
return lnkEstabConcluida;
|
|
}
|
|
|
|
public void setLnkEstabConcluida(Hyperlink h) {
|
|
this.lnkEstabConcluida = h;
|
|
}
|
|
|
|
private PanelGroup groupPanel7 = new PanelGroup();
|
|
|
|
public PanelGroup getGroupPanel7() {
|
|
return groupPanel7;
|
|
}
|
|
|
|
public void setGroupPanel7(PanelGroup pg) {
|
|
this.groupPanel7 = pg;
|
|
}
|
|
|
|
private StaticText staticText3 = new StaticText();
|
|
|
|
public StaticText getStaticText3() {
|
|
return staticText3;
|
|
}
|
|
|
|
public void setStaticText3(StaticText st) {
|
|
this.staticText3 = st;
|
|
}
|
|
|
|
private TextField txtPor = new TextField();
|
|
|
|
public TextField getTxtPor() {
|
|
return txtPor;
|
|
}
|
|
|
|
public void setTxtPor(TextField tf) {
|
|
this.txtPor = tf;
|
|
}
|
|
|
|
private HtmlPanelGrid gridPanel9 = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridPanel9() {
|
|
return gridPanel9;
|
|
}
|
|
|
|
public void setGridPanel9(HtmlPanelGrid hpg) {
|
|
this.gridPanel9 = hpg;
|
|
}
|
|
|
|
private PanelGroup groupPanel8 = new PanelGroup();
|
|
|
|
public PanelGroup getGroupPanel8() {
|
|
return groupPanel8;
|
|
}
|
|
|
|
public void setGroupPanel8(PanelGroup pg) {
|
|
this.groupPanel8 = pg;
|
|
}
|
|
|
|
private StaticText staticText10 = new StaticText();
|
|
|
|
public StaticText getStaticText10() {
|
|
return staticText10;
|
|
}
|
|
|
|
public void setStaticText10(StaticText st) {
|
|
this.staticText10 = st;
|
|
}
|
|
|
|
private ImageComponent image3 = new ImageComponent();
|
|
|
|
public ImageComponent getImage3() {
|
|
return image3;
|
|
}
|
|
|
|
public void setImage3(ImageComponent ic) {
|
|
this.image3 = ic;
|
|
}
|
|
|
|
private StaticText staticText11 = new StaticText();
|
|
|
|
public StaticText getStaticText11() {
|
|
return staticText11;
|
|
}
|
|
|
|
public void setStaticText11(StaticText st) {
|
|
this.staticText11 = st;
|
|
}
|
|
|
|
private HtmlPanelGrid gridPanel10 = new HtmlPanelGrid();
|
|
|
|
public HtmlPanelGrid getGridPanel10() {
|
|
return gridPanel10;
|
|
}
|
|
|
|
public void setGridPanel10(HtmlPanelGrid hpg) {
|
|
this.gridPanel10 = hpg;
|
|
}
|
|
|
|
private StaticText txtMsg = new StaticText();
|
|
|
|
public StaticText getTxtMsg() {
|
|
return txtMsg;
|
|
}
|
|
|
|
public void setTxtMsg(StaticText st) {
|
|
this.txtMsg = st;
|
|
}
|
|
|
|
private TableColumn tableColumn16 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn16() {
|
|
return tableColumn16;
|
|
}
|
|
|
|
public void setTableColumn16(TableColumn tc) {
|
|
this.tableColumn16 = tc;
|
|
}
|
|
|
|
private Hyperlink lnkDataAbertura = new Hyperlink();
|
|
|
|
public Hyperlink getLnkDataAbertura() {
|
|
return lnkDataAbertura;
|
|
}
|
|
|
|
public void setLnkDataAbertura(Hyperlink h) {
|
|
this.lnkDataAbertura = h;
|
|
}
|
|
|
|
private TableColumn tableColumn17 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn17() {
|
|
return tableColumn17;
|
|
}
|
|
|
|
public void setTableColumn17(TableColumn tc) {
|
|
this.tableColumn17 = tc;
|
|
}
|
|
|
|
private Hyperlink lnkDataAberturaSeg = new Hyperlink();
|
|
|
|
public Hyperlink getLnkDataAberturaSeg() {
|
|
return lnkDataAberturaSeg;
|
|
}
|
|
|
|
public void setLnkDataAberturaSeg(Hyperlink h) {
|
|
this.lnkDataAberturaSeg = h;
|
|
}
|
|
|
|
private TableColumn tableColumn18 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn18() {
|
|
return tableColumn18;
|
|
}
|
|
|
|
public void setTableColumn18(TableColumn tc) {
|
|
this.tableColumn18 = tc;
|
|
}
|
|
|
|
private Hyperlink lnkDataAberturaConcluida = new Hyperlink();
|
|
|
|
public Hyperlink getLnkDataAberturaConcluida() {
|
|
return lnkDataAberturaConcluida;
|
|
}
|
|
|
|
public void setLnkDataAberturaConcluida(Hyperlink h) {
|
|
this.lnkDataAberturaConcluida = h;
|
|
}
|
|
|
|
private TableColumn tableColumn19 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn19() {
|
|
return tableColumn19;
|
|
}
|
|
|
|
public void setTableColumn19(TableColumn tc) {
|
|
this.tableColumn19 = tc;
|
|
}
|
|
|
|
private Hyperlink lnkEstabelecimento = new Hyperlink();
|
|
|
|
public Hyperlink getLnkEstabelecimento() {
|
|
return lnkEstabelecimento;
|
|
}
|
|
|
|
public void setLnkEstabelecimento(Hyperlink h) {
|
|
this.lnkEstabelecimento = h;
|
|
}
|
|
|
|
private TableColumn tableColumn20 = new TableColumn();
|
|
|
|
public TableColumn getTableColumn20() {
|
|
return tableColumn20;
|
|
}
|
|
|
|
public void setTableColumn20(TableColumn tc) {
|
|
this.tableColumn20 = tc;
|
|
}
|
|
|
|
private Hyperlink lnkEstabelecimentoSeg = new Hyperlink();
|
|
|
|
public Hyperlink getLnkEstabelecimentoSeg() {
|
|
return lnkEstabelecimentoSeg;
|
|
}
|
|
|
|
public void setLnkEstabelecimentoSeg(Hyperlink h) {
|
|
this.lnkEstabelecimentoSeg = h;
|
|
}
|
|
private StaticText lblUser = new StaticText();
|
|
|
|
public StaticText getLblUser() {
|
|
return lblUser;
|
|
}
|
|
|
|
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 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 StaticText labelFilterEstabelecimentoActual = new StaticText();
|
|
public StaticText getLabelFilterEstabelecimentoActual() {
|
|
return labelFilterEstabelecimentoActual;
|
|
}
|
|
public void setLabelFilterEstabelecimentoActual(StaticText labelFilterEstabelecimentoActual) {
|
|
this.labelFilterEstabelecimentoActual = labelFilterEstabelecimentoActual;
|
|
}
|
|
|
|
private TextField textFilterEstabelecimentoActual = new TextField();
|
|
|
|
public TextField getTextFilterEstabelecimentoActual() {
|
|
return textFilterEstabelecimentoActual;
|
|
}
|
|
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 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() {
|
|
return 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 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 StaticText labelFilterEstabelecimentoSeg = new StaticText();
|
|
public StaticText getLabelFilterEstabelecimentoSeg() {
|
|
return labelFilterEstabelecimentoSeg;
|
|
}
|
|
public void setLabelFilterEstabelecimentoSeg(StaticText labelFilterEstabelecimentoSeg) {
|
|
this.labelFilterEstabelecimentoSeg = labelFilterEstabelecimentoSeg;
|
|
}
|
|
|
|
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()
|
|
{
|
|
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() {
|
|
return 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 TextField textFilterEstabelecimentoConc = new TextField();
|
|
|
|
public TextField getTextFilterEstabelecimentoConc() {
|
|
return textFilterEstabelecimentoConc;
|
|
}
|
|
|
|
public void setTextFilterEstabelecimentoConc(TextField textFilterEstabelecimentoConc) {
|
|
this.textFilterEstabelecimentoConc = textFilterEstabelecimentoConc;
|
|
}
|
|
|
|
|
|
private static final DateFormat D_F = new SimpleDateFormat( "yyyy-MM-dd" );
|
|
// </editor-fold>
|
|
|
|
/**
|
|
* <p>Construct a new Page bean instance.</p>
|
|
*/
|
|
public FormHS() {
|
|
}
|
|
|
|
/**
|
|
* <p>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.</p>
|
|
*
|
|
* <p>Note that, if the current request is a postback, the property
|
|
* values of the components do <strong>not</strong> represent any
|
|
* values submitted with this request. Instead, they represent the
|
|
* property values that were saved for this view when it was rendered.</p>
|
|
*/
|
|
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
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="Managed Component Initialization">
|
|
// 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);
|
|
}
|
|
|
|
// </editor-fold>
|
|
// 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 . . .
|
|
}
|
|
}
|
|
}
|
|
|
|
/**
|
|
* <p>Callback method that is called after the component tree has been
|
|
* restored, but before any event processing takes place. This method
|
|
* will <strong>only</strong> 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.</p>
|
|
*/
|
|
public void preprocess() {
|
|
}
|
|
|
|
/**
|
|
* <p>Callback method that is called just before rendering takes place.
|
|
* This method will <strong>only</strong> 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.</p>
|
|
*/
|
|
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())
|
|
{
|
|
AnalisesDataProvider adp = new AnalisesDataProvider();
|
|
try
|
|
{
|
|
//lblActivos.setRendered(true);
|
|
table1.setRendered(true);
|
|
|
|
//ArrayList actuaisList = adp.getAnalisesActuaisList(getSessionBean1().getCurrentUser().getEstabelecimento_id(), new Integer(3));
|
|
ArrayList actuaisList = adp.getAnalisesActuaisHsList( getSessionBean1().getCurrentUser().getEstabelecimento_id() );
|
|
getSessionBean1().getAnalisesActualDataProvider().setList(actuaisList);
|
|
}
|
|
catch(Exception ex)
|
|
{
|
|
//lblActivos.setRendered(false);
|
|
table1.setRendered(false);
|
|
ErrorLogger.logException( ex );
|
|
}
|
|
|
|
try
|
|
{
|
|
//lblActivos.setRendered(true);
|
|
table2.setRendered(true);
|
|
|
|
ArrayList seguimentoList = adp.getAnalisesSeguimentoHsList(getSessionBean1().getCurrentUser().getEstabelecimento_id());
|
|
getSessionBean1().getAnalisesSeguimentoDataProvider().setList(seguimentoList);
|
|
}
|
|
catch(Exception ex)
|
|
{
|
|
//lblActivos.setRendered(false);
|
|
table2.setRendered(false);
|
|
ErrorLogger.logException( ex );
|
|
}
|
|
|
|
try
|
|
{
|
|
//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("");
|
|
}
|
|
|
|
/**
|
|
* <p>Callback method that is called after rendering is completed for
|
|
* this request, if <code>init()</code> was called (regardless of whether
|
|
* or not this was the page that was actually rendered). Customize this
|
|
* method to release resources acquired in the <code>init()</code>,
|
|
* <code>preprocess()</code>, or <code>prerender()</code> methods (or
|
|
* acquired during execution of an event handler).</p>
|
|
*/
|
|
public void destroy() {
|
|
}
|
|
|
|
/**
|
|
* <p>Return a reference to the scoped data bean.</p>
|
|
*/
|
|
protected ApplicationBean1 getApplicationBean1() {
|
|
return (ApplicationBean1)getBean("ApplicationBean1");
|
|
}
|
|
|
|
/**
|
|
* <p>Return a reference to the scoped data bean.</p>
|
|
*/
|
|
protected SessionBean1 getSessionBean1() {
|
|
return (SessionBean1)getBean("SessionBean1");
|
|
}
|
|
|
|
/**
|
|
* <p>Return a reference to the scoped data bean.</p>
|
|
*/
|
|
protected RequestBean1 getRequestBean1() {
|
|
return (RequestBean1)getBean("RequestBean1");
|
|
}
|
|
|
|
public String lnkLogout_action()
|
|
{
|
|
try
|
|
{
|
|
javax.servlet.http.HttpSession session =
|
|
(javax.servlet.http.HttpSession) getExternalContext().getSession(true);
|
|
session.invalidate();
|
|
Utils.doLogout();
|
|
}
|
|
catch(Exception ex)
|
|
{
|
|
ErrorLogger.logException( ex );
|
|
}
|
|
|
|
try
|
|
{
|
|
getExternalContext().redirect("Login.jsp");
|
|
}
|
|
catch(Exception e)
|
|
{
|
|
ErrorLogger.logException( e );
|
|
}
|
|
//return "login";
|
|
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;
|
|
}
|
|
}
|
|
|
|
String estabelecimento = null;
|
|
if ( textFilterEstabelecimentoConc.getText() != null )
|
|
{
|
|
estabelecimento = (( String ) textFilterEstabelecimentoConc.getText()).trim();
|
|
if( estabelecimento.length() == 0 )
|
|
{
|
|
estabelecimento = null;
|
|
}
|
|
}
|
|
|
|
AnalisesDataProvider adp = new AnalisesDataProvider();
|
|
try
|
|
{
|
|
|
|
//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));
|
|
// }
|
|
AnalisesDataProvider adp = new AnalisesDataProvider();
|
|
try
|
|
{
|
|
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) );
|
|
}
|
|
|
|
public String lnkEditUser_action() {
|
|
// TODO: Replace with your code
|
|
getSessionBean1().setNavFrom("FormHS");
|
|
getSessionBean1().setModoEdicaoUtilizador("edit");
|
|
return "user";
|
|
}
|
|
|
|
public String lnkDataConcluida_action() {
|
|
// TODO: Replace with your code
|
|
|
|
AnaliseAcidente a = getTableConcluidasRowData();
|
|
getSessionBean1().setCurrentAnalise(a);
|
|
getSessionBean1().setNavFrom("FormHS");
|
|
return "view_analise";
|
|
}
|
|
|
|
public String lnkDataAberturaConcluida_action() {
|
|
// TODO: Replace with your code
|
|
|
|
AnaliseAcidente a = getTableConcluidasRowData();
|
|
getSessionBean1().setCurrentAnalise(a);
|
|
getSessionBean1().setNavFrom("FormHS");
|
|
return "view_analise";
|
|
}
|
|
|
|
public String lnkNrConcluida_action() {
|
|
// TODO: Replace with your code
|
|
|
|
AnaliseAcidente a = getTableConcluidasRowData();
|
|
getSessionBean1().setCurrentAnalise(a);
|
|
getSessionBean1().setNavFrom("FormHS");
|
|
return "view_analise";
|
|
}
|
|
|
|
public String lnkNomeConcluida_action() {
|
|
// TODO: Replace with your code
|
|
|
|
AnaliseAcidente a = getTableConcluidasRowData();
|
|
getSessionBean1().setCurrentAnalise(a);
|
|
getSessionBean1().setNavFrom("FormHS");
|
|
return "view_analise";
|
|
}
|
|
|
|
public String lnkFase_action() {
|
|
// TODO: Replace with your code
|
|
|
|
AnaliseAcidente a = getTableActivosRowData();
|
|
getSessionBean1().setCurrentAnalise(a);
|
|
getSessionBean1().setNavFrom("FormHS");
|
|
return "analise_acidente";
|
|
}
|
|
|
|
public String lnkEstabelecimento_action() {
|
|
// TODO: Replace with your code
|
|
|
|
AnaliseAcidente a = getTableActivosRowData();
|
|
getSessionBean1().setCurrentAnalise(a);
|
|
getSessionBean1().setNavFrom("FormHS");
|
|
return "analise_acidente";
|
|
}
|
|
|
|
public String lnkFaseSeg_action() {
|
|
// TODO: Replace with your code
|
|
|
|
AnaliseAcidente a = getTableSeguimentoRowData();
|
|
getSessionBean1().setCurrentAnalise(a);
|
|
getSessionBean1().setNavFrom("FormHS");
|
|
return "view_analise";
|
|
}
|
|
|
|
public String lnkEstabelecimentoSeg_action() {
|
|
// TODO: Replace with your code
|
|
|
|
AnaliseAcidente a = getTableSeguimentoRowData();
|
|
getSessionBean1().setCurrentAnalise(a);
|
|
getSessionBean1().setNavFrom("FormHS");
|
|
return "view_analise";
|
|
}
|
|
|
|
|
|
public String lnkPor_action() {
|
|
// TODO: Replace with your code
|
|
|
|
AnaliseAcidente a = getTableActivosRowData();
|
|
getSessionBean1().setCurrentAnalise(a);
|
|
getSessionBean1().setNavFrom("FormHS");
|
|
return "analise_acidente";
|
|
}
|
|
|
|
public String lnkPorSeg_action() {
|
|
// TODO: Replace with your code
|
|
|
|
AnaliseAcidente a = getTableSeguimentoRowData();
|
|
getSessionBean1().setCurrentAnalise(a);
|
|
getSessionBean1().setNavFrom("FormHs");
|
|
return "view_analise";
|
|
}
|
|
|
|
public String lnkPorConcluida_action() {
|
|
// TODO: Replace with your code
|
|
|
|
AnaliseAcidente a = getTableConcluidasRowData();
|
|
getSessionBean1().setCurrentAnalise(a);
|
|
getSessionBean1().setNavFrom("FormHS");
|
|
return "view_analise";
|
|
}
|
|
|
|
public String lnkEstabConcluida_action() {
|
|
// TODO: Replace with your code
|
|
|
|
AnaliseAcidente a = getTableConcluidasRowData();
|
|
getSessionBean1().setCurrentAnalise(a);
|
|
getSessionBean1().setNavFrom("FormHS");
|
|
return "view_analise";
|
|
}
|
|
|
|
public String lnkNewUser_action() {
|
|
// TODO: Replace with your code
|
|
|
|
return null;
|
|
}
|
|
|
|
public String lnkAjuda_action() {
|
|
// TODO: Replace with your code
|
|
// ServletContext theApplicationsServletContext =
|
|
// (ServletContext) this.getExternalContext().getContext();
|
|
// String pdfFolderPath = theApplicationsServletContext.getRealPath(Global.PDF_FOLDER_URL);
|
|
// String pdfFilePath = pdfFolderPath + "/Ajuda.pdf";
|
|
//
|
|
// Global global = new Global();
|
|
// try
|
|
// {
|
|
// global.showPdf(pdfFilePath);
|
|
// }
|
|
// catch(Exception ex)
|
|
// {
|
|
// ErrorLogger.logException( ex );
|
|
// }
|
|
return null;
|
|
}
|
|
|
|
public String lnkAnalisesAcidente_action() {
|
|
// TODO: Replace with your code
|
|
return null;
|
|
}
|
|
|
|
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 buttonFilterActual_action()
|
|
{
|
|
Date visitaDate = ( Date ) calFilterDateActual.getValue();
|
|
String visitaDateStr = null;
|
|
if ( visitaDate != null )
|
|
{
|
|
visitaDateStr = D_F.format( visitaDate );
|
|
}
|
|
|
|
String POR = null;
|
|
if ( textFilterPORActual.getText() != null )
|
|
{
|
|
POR = ( ( String ) textFilterPORActual.getText() ).trim();
|
|
if ( POR.length() == 0 )
|
|
{
|
|
POR = null;
|
|
}
|
|
}
|
|
|
|
String nome = null;
|
|
if ( textFilterNameActual.getText() != null )
|
|
{
|
|
nome = (( String ) textFilterNameActual.getText()).trim();
|
|
if( nome.length() == 0 )
|
|
{
|
|
nome = null;
|
|
}
|
|
}
|
|
|
|
String estabelecimento = null;
|
|
if ( textFilterEstabelecimentoActual.getText() != null )
|
|
{
|
|
estabelecimento = (( String ) textFilterEstabelecimentoActual.getText()).trim();
|
|
if( estabelecimento.length() == 0 )
|
|
{
|
|
estabelecimento = null;
|
|
}
|
|
}
|
|
|
|
AnalisesDataProvider adp = new AnalisesDataProvider();
|
|
try
|
|
{
|
|
ArrayList actualList = adp.searchAnalisesActuaisHS(
|
|
getSessionBean1().getCurrentUser().getEstabelecimento_id(),
|
|
nome, estabelecimento, visitaDateStr, POR );
|
|
|
|
table1.setRendered( true );
|
|
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 !" );
|
|
ErrorLogger.logException( e );
|
|
}
|
|
|
|
return null;
|
|
}
|
|
|
|
public String buttonFilterSeg_action()
|
|
{
|
|
Date visitaDate = ( Date ) calFilterDateSeg.getValue();
|
|
String visitaDateStr = null;
|
|
if ( visitaDate != null )
|
|
{
|
|
visitaDateStr = D_F.format( visitaDate );
|
|
}
|
|
|
|
String POR = null;
|
|
if ( textFilterPORSeg.getText() != null )
|
|
{
|
|
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 estabelecimento = null;
|
|
if ( textFilterEstabelecimentoSeg.getText() != null )
|
|
{
|
|
estabelecimento = (( String ) textFilterEstabelecimentoSeg.getText()).trim();
|
|
if( estabelecimento.length() == 0 )
|
|
{
|
|
estabelecimento = null;
|
|
}
|
|
}
|
|
|
|
AnalisesDataProvider adp = new AnalisesDataProvider();
|
|
try
|
|
{
|
|
ArrayList seguimentoList = adp.searchAnalisesSeguimentoHS(
|
|
getSessionBean1().getCurrentUser().getEstabelecimento_id(),
|
|
nome, estabelecimento, visitaDateStr, POR );
|
|
|
|
table2.setRendered( true );
|
|
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 !" );
|
|
ErrorLogger.logException( e );
|
|
}
|
|
|
|
return null;
|
|
}
|
|
|
|
}
|
|
|