|
|
|
|
@ -17,9 +17,8 @@ import db.entidades.Medida;
|
|
|
|
|
import db.entidades.PlanoActuacao;
|
|
|
|
|
import db.entidades.PostoTrabalho;
|
|
|
|
|
import db.entidades.Risco;
|
|
|
|
|
import db.entidades.Utilizador;
|
|
|
|
|
import db.entidades.Valor;
|
|
|
|
|
import db.providers.UtilizadoresDataProvider;
|
|
|
|
|
import db.providers.UtilizadoresLogic;
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import javax.faces.FacesException;
|
|
|
|
|
@ -34,7 +33,8 @@ import javax.faces.component.html.HtmlPanelGrid;
|
|
|
|
|
*
|
|
|
|
|
* @author lluis
|
|
|
|
|
*/
|
|
|
|
|
public class ViewPlano extends AbstractPageBean {
|
|
|
|
|
public class ViewPlano extends AbstractPageBean
|
|
|
|
|
{
|
|
|
|
|
// <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@ -78,7 +78,9 @@ public class ViewPlano extends AbstractPageBean {
|
|
|
|
|
/**
|
|
|
|
|
* <p>Construct a new Page bean instance.</p>
|
|
|
|
|
*/
|
|
|
|
|
public ViewPlano() {
|
|
|
|
|
public ViewPlano()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@ -94,7 +96,8 @@ public class ViewPlano extends AbstractPageBean {
|
|
|
|
|
* property values that were saved for this view when it was rendered.</p>
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public void init() {
|
|
|
|
|
public void init()
|
|
|
|
|
{
|
|
|
|
|
// Perform initializations inherited from our superclass
|
|
|
|
|
super.init();
|
|
|
|
|
// Perform application initialization that must complete
|
|
|
|
|
@ -126,7 +129,9 @@ public class ViewPlano extends AbstractPageBean {
|
|
|
|
|
* resources that will be required in your event handlers.</p>
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public void preprocess() {
|
|
|
|
|
public void preprocess()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@ -138,9 +143,10 @@ public class ViewPlano extends AbstractPageBean {
|
|
|
|
|
* this page.</p>
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public void prerender() {
|
|
|
|
|
public void prerender()
|
|
|
|
|
{
|
|
|
|
|
PlanoActuacao p = getSessionBean1().getPlanoActuacao();
|
|
|
|
|
showPlano(p);
|
|
|
|
|
showPlano( p );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@ -152,7 +158,9 @@ public class ViewPlano extends AbstractPageBean {
|
|
|
|
|
* acquired during execution of an event handler).</p>
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public void destroy() {
|
|
|
|
|
public void destroy()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@ -160,7 +168,8 @@ public class ViewPlano extends AbstractPageBean {
|
|
|
|
|
*
|
|
|
|
|
* @return reference to the scoped data bean
|
|
|
|
|
*/
|
|
|
|
|
protected SessionBean1 getSessionBean1() {
|
|
|
|
|
protected SessionBean1 getSessionBean1()
|
|
|
|
|
{
|
|
|
|
|
return (SessionBean1) getBean("SessionBean1");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -169,7 +178,8 @@ public class ViewPlano extends AbstractPageBean {
|
|
|
|
|
*
|
|
|
|
|
* @return reference to the scoped data bean
|
|
|
|
|
*/
|
|
|
|
|
protected ApplicationBean1 getApplicationBean1() {
|
|
|
|
|
protected ApplicationBean1 getApplicationBean1()
|
|
|
|
|
{
|
|
|
|
|
return (ApplicationBean1) getBean("ApplicationBean1");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -178,12 +188,16 @@ public class ViewPlano extends AbstractPageBean {
|
|
|
|
|
*
|
|
|
|
|
* @return reference to the scoped data bean
|
|
|
|
|
*/
|
|
|
|
|
protected RequestBean1 getRequestBean1() {
|
|
|
|
|
protected RequestBean1 getRequestBean1()
|
|
|
|
|
{
|
|
|
|
|
return (RequestBean1) getBean("RequestBean1");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void showPlano(PlanoActuacao p)
|
|
|
|
|
private void showPlano( PlanoActuacao p )
|
|
|
|
|
{
|
|
|
|
|
System.out.println( "\nViewPlano . showPlano( " + p.getId() + " ) : \n" );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gridPlano = new HtmlPanelGrid();
|
|
|
|
|
gridPlano.setId("gridPlano");
|
|
|
|
|
gridPlano.setWidth("100%");
|
|
|
|
|
@ -193,7 +207,6 @@ public class ViewPlano extends AbstractPageBean {
|
|
|
|
|
//plano
|
|
|
|
|
//lblTop.setText("Plano de actuação da auditoria " + p.getData_visita_str());
|
|
|
|
|
|
|
|
|
|
System.out.println( "VIEWPLANO - : " + p.getConcluidoPorDesactivacao() );
|
|
|
|
|
if ( p.getConcluidoPorDesactivacao() )
|
|
|
|
|
{
|
|
|
|
|
StaticText st = new StaticText();
|
|
|
|
|
@ -724,165 +737,266 @@ public class ViewPlano extends AbstractPageBean {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void showPostos(List<PostoTrabalho> postos)
|
|
|
|
|
private void showPostos( List< PostoTrabalho > postos )
|
|
|
|
|
{
|
|
|
|
|
for(PostoTrabalho posto : postos)
|
|
|
|
|
for ( PostoTrabalho posto : postos )
|
|
|
|
|
{
|
|
|
|
|
HtmlPanelGrid grd = new HtmlPanelGrid();
|
|
|
|
|
grd.setColumns(1);
|
|
|
|
|
grd.setStyle("display: block");
|
|
|
|
|
grd.setWidth("100%");
|
|
|
|
|
////grd.setStyleClass("centerBlock");
|
|
|
|
|
gridMedida.getChildren().add(grd);
|
|
|
|
|
grd.setColumns( 1 );
|
|
|
|
|
grd.setStyle( "display: block" );
|
|
|
|
|
grd.setWidth( "100%" );
|
|
|
|
|
gridMedida.getChildren().add( grd );
|
|
|
|
|
|
|
|
|
|
gridPosto = new HtmlPanelGrid();
|
|
|
|
|
////gridPosto.setStyleClass("centerBlock");
|
|
|
|
|
gridPosto.setStyle("display: block");
|
|
|
|
|
gridPosto.setWidth("98%");
|
|
|
|
|
gridPosto.setColumns(1);
|
|
|
|
|
gridPosto.setColumnClasses("gridColLeft");
|
|
|
|
|
grd.getChildren().add(gridPosto);
|
|
|
|
|
gridPosto.setStyle( "display: block" );
|
|
|
|
|
gridPosto.setWidth( "98%" );
|
|
|
|
|
gridPosto.setColumns( 1 );
|
|
|
|
|
gridPosto.setColumnClasses( "gridColLeft" );
|
|
|
|
|
grd.getChildren().add( gridPosto );
|
|
|
|
|
pg = new PanelGroup();
|
|
|
|
|
st = new StaticText();
|
|
|
|
|
st.setEscape(false);
|
|
|
|
|
st.setStyleClass("label");
|
|
|
|
|
st.setText("Posto de trabalho: ");
|
|
|
|
|
pg.getChildren().add(st);
|
|
|
|
|
st.setEscape( false );
|
|
|
|
|
st.setStyleClass( "label" );
|
|
|
|
|
st.setText( "Posto de trabalho: " );
|
|
|
|
|
pg.getChildren().add( st );
|
|
|
|
|
st = new StaticText();
|
|
|
|
|
st.setEscape(false);
|
|
|
|
|
st.setText(posto.getDescricao());
|
|
|
|
|
pg.getChildren().add(st);
|
|
|
|
|
gridPosto.getChildren().add(pg);
|
|
|
|
|
|
|
|
|
|
st.setEscape( false );
|
|
|
|
|
st.setText( posto.getDescricao() );
|
|
|
|
|
pg.getChildren().add( st );
|
|
|
|
|
gridPosto.getChildren().add( pg );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void showValidacoes(HtmlPanelGrid grid, PlanoActuacao p)
|
|
|
|
|
{
|
|
|
|
|
boolean hasValidations = false;
|
|
|
|
|
HtmlPanelGrid grd = new HtmlPanelGrid();
|
|
|
|
|
grd.setColumns(1);
|
|
|
|
|
grd.setColumnClasses("gridColLeft");
|
|
|
|
|
grd.setWidth("100%");
|
|
|
|
|
if(p.getValidacao_director_loja().booleanValue())
|
|
|
|
|
{
|
|
|
|
|
hasValidations = true;
|
|
|
|
|
StaticText st = new StaticText();
|
|
|
|
|
st.setEscape(false);
|
|
|
|
|
//st.setStyleClass("label");
|
|
|
|
|
String nome = "";
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance();
|
|
|
|
|
Utilizador user = udp.getUtilizador(p.getUser_dir_loja());
|
|
|
|
|
nome = user.getNome();
|
|
|
|
|
}
|
|
|
|
|
catch(Exception ex)
|
|
|
|
|
{
|
|
|
|
|
ErrorLogger.logException( ex );
|
|
|
|
|
}
|
|
|
|
|
st.setText("Validado por " + nome + " (Director de Loja) a " + p.getData_validacao_dir_loja_str());
|
|
|
|
|
grd.getChildren().add(st);
|
|
|
|
|
|
|
|
|
|
if(p.getObservacoes_dl() != null)
|
|
|
|
|
{
|
|
|
|
|
if(p.getObservacoes_dl().trim().length() > 0)
|
|
|
|
|
{
|
|
|
|
|
pg = new PanelGroup();
|
|
|
|
|
st = new StaticText();
|
|
|
|
|
st.setEscape(false);
|
|
|
|
|
st.setText("Observações gerais DL: ");
|
|
|
|
|
pg.getChildren().add(st);
|
|
|
|
|
st = new StaticText();
|
|
|
|
|
st.setEscape(false);
|
|
|
|
|
st.setText(p.getObservacoes_dl());
|
|
|
|
|
pg.getChildren().add(st);
|
|
|
|
|
grd.getChildren().add(pg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(p.getValidacao_dns().booleanValue())
|
|
|
|
|
{
|
|
|
|
|
hasValidations = true;
|
|
|
|
|
StaticText st = new StaticText();
|
|
|
|
|
st.setEscape(false);
|
|
|
|
|
//st.setStyleClass("label");
|
|
|
|
|
String nome = "";
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance();
|
|
|
|
|
Utilizador user = udp.getUtilizador(p.getUser_dns());
|
|
|
|
|
nome = user.getNome();
|
|
|
|
|
}
|
|
|
|
|
catch(Exception ex)
|
|
|
|
|
{
|
|
|
|
|
ErrorLogger.logException( ex );
|
|
|
|
|
}
|
|
|
|
|
st.setText("Validado por " + nome + " (Director Nacional de Segurança) a " + p.getData_validacao_dns_str());
|
|
|
|
|
grd.getChildren().add(st);
|
|
|
|
|
|
|
|
|
|
if(p.getObservacoes_dns() != null)
|
|
|
|
|
{
|
|
|
|
|
if(p.getObservacoes_dns().trim().length() > 0)
|
|
|
|
|
{
|
|
|
|
|
pg = new PanelGroup();
|
|
|
|
|
st = new StaticText();
|
|
|
|
|
st.setEscape(false);
|
|
|
|
|
st.setText("Observações gerais DNS: ");
|
|
|
|
|
pg.getChildren().add(st);
|
|
|
|
|
st = new StaticText();
|
|
|
|
|
st.setEscape(false);
|
|
|
|
|
st.setText(p.getObservacoes_dns());
|
|
|
|
|
pg.getChildren().add(st);
|
|
|
|
|
grd.getChildren().add(pg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
private void showValidacoes( HtmlPanelGrid grid, PlanoActuacao p )
|
|
|
|
|
{
|
|
|
|
|
SimpleDateFormat DF = new SimpleDateFormat( "dd-MM-yyyy" );
|
|
|
|
|
|
|
|
|
|
if(p.getValidacao_hs().booleanValue())
|
|
|
|
|
{
|
|
|
|
|
hasValidations = true;
|
|
|
|
|
StaticText st = new StaticText();
|
|
|
|
|
st.setEscape(false);
|
|
|
|
|
//st.setStyleClass("label");
|
|
|
|
|
String nome = "";
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance();
|
|
|
|
|
Utilizador user = udp.getUtilizador(p.getUser_hs());
|
|
|
|
|
nome = user.getNome();
|
|
|
|
|
}
|
|
|
|
|
catch(Exception ex)
|
|
|
|
|
HtmlPanelGrid gridValidacoes = new HtmlPanelGrid();
|
|
|
|
|
gridValidacoes.setColumns( 1 );
|
|
|
|
|
gridValidacoes.setColumnClasses( "gridColLeft" );
|
|
|
|
|
gridValidacoes.setWidth( "100%" );
|
|
|
|
|
|
|
|
|
|
// 1
|
|
|
|
|
System.out.println( "showValidacoes() : 1. (Auditoria) " + p.getData_visita() );
|
|
|
|
|
if ( p.getData_visita() != null )
|
|
|
|
|
{
|
|
|
|
|
StaticText visitaText = new StaticText();
|
|
|
|
|
visitaText.setEscape( false );
|
|
|
|
|
visitaText.setText( "Data da auditoria: " + DF.format( p.getData_visita() ) );
|
|
|
|
|
gridValidacoes.getChildren().add( visitaText );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 2
|
|
|
|
|
System.out.println( "showValidacoes() : 2. (Disponibilizacao) " + p.getData_disponibilizacao() );
|
|
|
|
|
if ( p.getData_disponibilizacao() != null )
|
|
|
|
|
{
|
|
|
|
|
StaticText dispText = new StaticText();
|
|
|
|
|
dispText.setEscape( false );
|
|
|
|
|
dispText.setText( "Data de disponibilizacao online: " + DF.format( p.getData_disponibilizacao() ) );
|
|
|
|
|
gridValidacoes.getChildren().add( dispText );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 3
|
|
|
|
|
System.out.println( "showValidacoes() : 3. (Validacao Seg) " + p.getData_validacao_seg() );
|
|
|
|
|
if ( p.getData_validacao_seg() != null )
|
|
|
|
|
{
|
|
|
|
|
StaticText segText = new StaticText();
|
|
|
|
|
segText.setEscape( false );
|
|
|
|
|
String nome = UtilizadoresLogic.getInstance().getNomeUtilizadorByID( p.getUser_seg() );
|
|
|
|
|
segText.setText( "Validado por " + nome + " (Segurança) a " + DF.format( p.getData_validacao_seg() ) );
|
|
|
|
|
gridValidacoes.getChildren().add( segText );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 4
|
|
|
|
|
System.out.println( "showValidacoes() : 4. (Validacao DL) " + p.getValidacao_director_loja() );
|
|
|
|
|
if ( p.getValidacao_director_loja() )
|
|
|
|
|
{
|
|
|
|
|
StaticText valDirLojaText = new StaticText();
|
|
|
|
|
valDirLojaText.setEscape( false );
|
|
|
|
|
String nome = UtilizadoresLogic.getInstance().getNomeUtilizadorByID( p.getUser_dir_loja() );
|
|
|
|
|
valDirLojaText.setText( "Validado por " + nome + " (Director de Loja) a " + DF.format( p.getData_validacao_dir_loja() ) );
|
|
|
|
|
gridValidacoes.getChildren().add( valDirLojaText );
|
|
|
|
|
|
|
|
|
|
if ( p.getObservacoes_dl() != null && ! "".equals( p.getObservacoes_dl().trim() ) )
|
|
|
|
|
{
|
|
|
|
|
ErrorLogger.logException( ex );
|
|
|
|
|
StaticText obsTitleText = new StaticText();
|
|
|
|
|
obsTitleText.setEscape( false );
|
|
|
|
|
obsTitleText.setText( "Observações gerais DL: " );
|
|
|
|
|
|
|
|
|
|
StaticText obsText = new StaticText();
|
|
|
|
|
obsText.setEscape( false );
|
|
|
|
|
obsText.setText( p.getObservacoes_dl() );
|
|
|
|
|
|
|
|
|
|
gridValidacoes.getChildren().add( obsTitleText );
|
|
|
|
|
gridValidacoes.getChildren().add( obsText );
|
|
|
|
|
}
|
|
|
|
|
st.setText("Validado por " + nome + " (Técnico de SHS) a " + p.getData_validacao_hs_str());
|
|
|
|
|
grd.getChildren().add(st);
|
|
|
|
|
|
|
|
|
|
// if(p.getVerificacao_siprp() != null)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 5
|
|
|
|
|
System.out.println( "showValidacoes() : 5. (Validacao DNS) " + p.getValidacao_dns() );
|
|
|
|
|
if ( p.getValidacao_dns() )
|
|
|
|
|
{
|
|
|
|
|
StaticText valDnsText = new StaticText();
|
|
|
|
|
valDnsText.setEscape( false );
|
|
|
|
|
String nome = UtilizadoresLogic.getInstance().getNomeUtilizadorByID( p.getUser_dns() );
|
|
|
|
|
valDnsText.setText( "Validado por " + nome + " (Director Nacional de Segurança) a " + DF.format( p.getData_validacao_dns() ) );
|
|
|
|
|
gridValidacoes.getChildren().add( valDnsText );
|
|
|
|
|
|
|
|
|
|
if ( p.getObservacoes_dns() != null && ! "".equals( p.getObservacoes_dns().trim() ) )
|
|
|
|
|
{
|
|
|
|
|
StaticText obsTitleText = new StaticText();
|
|
|
|
|
obsTitleText.setEscape( false );
|
|
|
|
|
obsTitleText.setText( "Observações gerais DNS: " );
|
|
|
|
|
|
|
|
|
|
StaticText obsText = new StaticText();
|
|
|
|
|
obsText.setEscape( false );
|
|
|
|
|
obsText.setText( p.getObservacoes_dns() );
|
|
|
|
|
|
|
|
|
|
gridValidacoes.getChildren().add( obsTitleText );
|
|
|
|
|
gridValidacoes.getChildren().add( obsText );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 6
|
|
|
|
|
System.out.println( "showValidacoes() : 6. (Validacao HS) " + p.getValidacao_hs() );
|
|
|
|
|
if ( p.getValidacao_hs() )
|
|
|
|
|
{
|
|
|
|
|
StaticText valHsText = new StaticText();
|
|
|
|
|
valHsText.setEscape( false );
|
|
|
|
|
String nome = UtilizadoresLogic.getInstance().getNomeUtilizadorByID( p.getUser_hs() );
|
|
|
|
|
valHsText.setText( "Validado por " + nome + " (Técnico de SHS) a " + DF.format( p.getData_validacao_hs() ) );
|
|
|
|
|
gridValidacoes.getChildren().add( valHsText );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
grid.getChildren().add( gridValidacoes );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// private void showValidacoes(HtmlPanelGrid grid, PlanoActuacao p)
|
|
|
|
|
// {
|
|
|
|
|
// boolean hasValidations = false;
|
|
|
|
|
// HtmlPanelGrid grd = new HtmlPanelGrid();
|
|
|
|
|
// grd.setColumns(1);
|
|
|
|
|
// grd.setColumnClasses("gridColLeft");
|
|
|
|
|
// grd.setWidth("100%");
|
|
|
|
|
// if(p.getValidacao_director_loja().booleanValue())
|
|
|
|
|
// {
|
|
|
|
|
// hasValidations = true;
|
|
|
|
|
// StaticText st = new StaticText();
|
|
|
|
|
// st.setEscape(false);
|
|
|
|
|
// //st.setStyleClass("label");
|
|
|
|
|
// String nome = "";
|
|
|
|
|
// try
|
|
|
|
|
// {
|
|
|
|
|
// UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance();
|
|
|
|
|
// Utilizador user = udp.getUtilizador(p.getUser_dir_loja());
|
|
|
|
|
// nome = user.getNome();
|
|
|
|
|
// }
|
|
|
|
|
// catch(Exception ex)
|
|
|
|
|
// {
|
|
|
|
|
// if(p.getVerificacao_siprp().trim().length() > 0)
|
|
|
|
|
// ErrorLogger.logException( ex );
|
|
|
|
|
// }
|
|
|
|
|
// st.setText("Validado por " + nome + " (Director de Loja) a " + p.getData_validacao_dir_loja_str());
|
|
|
|
|
// grd.getChildren().add(st);
|
|
|
|
|
//
|
|
|
|
|
// if(p.getObservacoes_dl() != null)
|
|
|
|
|
// {
|
|
|
|
|
// if(p.getObservacoes_dl().trim().length() > 0)
|
|
|
|
|
// {
|
|
|
|
|
// pg = new PanelGroup();
|
|
|
|
|
// st = new StaticText();
|
|
|
|
|
// st.setEscape(false);
|
|
|
|
|
// st.setText("Verificação SIPRP: ");
|
|
|
|
|
// pg.getChildren().add(st);
|
|
|
|
|
// st.setText("Observações gerais DL: ");
|
|
|
|
|
// pg.getChildren().add(st);
|
|
|
|
|
// st = new StaticText();
|
|
|
|
|
// st.setEscape(false);
|
|
|
|
|
// st.setText(p.getVerificacao_siprp());
|
|
|
|
|
// st.setText(p.getObservacoes_dl());
|
|
|
|
|
// pg.getChildren().add(st);
|
|
|
|
|
// grd.getChildren().add(pg);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(hasValidations)
|
|
|
|
|
{
|
|
|
|
|
grid.getChildren().add(grd);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// if(p.getValidacao_dns().booleanValue())
|
|
|
|
|
// {
|
|
|
|
|
// hasValidations = true;
|
|
|
|
|
// StaticText st = new StaticText();
|
|
|
|
|
// st.setEscape(false);
|
|
|
|
|
// //st.setStyleClass("label");
|
|
|
|
|
// String nome = "";
|
|
|
|
|
// try
|
|
|
|
|
// {
|
|
|
|
|
// UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance();
|
|
|
|
|
// Utilizador user = udp.getUtilizador(p.getUser_dns());
|
|
|
|
|
// nome = user.getNome();
|
|
|
|
|
// }
|
|
|
|
|
// catch(Exception ex)
|
|
|
|
|
// {
|
|
|
|
|
// ErrorLogger.logException( ex );
|
|
|
|
|
// }
|
|
|
|
|
// st.setText("Validado por " + nome + " (Director Nacional de Segurança) a " + p.getData_validacao_dns_str());
|
|
|
|
|
// grd.getChildren().add(st);
|
|
|
|
|
//
|
|
|
|
|
// if(p.getObservacoes_dns() != null)
|
|
|
|
|
// {
|
|
|
|
|
// if(p.getObservacoes_dns().trim().length() > 0)
|
|
|
|
|
// {
|
|
|
|
|
// pg = new PanelGroup();
|
|
|
|
|
// st = new StaticText();
|
|
|
|
|
// st.setEscape(false);
|
|
|
|
|
// st.setText("Observações gerais DNS: ");
|
|
|
|
|
// pg.getChildren().add(st);
|
|
|
|
|
// st = new StaticText();
|
|
|
|
|
// st.setEscape(false);
|
|
|
|
|
// st.setText(p.getObservacoes_dns());
|
|
|
|
|
// pg.getChildren().add(st);
|
|
|
|
|
// grd.getChildren().add(pg);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// if(p.getValidacao_hs().booleanValue())
|
|
|
|
|
// {
|
|
|
|
|
// hasValidations = true;
|
|
|
|
|
// StaticText st = new StaticText();
|
|
|
|
|
// st.setEscape(false);
|
|
|
|
|
// //st.setStyleClass("label");
|
|
|
|
|
// String nome = "";
|
|
|
|
|
// try
|
|
|
|
|
// {
|
|
|
|
|
// UtilizadoresDataProvider udp = UtilizadoresDataProvider.getInstance();
|
|
|
|
|
// Utilizador user = udp.getUtilizador(p.getUser_hs());
|
|
|
|
|
// nome = user.getNome();
|
|
|
|
|
// }
|
|
|
|
|
// catch(Exception ex)
|
|
|
|
|
// {
|
|
|
|
|
// ErrorLogger.logException( ex );
|
|
|
|
|
// }
|
|
|
|
|
// st.setText("Validado por " + nome + " (Técnico de SHS) a " + p.getData_validacao_hs_str());
|
|
|
|
|
// grd.getChildren().add(st);
|
|
|
|
|
//
|
|
|
|
|
//// if(p.getVerificacao_siprp() != null)
|
|
|
|
|
//// {
|
|
|
|
|
//// if(p.getVerificacao_siprp().trim().length() > 0)
|
|
|
|
|
//// {
|
|
|
|
|
//// pg = new PanelGroup();
|
|
|
|
|
//// st = new StaticText();
|
|
|
|
|
//// st.setEscape(false);
|
|
|
|
|
//// st.setText("Verificação SIPRP: ");
|
|
|
|
|
//// pg.getChildren().add(st);
|
|
|
|
|
//// st = new StaticText();
|
|
|
|
|
//// st.setEscape(false);
|
|
|
|
|
//// st.setText(p.getVerificacao_siprp());
|
|
|
|
|
//// pg.getChildren().add(st);
|
|
|
|
|
//// grd.getChildren().add(pg);
|
|
|
|
|
//// }
|
|
|
|
|
//// }
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// if(hasValidations)
|
|
|
|
|
// {
|
|
|
|
|
// grid.getChildren().add(grd);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void showSeparator()
|
|
|
|
|
@ -892,9 +1006,8 @@ public class ViewPlano extends AbstractPageBean {
|
|
|
|
|
gridAreaContainer.getChildren().add( separator );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String butVoltar_action() {
|
|
|
|
|
// TODO: Process the action. Return value is a navigation
|
|
|
|
|
// case name where null will return to the same page.
|
|
|
|
|
public String butVoltar_action()
|
|
|
|
|
{
|
|
|
|
|
return "lista_planos";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|