13/11/2008

git-svn-id: https://svn.coded.pt/svn/SIPRP@799 bb69d46d-e84e-40c8-a05a-06db0d633741
0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
L Luís = 17 years ago
parent 5cb736d292
commit 31647b1ca6

@ -7,7 +7,7 @@
<Node id="Footer.jsp" x="650" y="150" zoom="true"/>
<Node id="EditarPlano.jsp" x="609" y="83" zoom="false"/>
<Node id="Dummy.jsp" x="867" y="46" zoom="true"/>
<Node id="ViewPlano.jsp" x="400" y="150" zoom="true"/>
<Node id="ViewPlano.jsp" x="840" y="178" zoom="false"/>
<Node id="Login.jsp" x="348" y="307" zoom="false"/>
</Scope>
<Scope Scope="All Faces Configurations"/>

@ -24,21 +24,21 @@ public class MainPhaseListener implements PhaseListener{
private boolean firstEntry = true;
public void afterPhase(PhaseEvent pe) {
if(pe.getPhaseId() == PhaseId.RENDER_RESPONSE)
{
FacesContext fc = pe.getFacesContext();
SessionBean1 session = JSFUtils.getSessionBean(fc);
String view = fc.getViewRoot().getViewId();
if(view.matches("/EditarPlano.jsp"))
{
session.setDisableMenu(true);
}
else
{
session.setDisableMenu(false);
}
System.out.println("VIEW : " + view);
}
// if(pe.getPhaseId() == PhaseId.RENDER_RESPONSE)
// {
// FacesContext fc = pe.getFacesContext();
// SessionBean1 session = JSFUtils.getSessionBean(fc);
// String view = fc.getViewRoot().getViewId();
// if(view.matches("/EditarPlano.jsp"))
// {
// session.setDisableMenu(true);
// }
// else
// {
// session.setDisableMenu(false);
// }
// System.out.println("VIEW : " + view);
// }
}
public void beforePhase(PhaseEvent pe) {
@ -77,7 +77,19 @@ public class MainPhaseListener implements PhaseListener{
if(!loggedIn && view.getViewId().indexOf("Login") == -1 ){
NavigationHandler nh = fc.getApplication().getNavigationHandler();
nh.handleNavigation(fc, null, "login");
}
}
//disable/enable EditarPlano menu
String sview = fc.getViewRoot().getViewId();
if(sview.matches("/EditarPlano.jsp") || sview.matches("/EnviarCorrecao.jsp"))
{
session.setDisableMenu(true);
}
else
{
session.setDisableMenu(false);
}
System.out.println("VIEW : " + view);
}
}

@ -7,13 +7,12 @@
package planosactuacao;
import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.webui.jsf.component.Hyperlink;
import com.sun.webui.jsf.component.Calendar;
import com.sun.webui.jsf.component.PanelGroup;
import javax.el.MethodExpression;
import java.util.Locale;
import javax.faces.FacesException;
import javax.faces.event.ActionEvent;
import javax.faces.event.MethodExpressionActionListener;
/**
* <p>Page bean that corresponds to a similarly named JSP page. This
@ -43,6 +42,15 @@ public class Dummy extends AbstractPageBean {
public void setPgLink(PanelGroup pg) {
this.pgLink = pg;
}
private Calendar cal = new Calendar();
public Calendar getCal() {
return cal;
}
public void setCal(Calendar c) {
this.cal = c;
}
// </editor-fold>
@ -109,16 +117,9 @@ public class Dummy extends AbstractPageBean {
*/
@Override
public void prerender() {
Hyperlink lnk = new Hyperlink();
lnk.setText("HERE");
pgLink.getChildren().add(lnk);
Class[] argtypes = new Class[1];
argtypes[0] = ActionEvent.class;
MethodExpression me = (MethodExpression)this.getApplication().getExpressionFactory().createMethodExpression(
getFacesContext().getELContext(), "#{Dummy.lnk_actionListener}", null,argtypes);
lnk.addActionListener(new MethodExpressionActionListener(me));
cal.setLocalValueSet(true);
java.util.Calendar c = cal.getDatePicker().getCalendar().getInstance(new Locale("fr"));
System.out.println("DATE : " + c.getTime().toString());
}
/**

@ -401,7 +401,7 @@ public class EditarPlano extends AbstractPageBean {
//gridValidar.setStyleClass("hidden");
if(u.getTipo().intValue() != Global.DIRECTOR_LOJA && u.getTipo().intValue() != Global.DIRECTOR_NACIONAL_SEGURANCA)
if(u.getTipo().intValue() != Global.DIRECTOR_LOJA && u.getTipo().intValue() != Global.DIRECTOR_NACIONAL_SEGURANCA && u.getTipo().intValue() != Global.TECNICO_HS)
{
//gridValidar.setStyleClass("visible");
gridValidar.setRendered(false);
@ -410,7 +410,14 @@ public class EditarPlano extends AbstractPageBean {
else
{
//txtParecer.setRendered(false);
gridParecer.setStyleClass("hidden");
if(u.getTipo().intValue() == Global.DIRECTOR_NACIONAL_SEGURANCA)
{
gridParecer.setStyleClass("");
}
else if(u.getTipo().intValue() == Global.DIRECTOR_LOJA || u.getTipo().intValue() == Global.TECNICO_HS)
{
gridParecer.setStyleClass("hidden");
}
}
// else
// {
@ -422,7 +429,6 @@ public class EditarPlano extends AbstractPageBean {
// }
int fase = p.getFase().intValue();
switch(fase)
{
case Global.FASE_SEGURANCA_PREENCHIMENTO:
@ -430,11 +436,33 @@ public class EditarPlano extends AbstractPageBean {
break;
case Global.FASE_DIR_LOJA_VALIDACAO:
//butEnviar.setText("Enviar a Director de Loja");
//butEnviar.setText("Enviar a Director de Loja");
if(p.getValidacao_director_loja().booleanValue() == true)
{
chkValidacao.setSelected(new Boolean(true));
}
butEnviar.setText("Enviar para Responsável de Segurança>>");
break;
case Global.FASE_DNS_PARECER:
System.out.println("VALIDACAO 1 : " + p.getValidacao_dns().booleanValue());
if(p.getValidacao_dns().booleanValue() == true)
{
chkValidacao.setSelected(new Boolean(true));
System.out.println("VALIDACAO 2 : " + chkValidacao.getSelected().toString());
txtParecer.setText(p.getParecer_dns());
gridParecer.setStyleClass("");
drpIrPara.setStyleClass("hidden");
stIrPara.setStyleClass("hidden");
}
else
{
gridParecer.setStyleClass("hidden");
drpIrPara.setStyleClass("");
stIrPara.setStyleClass("");
}
com.sun.webui.jsf.model.Option[] listOptions = new com.sun.webui.jsf.model.Option[2];
listOptions[0] = new Option(new Integer(Global.FASE_SEGURANCA_PREENCHIMENTO), "Responsável de segurança");
@ -445,6 +473,10 @@ public class EditarPlano extends AbstractPageBean {
break;
case Global.FASE_SIPRP_CONCLUSAO:
if(p.getValidacao_hs().booleanValue() == true)
{
chkValidacao.setSelected(new Boolean(true));
}
butEnviar.setText("Concluir");
break;
}
@ -619,6 +651,7 @@ public class EditarPlano extends AbstractPageBean {
txtResponsavelExecucao = new TextField();
txtResponsavelExecucao.setId("txtResponsavel");
txtResponsavelExecucao.setColumns(100);
txtResponsavelExecucao.setText(r.getResponsavel_execucao());
pg.getChildren().add(txtResponsavelExecucao);
gridResponsavel.getChildren().add(pg);
pg = new PanelGroup();
@ -631,6 +664,7 @@ public class EditarPlano extends AbstractPageBean {
txtRecursos = new TextArea();
txtRecursos.setId("txtRecursos");
txtRecursos.setColumns(200);
txtRecursos.setText(r.getRecursos_necessarios());
gridResponsavel.getChildren().add(txtRecursos);
HtmlPanelGrid grd = new HtmlPanelGrid();
@ -645,6 +679,12 @@ public class EditarPlano extends AbstractPageBean {
grd.getChildren().add(st);
dtInicio = new Calendar();
dtInicio.setId("dtInicio");
dtInicio.setDateFormatPattern("dd-MM-yyyy");
dtInicio.setValue(r.getData_inicio());
java.util.GregorianCalendar gcalendar = new java.util.GregorianCalendar();
gcalendar.set(2000,1,1);
dtInicio.setMinDate(gcalendar.getTime());
grd.getChildren().add(dtInicio);
gridResponsavel.getChildren().add(grd);
@ -659,7 +699,12 @@ public class EditarPlano extends AbstractPageBean {
st.setText("Data prevista de conclus&atilde;o:");
grd.getChildren().add(st);
dtFim = new Calendar();
dtFim.setId("dtFim");
dtFim.setId("dtFim");
dtFim.setDateFormatPattern("dd-MM-yyyy");
java.util.GregorianCalendar gcalendar1 = new java.util.GregorianCalendar();
gcalendar1.set(2099,1,1);
dtFim.setMaxDate(gcalendar1.getTime());
dtFim.setValue(r.getData_fim());
grd.getChildren().add(dtFim);
gridResponsavel.getChildren().add(grd);
}
@ -763,10 +808,11 @@ public class EditarPlano extends AbstractPageBean {
private Risco fillRiscoFields(Risco r)
{
gridPlano = (HtmlPanelGrid) gridLayout.findComponent("form1:gridPlano");
gridArea = (HtmlPanelGrid) gridPlano.findComponent("form1:gridArea");
gridResponsavel = (HtmlPanelGrid) gridArea.findComponent("form1:gridResponsavel");
TextField txtResponsavel = (TextField) gridResponsavel.findComponent("_form1:txtResponsavel");
TextField txtResponsavel = (TextField) gridResponsavel.findComponent("form1:pgResponsavel:txtResponsavel");
if(txtResponsavel != null)
{
if(txtResponsavel.getText() != null)
@ -775,7 +821,7 @@ public class EditarPlano extends AbstractPageBean {
}
}
TextArea txtRecursos = (TextArea) gridResponsavel.findComponent("_form1:txtRecursos");
TextArea txtRecursos = (TextArea) gridResponsavel.findComponent("form1:txtRecursos");
if(txtRecursos != null)
{
if(txtRecursos.getText() != null)
@ -784,13 +830,13 @@ public class EditarPlano extends AbstractPageBean {
}
}
Calendar dtInicio = (Calendar) gridResponsavel.findComponent("_form1:dtInicio");
Calendar dtInicio = (Calendar) gridResponsavel.findComponent("form1:dtInicio:");
if(dtInicio != null)
{
r.setData_inicio(dtInicio.getSelectedDate());
}
Calendar dtFim = (Calendar) gridResponsavel.findComponent("_form1:dtFim");
Calendar dtFim = (Calendar) gridResponsavel.findComponent("form1:dtFim");
if(dtFim != null)
{
r.setData_fim(dtFim.getSelectedDate());
@ -802,40 +848,69 @@ public class EditarPlano extends AbstractPageBean {
public String butEnviar_action() {
// TODO: Process the action. Return value is a navigation
// case name where null will return to the same page.
try
{
processEnviar();
return "lista_planos";
}
catch(Exception ex)
PlanoActuacao p = getSessionBean1().getPlanoActuacao();
if(planoValidationOk(p))
{
getSessionBean1().setMsg("Erro no envio do Plano");
}
try
{
processEnviar(p);
return "lista_planos";
}
catch(Exception ex)
{
getSessionBean1().setMsg("Erro no envio do Plano");
}
}
return null;
}
private void processEnviar() throws Exception
private boolean planoValidationOk(PlanoActuacao p)
{
boolean processo_validado = true;
boolean ok = true;
boolean processo_validado = true;
int dns_next_fase = 2;
PlanoActuacao p = getSessionBean1().getPlanoActuacao();
//dummy : later on get fase from plano
//int fase = getSessionBean1().getFase();
int fase = p.getFase().intValue();
int fase = p.getFase().intValue();
switch(fase)
{
// case Global.FASE_SIPRP_EMISSAO:
// break;
case Global.FASE_SEGURANCA_PREENCHIMENTO:
case Global.FASE_SIPRP_CONCLUSAO:
fase++;
break;
case Global.FASE_SIPRP_CONCLUSAO:
Boolean validacao = (Boolean)chkValidacao.getSelected();
if(validacao == null)
{
processo_validado = false;
ok = false;
}
else
{
processo_validado = false;
if(validacao.booleanValue())
{
processo_validado = true;
p.setValidacao_hs(new Boolean(true));
}
}
if(processo_validado)
{
fase++;
}
else
{
getSessionBean1().setMsg("Tem de validar o processo!");
ok = false;
}
break;
case Global.FASE_DIR_LOJA_VALIDACAO:
Boolean validacao = (Boolean)chkValidacao.getSelected();
validacao = (Boolean)chkValidacao.getSelected();
if(validacao == null)
{
processo_validado = false;
@ -845,7 +920,8 @@ public class EditarPlano extends AbstractPageBean {
processo_validado = false;
if(validacao.booleanValue())
{
processo_validado = true;
processo_validado = true;
p.setValidacao_director_loja(new Boolean(true));
}
}
@ -870,13 +946,33 @@ public class EditarPlano extends AbstractPageBean {
processo_validado = false;
if(validacao.booleanValue())
{
processo_validado = true;
processo_validado = true;
p.setValidacao_dns(new Boolean(true));
}
}
if(processo_validado)
{
fase++;
if(txtParecer.getText() == null)
{
getSessionBean1().setMsg("Tem de preencher parecer!");
ok = false;
}
else
{
String parecer = (String) txtParecer.getText();
if(parecer.trim().length() == 0)
{
getSessionBean1().setMsg("Tem de preencher parecer!");
ok = false;
}
else
{
p.setParecer_dns(parecer);
fase++;
}
}
}
else
{
@ -886,16 +982,20 @@ public class EditarPlano extends AbstractPageBean {
}
break;
}
//dummy : later on will update db with new fase
//getSessionBean1().setFase(fase);
PlanosDataProvider pdp = new PlanosDataProvider();
p.setFase(new Integer(fase));
return ok;
}
private void processEnviar(PlanoActuacao p) throws Exception
{
PlanosDataProvider pdp = new PlanosDataProvider();
pdp.updatePlano(p);
enviarMail(fase);
enviarMail(p.getFase().intValue());
}
public void enviarMail(int fase)
{
String assunto = "";
@ -946,25 +1046,25 @@ public class EditarPlano extends AbstractPageBean {
}
public void chkValidacao_processValueChange(ValueChangeEvent event) {
if(chkValidacao.getSelected() != null)
{
Boolean selected = (Boolean) chkValidacao.getSelected();
if(selected.booleanValue())
{
//txtParecer.setRendered(true);
gridParecer.setStyleClass("visible");
}
else
{
//txtParecer.setRendered(false);
gridParecer.setStyleClass("hidden");
}
}
else
{
//txtParecer.setRendered(false);
gridParecer.setStyleClass("hidden");
}
// if(chkValidacao.getSelected() != null)
// {
// Boolean selected = (Boolean) chkValidacao.getSelected();
// if(selected.booleanValue())
// {
// //txtParecer.setRendered(true);
// gridParecer.setStyleClass("visible");
// }
// else
// {
// //txtParecer.setRendered(false);
// gridParecer.setStyleClass("hidden");
// }
// }
// else
// {
// //txtParecer.setRendered(false);
// gridParecer.setStyleClass("hidden");
// }
}
public void drpIrPara_processValueChange(ValueChangeEvent event) {
@ -1001,13 +1101,24 @@ public class EditarPlano extends AbstractPageBean {
Pagina pagina = (Pagina) e.getSource();
Pagination pagination = getSessionBean1().getPagination();
Risco r = pagination.getRisco(pagina);
System.out.println("RISCO == " + r.getId().toString());
Area a = getSessionBean1().getAreasHash().get( r.getArea_id() );
showArea(a);
showRisco(r);
showValores(r);
showResponsavel(r);
}
public String butCancelar_action() {
// TODO: Process the action. Return value is a navigation
// case name where null will return to the same page.
return "lista_planos";
}
public String butLimparDados_action() {
// TODO: Process the action. Return value is a navigation
// case name where null will return to the same page.
return null;
}
}

@ -0,0 +1,192 @@
/*
* EnviarCorrecao.java
*
* Created on Nov 13, 2008, 11:26:00 AM
*/
package planosactuacao;
import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.webui.jsf.component.Button;
import com.sun.webui.jsf.component.DropDown;
import com.sun.webui.jsf.component.StaticText;
import com.sun.webui.jsf.component.TextArea;
import javax.faces.FacesException;
import javax.faces.event.ValueChangeEvent;
/**
* <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>
*
* @author lluis
*/
public class EnviarCorrecao extends AbstractPageBean {
// <editor-fold defaultstate="collapsed" desc="Managed Component Definition">
/**
* <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 StaticText lblMsg = new StaticText();
public StaticText getLblMsg() {
return lblMsg;
}
public void setLblMsg(StaticText st) {
this.lblMsg = st;
}
private TextArea txtObservacoes = new TextArea();
public TextArea getTxtObservacoes() {
return txtObservacoes;
}
public void setTxtObservacoes(TextArea ta) {
this.txtObservacoes = ta;
}
private DropDown drpIrPara = new DropDown();
public DropDown getDrpIrPara() {
return drpIrPara;
}
public void setDrpIrPara(DropDown dd) {
this.drpIrPara = dd;
}
private Button butCancelar = new Button();
public Button getButCancelar() {
return butCancelar;
}
public void setButCancelar(Button b) {
this.butCancelar = b;
}
private Button butEnviar = new Button();
public Button getButEnviar() {
return butEnviar;
}
public void setButEnviar(Button b) {
this.butEnviar = b;
}
// </editor-fold>
/**
* <p>Construct a new Page bean instance.</p>
*/
public EnviarCorrecao() {
}
/**
* <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>
*/
@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
// <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("EnviarCorrecao 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
}
/**
* <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>
*/
@Override
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>
*/
@Override
public void prerender() {
}
/**
* <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>
*/
@Override
public void destroy() {
}
/**
* <p>Return a reference to the scoped data bean.</p>
*
* @return reference to the scoped data bean
*/
protected SessionBean1 getSessionBean1() {
return (SessionBean1) getBean("SessionBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*
* @return reference to the scoped data bean
*/
protected ApplicationBean1 getApplicationBean1() {
return (ApplicationBean1) getBean("ApplicationBean1");
}
/**
* <p>Return a reference to the scoped data bean.</p>
*
* @return reference to the scoped data bean
*/
protected RequestBean1 getRequestBean1() {
return (RequestBean1) getBean("RequestBean1");
}
public void drpIrPara_processValueChange(ValueChangeEvent event) {
}
}

@ -167,4 +167,28 @@ public class Header extends AbstractFragmentBean {
return null;
}
public String lnkPlanosActuacao1_action() {
// TODO: Process the action. Return value is a navigation
// case name where null will return to the same page.
return null;
}
public String lnkGerirUtilizadores1_action() {
// TODO: Process the action. Return value is a navigation
// case name where null will return to the same page.
return null;
}
public String lnkDadosUtilizador1_action() {
// TODO: Process the action. Return value is a navigation
// case name where null will return to the same page.
return null;
}
public String lnkAjuda_action() {
// TODO: Process the action. Return value is a navigation
// case name where null will return to the same page.
return null;
}
}

@ -28,6 +28,8 @@ import javax.faces.FacesException;
import javax.faces.context.FacesContext;
import siprp.database.cayenne.providers.PlanoActuacaoDAO;
import tabledataproviders.PlanosActualDataProvider;
import tabledataproviders.PlanosConcluidosDataProvider;
import tabledataproviders.PlanosSeguimentoDataProvider;
import utils.JSFUtils;
/**
@ -237,11 +239,23 @@ public class ListaPlanos extends AbstractPageBean {
getSessionBean1().setPlanoActuacao(p);
showPlano(p);
//showPlano(p);
//dummy
//getSessionBean1().setFase(2);
return "editar_plano";
}
public String goVerPlanoFromSeguimento_action(){
PlanoActuacao p = getTableSeguimentoRowData();
getSessionBean1().setPlanoActuacao(p);
return "ver_plano";
}
public String goVerPlanoFromConcluidos_action(){
PlanoActuacao p = getTableConcluidosRowData();
getSessionBean1().setPlanoActuacao(p);
return "ver_plano";
}
public String goImprimirPlano_action() {
// TODO: Process the action. Return value is a navigation
@ -300,209 +314,7 @@ public class ListaPlanos extends AbstractPageBean {
}
// private void initialize1()
// {
//
// Utilizador u = getSessionBean1().getCurrentUser();
//
// //Planos Activos
// try
// {
// ArrayList listActivos = pdp.getPlanosActivos(u);
//
// try
// {
// PlanoActuacao pa = (PlanoActuacao) listActivos.get(0);
// if(pa.getId().intValue() == 1)
// {
// pa.setFase_nome(Global.FASES_TEXTO[pa.getFase().intValue() - 1]);
// pa.setLoja_nome("Setubal");
// pa.setTecnico_hs_id(new Integer(7));
// pa.setTecnico_hs_nome("Ana");
// }
//
//
// pa = (PlanoActuacao) listActivos.get(1);
// if(pa.getId().intValue() == 2)
// {
// pa.setFase_nome(Global.FASES_TEXTO[pa.getFase().intValue() - 1]);
// pa.setLoja_nome("Cascais");
// pa.setTecnico_hs_id(new Integer(7));
// pa.setTecnico_hs_nome("Sónia");
// }
//
//
// pa = (PlanoActuacao) listActivos.get(2);
// if(pa.getId().intValue() == 3)
// {
// pa.setFase_nome(Global.FASES_TEXTO[pa.getFase().intValue() - 1]);
// pa.setLoja_nome("Sintra");
// pa.setTecnico_hs_id(new Integer(7));
// pa.setTecnico_hs_nome("Pedro");
// }
//
// }
// catch(Exception ex1)
// {
// ex1.printStackTrace();
// }
// getSessionBean1().getPlanosActualDataProvider().setList(listActivos);
// }
// catch(Exception ex)
// {
// ex.printStackTrace();
// }
//
//
// //Planos Seguimento
// try
// {
// ArrayList listSeguimento = pdp.getPlanosSeguimento(u);
//
// try
// {
// PlanoActuacao pa = (PlanoActuacao) listSeguimento.get(0);
// if(pa.getId().intValue() == 1)
// {
// pa.setFase_nome(Global.FASES_TEXTO[pa.getFase().intValue() - 1]);
// pa.setLoja_nome("Setubal");
// pa.setTecnico_hs_id(new Integer(7));
// pa.setTecnico_hs_nome("Ana");
// }
//
//
// pa = (PlanoActuacao) listSeguimento.get(1);
// if(pa.getId().intValue() == 2)
// {
// pa.setFase_nome(Global.FASES_TEXTO[pa.getFase().intValue() - 1]);
// pa.setLoja_nome("Cascais");
// pa.setTecnico_hs_id(new Integer(7));
// pa.setTecnico_hs_nome("Sónia");
// }
//
//
// pa = (PlanoActuacao) listSeguimento.get(2);
// if(pa.getId().intValue() == 3)
// {
// pa.setFase_nome(Global.FASES_TEXTO[pa.getFase().intValue() - 1]);
// pa.setLoja_nome("Sintra");
// pa.setTecnico_hs_id(new Integer(7));
// pa.setTecnico_hs_nome("Pedro");
// }
//
// }
// catch(Exception ex1)
// {
// ex1.printStackTrace();
// }
// getSessionBean1().getPlanosSeguimentoDataProvider().setList(listSeguimento);
// }
// catch(Exception ex)
// {
// ex.printStackTrace();
// }
//
//
// //Planos Concluidos
// try
// {
// ArrayList listConcluidos = pdp.getPlanosConcluidos(u);
//
// try
// {
// PlanoActuacao pa = (PlanoActuacao) listConcluidos.get(0);
// if(pa.getId().intValue() == 1)
// {
// pa.setFase_nome(Global.FASES_TEXTO[pa.getFase().intValue() - 1]);
// pa.setLoja_nome("Setubal");
// pa.setTecnico_hs_id(new Integer(7));
// pa.setTecnico_hs_nome("Ana");
// }
//
//
// pa = (PlanoActuacao) listConcluidos.get(1);
// if(pa.getId().intValue() == 2)
// {
// pa.setFase_nome(Global.FASES_TEXTO[pa.getFase().intValue() - 1]);
// pa.setLoja_nome("Cascais");
// pa.setTecnico_hs_id(new Integer(7));
// pa.setTecnico_hs_nome("Sónia");
// }
//
//
// pa = (PlanoActuacao) listConcluidos.get(2);
// if(pa.getId().intValue() == 3)
// {
// pa.setFase_nome(Global.FASES_TEXTO[pa.getFase().intValue() - 1]);
// pa.setLoja_nome("Sintra");
// pa.setTecnico_hs_id(new Integer(7));
// pa.setTecnico_hs_nome("Pedro");
// }
//
// }
// catch(Exception ex1)
// {
// ex1.printStackTrace();
// }
// getSessionBean1().getPlanosConcluidosDataProvider().setList(listConcluidos);
// }
// catch(Exception ex)
// {
// ex.printStackTrace();
// }
//
//
// //Dummy : to remove later
//// ArrayList listActivos = new ArrayList();
//// PlanoActuacao pa = new PlanoActuacao();
////
//// Calendar cal = Calendar.getInstance();
////
//// cal.set( cal.YEAR, 2008 );
//// cal.set( cal.MONTH, cal.SEPTEMBER );
//// cal.set( cal.DATE, 3 );
////
//// cal.set( cal.HOUR_OF_DAY, 0 );
//// cal.set( cal.MINUTE, 0 );
//// cal.set( cal.SECOND, 0 );
//// cal.set( cal.MILLISECOND, 0 );
////
//// java.sql.Date dataVisita =
//// new java.sql.Date( cal.getTime().getTime() );
////
//// pa.setData_visita(dataVisita);
//// pa.setEstabelecimento_id(new Integer(12));
//// pa.setFase(2);
//// pa.setFase_nome("SIPRP (Emissão)");
//// pa.setLoja_nome("Setubal");
//// pa.setTecnico_hs_id(new Integer(7));
//// pa.setTecnico_hs_nome("Ana");
//// listActivos.add(pa);
////
//// pa = new PlanoActuacao();
////
//// cal.set( cal.YEAR, 2008 );
//// cal.set( cal.MONTH, cal.OCTOBER );
//// cal.set( cal.DATE, 12 );
////
//// cal.set( cal.HOUR_OF_DAY, 0 );
//// cal.set( cal.MINUTE, 0 );
//// cal.set( cal.SECOND, 0 );
//// cal.set( cal.MILLISECOND, 0 );
////
//// dataVisita =
//// new java.sql.Date( cal.getTime().getTime() );
////
//// pa.setData_visita(dataVisita);
//// pa.setEstabelecimento_id(new Integer(12));
//// pa.setFase(2);
//// pa.setFase_nome("DNS (Parecer)");
//// pa.setLoja_nome("Cascais");
//// pa.setTecnico_hs_id(new Integer(7));
//// pa.setTecnico_hs_nome("Sónia");
//// listActivos.add(pa);
// //End Dummy
// }
private PlanoActuacao getTableActivosRowData()
{
@ -514,7 +326,25 @@ public class ListaPlanos extends AbstractPageBean {
return p;
}
private PlanoActuacao getTableSeguimentoRowData()
{
RowKey rk = tableRowGroup2.getRowKey();
int k = Integer.parseInt(rk.getRowId());
PlanosSeguimentoDataProvider provider = (PlanosSeguimentoDataProvider) tableRowGroup2.getSourceData();
ArrayList list = (ArrayList) provider.getList();
PlanoActuacao p = (PlanoActuacao)list.get(k);
return p;
}
private PlanoActuacao getTableConcluidosRowData()
{
RowKey rk = tableRowGroup3.getRowKey();
int k = Integer.parseInt(rk.getRowId());
PlanosConcluidosDataProvider provider = (PlanosConcluidosDataProvider) tableRowGroup3.getSourceData();
ArrayList list = (ArrayList) provider.getList();
PlanoActuacao p = (PlanoActuacao)list.get(k);
return p;
}

@ -223,6 +223,7 @@ public class SessionBean1 extends AbstractSessionBean {
}
public void setDisableMenu(boolean disableMenu) {
System.out.println("DISABLE MENU : " + disableMenu);
setDisableMenuAnalises(disableMenu);
setDisableMenuPlanos(disableMenu);
setDisableMenuUtilizadores(disableMenu);

@ -7,7 +7,18 @@
package planosactuacao;
import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.webui.jsf.component.Button;
import com.sun.webui.jsf.component.PanelGroup;
import com.sun.webui.jsf.component.StaticText;
import db.entidades.Area;
import db.entidades.Medida;
import db.entidades.PlanoActuacao;
import db.entidades.PostoTrabalho;
import db.entidades.Risco;
import db.entidades.Valor;
import java.util.List;
import javax.faces.FacesException;
import javax.faces.component.html.HtmlPanelGrid;
/**
* <p>Page bean that corresponds to a similarly named JSP page. This
@ -28,8 +39,44 @@ public class ViewPlano extends AbstractPageBean {
*/
private void _init() throws Exception {
}
private Button butVoltar = new Button();
public Button getButVoltar() {
return butVoltar;
}
public void setButVoltar(Button b) {
this.butVoltar = b;
}
private HtmlPanelGrid gridLayout = new HtmlPanelGrid();
public HtmlPanelGrid getGridLayout() {
return gridLayout;
}
public void setGridLayout(HtmlPanelGrid hpg) {
this.gridLayout = hpg;
}
// </editor-fold>
HtmlPanelGrid gridPlano;
HtmlPanelGrid gridArea;
HtmlPanelGrid gridRisco;
HtmlPanelGrid gridValor;
HtmlPanelGrid gridMedida;
HtmlPanelGrid gridPosto;
HtmlPanelGrid gridResponsavel;
PanelGroup pg;
StaticText st;
private StaticText lblTop = new StaticText();
public StaticText getLblTop() {
return lblTop;
}
public void setLblTop(StaticText st) {
this.lblTop = st;
}
/**
* <p>Construct a new Page bean instance.</p>
@ -94,6 +141,8 @@ public class ViewPlano extends AbstractPageBean {
*/
@Override
public void prerender() {
PlanoActuacao p = getSessionBean1().getPlanoActuacao();
showPlano(p);
}
/**
@ -135,5 +184,153 @@ public class ViewPlano extends AbstractPageBean {
return (RequestBean1) getBean("RequestBean1");
}
private void showPlano(PlanoActuacao p)
{
gridPlano = new HtmlPanelGrid();
gridPlano.setId("gridPlano");
gridPlano.setWidth("100%");
gridPlano.setColumns(1);
gridPlano.setStyle("border: solid 1px #000000");
gridPlano.setColumnClasses("gridColCenter");
//plano
lblTop.setText("Plano de actua&ccedil;&atilde;o da auditoria " + p.getData_visita_str());
gridLayout.getChildren().add(gridPlano);
showAreas(p.getAreas());
}
private void showAreas(List<Area> areas)
{
for(Area area : areas)
{
gridArea = new HtmlPanelGrid();
gridArea.setColumns(1);
gridArea.setColumnClasses("gridColLeft");
gridArea.setWidth("100%");
gridPlano.getChildren().add(gridArea);
pg = new PanelGroup();
st = new StaticText();
st.setEscape(false);
st.setText(area.getDescricao());
pg.getChildren().add(st);
gridArea.getChildren().add(pg);
showRiscos(area.getRiscos());
}
}
private void showRiscos(List<Risco> riscos)
{
for(Risco risco : riscos)
{
HtmlPanelGrid grd = new HtmlPanelGrid();
grd.setColumns(1);
grd.setWidth("100%");
grd.setStyleClass("centerBlock");
gridArea.getChildren().add(grd);
gridRisco = new HtmlPanelGrid();
gridRisco.setStyleClass("centerBlock");
gridRisco.setWidth("98%");
gridRisco.setColumns(1);
gridRisco.setColumnClasses("gridColLeft");
grd.getChildren().add(gridRisco);
pg = new PanelGroup();
st = new StaticText();
st.setEscape(false);
st.setText(risco.getDescricao());
pg.getChildren().add(st);
gridRisco.getChildren().add(pg);
showValores(risco.getValores());
}
}
private void showValores(List<Valor> valores)
{
for(Valor valor : valores)
{
HtmlPanelGrid grd = new HtmlPanelGrid();
grd.setColumns(1);
grd.setWidth("100%");
grd.setStyleClass("centerBlock");
gridRisco.getChildren().add(grd);
gridValor = new HtmlPanelGrid();
gridValor.setStyleClass("centerBlock");
gridValor.setWidth("98%");
gridValor.setColumns(1);
gridValor.setColumnClasses("gridColLeft");
grd.getChildren().add(gridValor);
pg = new PanelGroup();
st = new StaticText();
st.setEscape(false);
st.setText("Valor : " + valor.getValor().toString());
pg.getChildren().add(st);
gridValor.getChildren().add(pg);
showMedidas(valor.getMedidas());
} }
private void showMedidas(List<Medida> medidas)
{
for(Medida medida : medidas)
{
HtmlPanelGrid grd = new HtmlPanelGrid();
grd.setColumns(1);
grd.setWidth("100%");
grd.setStyleClass("centerBlock");
gridValor.getChildren().add(grd);
gridMedida = new HtmlPanelGrid();
gridMedida.setStyleClass("centerBlock");
gridMedida.setWidth("98%");
gridMedida.setColumns(1);
gridMedida.setColumnClasses("gridColLeft");
grd.getChildren().add(gridMedida);
pg = new PanelGroup();
st = new StaticText();
st.setEscape(false);
st.setText(medida.getDescricao());
pg.getChildren().add(st);
gridMedida.getChildren().add(pg);
showPostos(medida.getPostos());
}
}
private void showPostos(List<PostoTrabalho> postos)
{
for(PostoTrabalho posto : postos)
{
HtmlPanelGrid grd = new HtmlPanelGrid();
grd.setColumns(1);
grd.setWidth("100%");
grd.setStyleClass("centerBlock");
gridMedida.getChildren().add(grd);
gridPosto = new HtmlPanelGrid();
gridPosto.setStyleClass("centerBlock");
gridPosto.setWidth("98%");
gridPosto.setColumns(1);
gridPosto.setColumnClasses("gridColLeft");
grd.getChildren().add(gridPosto);
pg = new PanelGroup();
st = new StaticText();
st.setEscape(false);
st.setText(posto.getDescricao());
pg.getChildren().add(st);
gridPosto.getChildren().add(pg);
}
}
public String butVoltar_action() {
// TODO: Process the action. Return value is a navigation
// case name where null will return to the same page.
System.out.print("BUT VOLTAR");
return "lista_planos";
}
}

@ -32,6 +32,7 @@
style="height: 24px; left: 144px; top: 216px; position: absolute; width: 60%" styleClass="centerBlock" width="408">
<webuijsf:panelGroup binding="#{Dummy.pgLink}" id="pgLink"/>
</h:panelGrid>
<webuijsf:calendar binding="#{Dummy.cal}" dateFormatPattern="dd-MM-yyyy" id="cal" style="position: absolute; left: 144px; top: 96px"/>
</webuijsf:form>
</webuijsf:body>
</webuijsf:html>

@ -53,6 +53,31 @@
// }
//}
}
function showDns()
{
var chk = document.getElementById("form1:groupPanel3:chkValidacao");
hid = document.getElementById("form1:hidValidacao");
if(hid.value == 'dns')
{
if(chk.checked)
{
document.getElementById("form1:gridParecer").className = "";
document.getElementById("form1:groupPanel2:stIrPara").className = "hidden";
document.getElementById("form1:groupPanel2:drpIrPara").className = "hidden";
var butEnviar = document.getElementById("form1:groupPanel2:butEnviar");
butEnviar.value = "Enviar para Técnico de HS&gt;&gt;";
}
else
{
document.getElementById("form1:gridParecer").className = "hidden";
document.getElementById("form1:groupPanel2:stIrPara").className = "";
document.getElementById("form1:groupPanel2:drpIrPara").className = "";
setButEnviarText(null, 0);
}
}
}
function show(chk)
{
hid = document.getElementById("form1:hidValidacao");
@ -62,7 +87,7 @@
{
document.getElementById("form1:gridParecer").className = "";
document.getElementById("_form1:groupPanel2:stIrPara").className = "hidden";
document.getElementById("_form1:groupPanel2:drpIrPara").className = "hidden";
document.getElementById("form1:groupPanel2:drpIrPara").className = "hidden";
var butEnviar = document.getElementById("form1:groupPanel2:butEnviar");
butEnviar.value = "Enviar para Técnico de HS&gt;&gt;";
}
@ -70,7 +95,7 @@
{
document.getElementById("form1:gridParecer").className = "hidden";
document.getElementById("_form1:groupPanel2:stIrPara").className = "";
document.getElementById("_form1:groupPanel2:drpIrPara").className = "";
document.getElementById("form1:groupPanel2:drpIrPara").className = "";
setButEnviarText(null, 0);
}
}
@ -117,7 +142,7 @@
<webuijsf:checkbox binding="#{EditarPlano.chkValidacao}" id="chkValidacao" onChange="show(this)" valueChangeListenerExpression="#{EditarPlano.chkValidacao_processValueChange}"/>
</webuijsf:panelGroup>
<h:panelGrid binding="#{EditarPlano.gridParecer}" columnClasses="gridColLeft10,gridColLeft90" columns="2" id="gridParecer"
style="height: 24px" styleClass="hidden" width="240">
style="height: 24px" width="240">
<webuijsf:staticText id="staticText3" styleClass="label" text="Parecer:"/>
<webuijsf:textArea binding="#{EditarPlano.txtParecer}" columns="60" id="txtParecer" rows="4"/>
</h:panelGrid>
@ -125,7 +150,8 @@
</h:panelGrid>
<h:panelGrid columns="1" id="gridButtons1" style="height: 24px; width: 80%" styleClass="centerBlock">
<h:panelGrid columnClasses="gridColLeft,gridColRight" columns="2" id="gridPanel1" style="height: 24px; width: 100%">
<webuijsf:button binding="#{EditarPlano.butLimparDados}" id="butLimparDados" style="width: 95px" text="Limpar dados"/>
<webuijsf:button actionExpression="#{EditarPlano.butLimparDados_action}" binding="#{EditarPlano.butLimparDados}"
id="butLimparDados" style="width: 95px" text="Limpar dados"/>
<webuijsf:panelGroup id="groupPanel1" style="width: 194px">
<webuijsf:button actionExpression="#{EditarPlano.butGravarPlano_action}" binding="#{EditarPlano.butGravarPlano}"
id="butGravarPlano" style="width: 95px" text="Gravar Plano"/>
@ -134,7 +160,8 @@
</webuijsf:panelGroup>
</h:panelGrid>
<h:panelGrid columnClasses="gridColLeft,gridColRight" columns="2" id="gridPanel2" style="height: 24px; width: 100%">
<webuijsf:button binding="#{EditarPlano.butCancelar}" id="butCancelar" style="width: 95px" text="Cancelar"/>
<webuijsf:button actionExpression="#{EditarPlano.butCancelar_action}" binding="#{EditarPlano.butCancelar}" id="butCancelar"
style="width: 95px" text="Cancelar"/>
<webuijsf:panelGroup id="groupPanel2" style="width: 194px">
<webuijsf:staticText binding="#{EditarPlano.stIrPara}" escape="false" id="stIrPara"
style="font-size: 12px; font-weight: bold" text="Enviar para:&amp;nbsp;"/>

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Document : EnviarCorrecao
Created on : Nov 13, 2008, 11:26:00 AM
Author : lluis
-->
<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
<jsp:directive.page contentType="text/html;charset=ISO-8859-1" pageEncoding="ISO-8859-1"/>
<f:view>
<webuijsf:page id="page1">
<webuijsf:html id="html1">
<webuijsf:head id="head1">
<webuijsf:link id="link1" url="/resources/stylesheet.css"/>
</webuijsf:head>
<webuijsf:body id="body1" style="-rave-layout: grid">
<webuijsf:form id="form1">
<div style="position: absolute; left: 0px; top: 0px; width: 100%">
<jsp:directive.include file="Header.jspf"/>
</div>
<h:panelGrid columns="1" id="gridBaseLayout" style="height: 24px; left: 0px; top: 96px; position: absolute; width: 100%" styleClass="centerBlock">
<h:panelGrid columnClasses="gridColCenter" columns="1" id="gridMsg" style="height: 24px; width: 100%">
<webuijsf:staticText binding="#{EnviarCorrecao.lblMsg}" id="lblMsg" styleClass="labelMsg "/>
</h:panelGrid>
<h:panelGrid columnClasses="gridColLeft" columns="1" id="gridLayout1" style="height: 24px; width: 60%" styleClass="centerBlock" width="432">
<webuijsf:staticText escape="false" id="staticText1" styleClass="label" text="Observa&amp;ccedil;&amp;otilde;es:"/>
<webuijsf:textArea binding="#{EnviarCorrecao.txtObservacoes}" columns="100" id="txtObservacoes" rows="4"/>
<webuijsf:staticText escape="false" id="staticText2" text="&amp;nbsp;"/>
<webuijsf:staticText escape="false" id="staticText3" styleClass="label" text="Enviar para fase:"/>
<webuijsf:dropDown binding="#{EnviarCorrecao.drpIrPara}" id="drpIrPara" items="#{SessionBean1.irParaOptions}"
onChange="setButEnviarText(null, this.selectedIndex);" selected="#{SessionBean1.irParaChoice}" style=""
valueChangeListenerExpression="#{EnviarCorrecao.drpIrPara_processValueChange}" width="300"/>
<webuijsf:staticText escape="false" id="staticText4" text="&amp;nbsp;"/>
<h:panelGrid columnClasses="gridColLeft,gridColRight" columns="2" id="gridPanel1" style="height: 24px; width: 100%" width="360">
<webuijsf:button binding="#{EnviarCorrecao.butCancelar}" id="butCancelar" text="Cancelar"/>
<webuijsf:button binding="#{EnviarCorrecao.butEnviar}" id="butEnviar" text="Enviar"/>
</h:panelGrid>
</h:panelGrid>
<h:panelGrid columnClasses="gridColCenter" columns="1" id="gridPanel2" style="height: 24px; width: 100%">
<webuijsf:panelGroup id="groupPanel1">
<webuijsf:staticText escape="false" id="staticText5" text="Software desenvolvido por&amp;nbsp;"/>
<webuijsf:image id="image1" url="/resources/images/logo_evolute_small.png"/>
<webuijsf:staticText escape="false" id="staticText6" text="&amp;nbsp;&amp;copy; 2008"/>
</webuijsf:panelGroup>
</h:panelGrid>
</h:panelGrid>
</webuijsf:form>
</webuijsf:body>
</webuijsf:html>
</webuijsf:page>
</f:view>
</jsp:root>

@ -7,7 +7,7 @@
<div style="height: 30px; width: 100%; -rave-layout: grid" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
<f:subview id="Header">
<h:panelGrid columnClasses="gridColRight" columns="1" id="gridPanel1" style="height: 24px; left: 0px; top: 0px; position: absolute; width: 100%" styleClass="centerBlock">
<h:panelGrid columnClasses="gridCol50,gridCol50" columns="2" id="gridPanel2" style="height: 24px; width: 80%" styleClass="centerBlock" width="552">
<h:panelGrid columnClasses="gridCol40,gridCol60" columns="2" id="gridPanel2" style="height: 24px; width: 80%" styleClass="centerBlock" width="552">
<webuijsf:panelGroup id="groupPanel1">
<webuijsf:image id="image1" url="/resources/images/SIPRP_logo_small.jpg"/>
<webuijsf:staticText escape="false" id="staticText1" style="" text="&amp;nbsp;"/>
@ -21,13 +21,16 @@
<webuijsf:panelGroup id="groupPanel3">
<webuijsf:staticText escape="false" id="lblUser1" styleClass="label" text="#{SessionBean1.currentUser.login}"/>
<webuijsf:staticText escape="false" id="staticText2" text="&amp;nbsp;&amp;nbsp;&amp;nbsp;"/>
<webuijsf:hyperlink disabled="#{SessionBean1.disableMenuPlanos}" id="lnkPlanosActuacao1" text="planos actuação"/>
<webuijsf:hyperlink actionExpression="#{Header.lnkPlanosActuacao1_action}" disabled="#{SessionBean1.disableMenuPlanos}"
id="lnkPlanosActuacao1" text="planos actuação"/>
<webuijsf:staticText escape="false" id="staticText3" text="&amp;nbsp;|&amp;nbsp;"/>
<webuijsf:hyperlink disabled="#{SessionBean1.disableMenuUtilizadores}" id="lnkGerirUtilizadores1" style="" text="gerir utilizadores"/>
<webuijsf:hyperlink actionExpression="#{Header.lnkGerirUtilizadores1_action}" disabled="#{SessionBean1.disableMenuUtilizadores}"
id="lnkGerirUtilizadores1" style="" text="gerir utilizadores"/>
<webuijsf:staticText escape="false" id="staticText4" text="&amp;nbsp;|&amp;nbsp;"/>
<webuijsf:hyperlink disabled="#{SessionBean1.disableMenuDadosUtilizador}" id="lnkDadosUtilizador1" style="" text="alterar dados utilizador"/>
<webuijsf:hyperlink actionExpression="#{Header.lnkDadosUtilizador1_action}" disabled="#{SessionBean1.disableMenuDadosUtilizador}"
id="lnkDadosUtilizador1" style="" text="alterar dados utilizador"/>
<webuijsf:staticText escape="false" id="staticText6" text="&amp;nbsp;|&amp;nbsp;"/>
<webuijsf:hyperlink id="lnkAjuda" style="" text="ajuda"/>
<webuijsf:hyperlink actionExpression="#{Header.lnkAjuda_action}" id="lnkAjuda" style="" text="ajuda"/>
<webuijsf:staticText escape="false" id="staticText5" text="&amp;nbsp;|&amp;nbsp;"/>
<webuijsf:hyperlink actionExpression="#{Header.lnkLogout_action}" id="lnkLogout1" text="sair&gt;&gt;"/>
</webuijsf:panelGroup>

@ -59,7 +59,8 @@
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goEditarPlano_action}" id="lnkFaseActivo" text="#{currentRow.value['fase_nome']}"/>
</webuijsf:tableColumn>
<webuijsf:tableColumn headerText="Plano" id="tableColumn10">
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goImprimirPlano_action}" id="lnkPlanoActivo" style="color: #008000;" text="imprimir"/>
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goImprimirPlano_action}" id="lnkPlanoActivo"
style="color: #008000;" text="imprimir"/>
</webuijsf:tableColumn>
<webuijsf:tableColumn headerText="Loja" id="tableColumn13" sort="loja_nome">
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goEditarPlano_action}" id="lnkLojaActivo" text="#{currentRow.value['nome_estabelecimento']}"/>
@ -75,20 +76,20 @@
<webuijsf:table augmentTitle="false" id="table2" style="width: 100%" styleClass="centerBlock" width="100%">
<webuijsf:tableRowGroup binding="#{ListaPlanos.tableRowGroup2}" id="tableRowGroup2" rows="10"
sourceData="#{SessionBean1.planosSeguimentoDataProvider}" sourceVar="currentRow">
<webuijsf:tableColumn headerText="Data da visita" id="tableColumn4" sort="data_visita">
<webuijsf:staticText id="staticText9" text="#{currentRow.value['data_visita_str']}"/>
<webuijsf:tableColumn headerText="Data da visita" id="tableColumn4" sort="data_visita_str">
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goVerPlanoFromSeguimento_action}" id="hyperlink1" text="#{currentRow.value['data_visita_str']}"/>
</webuijsf:tableColumn>
<webuijsf:tableColumn headerText="Técnico de HST" id="tableColumn5" sort="tecnico_hs_nome">
<webuijsf:staticText id="staticText10" text="#{currentRow.value['tecnico_hs_nome']}"/>
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goVerPlanoFromSeguimento_action}" id="hyperlink2" text="#{currentRow.value['tecnico_hs_nome']}"/>
</webuijsf:tableColumn>
<webuijsf:tableColumn headerText="Fase" id="tableColumn6" sort="fase">
<webuijsf:staticText id="staticText11" text="#{currentRow.value['fase_nome']}"/>
<webuijsf:tableColumn headerText="Fase" id="tableColumn6" sort="fase_nome">
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goVerPlanoFromSeguimento_action}" id="hyperlink3" text="#{currentRow.value['fase_nome']}"/>
</webuijsf:tableColumn>
<webuijsf:tableColumn headerText="Plano" id="tableColumn11">
<webuijsf:staticText id="staticText20" style="color: #008000;" text="imprimir"/>
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goImprimirPlano_action}" id="hyperlink4" text="imprimir"/>
</webuijsf:tableColumn>
<webuijsf:tableColumn headerText="Loja" id="tableColumn14">
<webuijsf:staticText id="staticText23" text="#{currentRow.value['nome_estabelecimento']}"/>
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goVerPlanoFromSeguimento_action}" id="hyperlink5" text="#{currentRow.value['nome_estabelecimento']}"/>
</webuijsf:tableColumn>
</webuijsf:tableRowGroup>
</webuijsf:table>
@ -101,20 +102,20 @@
<webuijsf:table augmentTitle="false" id="table3" style="width: 100%" styleClass="centerBlock" width="100%">
<webuijsf:tableRowGroup binding="#{ListaPlanos.tableRowGroup3}" id="tableRowGroup3" rows="10"
sourceData="#{SessionBean1.planosConcluidosDataProvider}" sourceVar="currentRow">
<webuijsf:tableColumn headerText="Data da visita" id="tableColumn7" sort="data_visita">
<webuijsf:staticText id="staticText16" text="#{currentRow.value['data_visita_str']}"/>
<webuijsf:tableColumn headerText="Data da visita" id="tableColumn7" sort="data_visita_str">
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goVerPlanoFromConcluidos_action}" id="hyperlink6" text="#{currentRow.value['data_visita_str']}"/>
</webuijsf:tableColumn>
<webuijsf:tableColumn headerText="Técnico de HST" id="tableColumn8" sort="tecnico_hs_nome">
<webuijsf:staticText id="staticText17" text="#{currentRow.value['tecnico_hs_nome']}"/>
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goVerPlanoFromConcluidos_action}" id="hyperlink7" text="#{currentRow.value['tecnico_hs_nome']}"/>
</webuijsf:tableColumn>
<webuijsf:tableColumn headerText="Fase" id="tableColumn9" sort="fase">
<webuijsf:staticText id="staticText18" text="#{currentRow.value['fase_nome']}"/>
<webuijsf:tableColumn headerText="Fase" id="tableColumn9" sort="fase_nome">
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goVerPlanoFromConcluidos_action}" id="hyperlink8" text="#{currentRow.value['fase_nome']}"/>
</webuijsf:tableColumn>
<webuijsf:tableColumn headerText="Plano" id="tableColumn12">
<webuijsf:staticText id="staticText21" style="color: #008000;" text="imprimir"/>
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goImprimirPlano_action}" id="hyperlink9" text="imprimir"/>
</webuijsf:tableColumn>
<webuijsf:tableColumn headerText="Loja" id="tableColumn15">
<webuijsf:staticText id="staticText24" text="#{currentRow.value['nome_estabelecimento']}"/>
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goVerPlanoFromConcluidos_action}" id="hyperlink10" text="#{currentRow.value['nome_estabelecimento']}"/>
</webuijsf:tableColumn>
</webuijsf:tableRowGroup>
</webuijsf:table>

@ -17,6 +17,16 @@
<div style="left: 0px; top: 0px; width: 100%">
<jsp:directive.include file="Header.jspf"/>
</div>
<h:panelGrid columns="1" id="gridBaseLayout" style="height: 24px; left: 0px; top: 96px; position: absolute; width: 100%" styleClass="centerBlock">
<webuijsf:staticText binding="#{ViewPlano.lblTop}" escape="false" id="lblTop" style="" styleClass="label "/>
<h:panelGrid binding="#{ViewPlano.gridLayout}" columns="1" id="gridLayout" style="height: 24px; width: 80%" styleClass="centerBlock"/>
<h:panelGrid columnClasses="gridColLeft" columns="1" id="gridButtons" style="height: 24px; width: 80%" styleClass="centerBlock" width="312">
<webuijsf:panelGroup id="groupPanel1">
<webuijsf:button actionExpression="#{ViewPlano.butVoltar_action}" binding="#{ViewPlano.butVoltar}" id="butVoltar"
style="width: 71px" text="Voltar"/>
</webuijsf:panelGroup>
</h:panelGrid>
</h:panelGrid>
</webuijsf:form>
</webuijsf:body>
</webuijsf:html>

@ -9,7 +9,7 @@
<application>
<view-handler>viewhandler.CustomViewHandler</view-handler>
<locale-config>
<default-locale>pt</default-locale>
<default-locale>pt_PT</default-locale>
</locale-config>
</application>
<lifecycle>
@ -63,6 +63,10 @@
<from-outcome>editar_plano</from-outcome>
<to-view-id>/EditarPlano.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>ver_plano</from-outcome>
<to-view-id>/ViewPlano.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/EditarPlano.jsp</from-view-id>
@ -70,12 +74,23 @@
<from-outcome>lista_planos</from-outcome>
<to-view-id>/ListaPlanos.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>lista_planos</from-outcome>
<to-view-id>/ListaPlanos.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<managed-bean>
<managed-bean-name>Header</managed-bean-name>
<managed-bean-class>planosactuacao.Header</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/ViewPlano.jsp</from-view-id>
<navigation-case>
<from-outcome>lista_planos</from-outcome>
<to-view-id>/ListaPlanos.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<managed-bean>
<managed-bean-name>Dummy</managed-bean-name>
<managed-bean-class>planosactuacao.Dummy</managed-bean-class>
@ -91,4 +106,9 @@
<managed-bean-class>planosactuacao.ViewPlano</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>EnviarCorrecao</managed-bean-name>
<managed-bean-class>planosactuacao.EnviarCorrecao</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
</faces-config>

@ -134,7 +134,7 @@ body {background-color: #f8f8f0;}
.visible {
/* visibility: visible; */
display : block;
display : inline;
}
.hidden {

Loading…
Cancel
Save