29/10/2008

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

@ -49,6 +49,7 @@
</condition>
<condition property="have.sources">
<or>
<available file="${src.src.dir}"/>
<available file="${src.dir}"/>
</or>
</condition>
@ -173,6 +174,7 @@
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
<fail unless="src.src.dir">Must set src.src.dir</fail>
<fail unless="src.dir">Must set src.dir</fail>
<fail unless="test.src.dir">Must set test.src.dir</fail>
<fail unless="build.dir">Must set build.dir</fail>
@ -204,7 +206,7 @@ or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties f
</target>
<target name="-init-macrodef-javac">
<macrodef name="javac" uri="http://www.netbeans.org/ns/web-project/2">
<attribute default="${src.dir}" name="srcdir"/>
<attribute default="${src.src.dir}:${src.dir}" name="srcdir"/>
<attribute default="${build.classes.dir}" name="destdir"/>
<attribute default="${javac.classpath}:${j2ee.platform.classpath}" name="classpath"/>
<attribute default="${javac.debug}" name="debug"/>
@ -391,6 +393,7 @@ or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties f
<target depends="init, deps-jar, -pre-pre-compile, -pre-compile, -copy-manifest, -copy-persistence-xml, -copy-webdir, library-inclusion-in-archive,library-inclusion-in-manifest,-do-ws-compile" if="have.sources" name="-do-compile">
<webproject2:javac destdir="${build.classes.dir}"/>
<copy todir="${build.classes.dir}">
<fileset dir="${src.src.dir}" excludes="${build.classes.excludes}"/>
<fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
</copy>
</target>
@ -423,6 +426,7 @@ or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties f
</customize>
</webproject2:javac>
<copy todir="${build.classes.dir}">
<fileset dir="${src.src.dir}" excludes="${build.classes.excludes}"/>
<fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
</copy>
</target>
@ -555,10 +559,30 @@ or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties f
<copy-ear-war file="${file.reference.postgresql-8.1-407.jdbc3.jar}" propname="included.lib.file.reference.postgresql-8.1-407.jdbc3.jar.X"/>
<basename file="${file.reference.postgresql-8.2-506.jdbc4.jar}" property="included.lib.file.reference.postgresql-8.2-506.jdbc4.jar"/>
<copy-ear-war file="${file.reference.postgresql-8.2-506.jdbc4.jar}" propname="included.lib.file.reference.postgresql-8.2-506.jdbc4.jar.X"/>
<basename file="${file.reference.cayenne-server-3.0M2.jar}" property="included.lib.file.reference.cayenne-server-3.0M2.jar"/>
<copy-ear-war file="${file.reference.cayenne-server-3.0M2.jar}" propname="included.lib.file.reference.cayenne-server-3.0M2.jar.X"/>
<basename file="${file.reference.commons-collections-3.1.jar}" property="included.lib.file.reference.commons-collections-3.1.jar"/>
<copy-ear-war file="${file.reference.commons-collections-3.1.jar}" propname="included.lib.file.reference.commons-collections-3.1.jar.X"/>
<basename file="${file.reference.commons-lang-2.1.jar}" property="included.lib.file.reference.commons-lang-2.1.jar"/>
<copy-ear-war file="${file.reference.commons-lang-2.1.jar}" propname="included.lib.file.reference.commons-lang-2.1.jar.X"/>
<basename file="${file.reference.commons-logging-1.1.jar}" property="included.lib.file.reference.commons-logging-1.1.jar"/>
<copy-ear-war file="${file.reference.commons-logging-1.1.jar}" propname="included.lib.file.reference.commons-logging-1.1.jar.X"/>
<basename file="${file.reference.evolute.jar}" property="included.lib.file.reference.evolute.jar"/>
<copy-ear-war file="${file.reference.evolute.jar}" propname="included.lib.file.reference.evolute.jar.X"/>
<basename file="${file.reference.jcalendar-1.3.2.jar}" property="included.lib.file.reference.jcalendar-1.3.2.jar"/>
<copy-ear-war file="${file.reference.jcalendar-1.3.2.jar}" propname="included.lib.file.reference.jcalendar-1.3.2.jar.X"/>
<basename file="${file.reference.log4j-1.2.8.jar}" property="included.lib.file.reference.log4j-1.2.8.jar"/>
<copy-ear-war file="${file.reference.log4j-1.2.8.jar}" propname="included.lib.file.reference.log4j-1.2.8.jar.X"/>
<basename file="${file.reference.mail.jar-1}" property="included.lib.file.reference.mail.jar-1"/>
<copy-ear-war file="${file.reference.mail.jar-1}" propname="included.lib.file.reference.mail.jar-1.X"/>
<basename file="${file.reference.TableLayout.jar}" property="included.lib.file.reference.TableLayout.jar"/>
<copy-ear-war file="${file.reference.TableLayout.jar}" propname="included.lib.file.reference.TableLayout.jar.X"/>
<basename file="${file.reference.ashwood-1.1.jar}" property="included.lib.file.reference.ashwood-1.1.jar"/>
<copy-ear-war file="${file.reference.ashwood-1.1.jar}" propname="included.lib.file.reference.ashwood-1.1.jar.X"/>
<copy file="${libs.exceptionhandler-runtime.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>
<mkdir dir="${build.web.dir}/META-INF"/>
<manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update">
<attribute name="Class-Path" value="${included.lib.libs.jsf12.classpath.1.X} ${included.lib.libs.jsf12.classpath.2.X} ${included.lib.libs.jsf12.classpath.3.X} ${included.lib.libs.jsf12.classpath.4.X} ${included.lib.libs.jsf12.classpath.5.X} ${included.lib.libs.jsf12.classpath.6.X} ${included.lib.libs.jstl11.classpath.1.X} ${included.lib.libs.jstl11.classpath.2.X} ${included.lib.libs.jsf12-support.classpath.1.X} ${included.lib.libs.jsf12-support.classpath.2.X} ${included.lib.libs.jsf12-support.classpath.3.X} ${included.lib.libs.jsf12-support.classpath.4.X} ${included.lib.libs.woodstock-components.classpath.1.X} ${included.lib.libs.woodstock-components.classpath.2.X} ${included.lib.libs.woodstock-components.classpath.3.X} ${included.lib.libs.woodstock-components.classpath.4.X} ${included.lib.libs.woodstock-components.classpath.5.X} ${included.lib.libs.woodstock-theme-default.classpath} ${included.lib.file.reference.activation.jar} ${included.lib.file.reference.mail.jar} ${included.lib.file.reference.postgresql-8.0-315.jdbc3.jar} ${included.lib.file.reference.postgresql-8.1-407.jdbc3.jar} ${included.lib.file.reference.postgresql-8.2-506.jdbc4.jar} "/>
<attribute name="Class-Path" value="${included.lib.libs.jsf12.classpath.1.X} ${included.lib.libs.jsf12.classpath.2.X} ${included.lib.libs.jsf12.classpath.3.X} ${included.lib.libs.jsf12.classpath.4.X} ${included.lib.libs.jsf12.classpath.5.X} ${included.lib.libs.jsf12.classpath.6.X} ${included.lib.libs.jstl11.classpath.1.X} ${included.lib.libs.jstl11.classpath.2.X} ${included.lib.libs.jsf12-support.classpath.1.X} ${included.lib.libs.jsf12-support.classpath.2.X} ${included.lib.libs.jsf12-support.classpath.3.X} ${included.lib.libs.jsf12-support.classpath.4.X} ${included.lib.libs.woodstock-components.classpath.1.X} ${included.lib.libs.woodstock-components.classpath.2.X} ${included.lib.libs.woodstock-components.classpath.3.X} ${included.lib.libs.woodstock-components.classpath.4.X} ${included.lib.libs.woodstock-components.classpath.5.X} ${included.lib.libs.woodstock-theme-default.classpath} ${included.lib.file.reference.activation.jar} ${included.lib.file.reference.mail.jar} ${included.lib.file.reference.postgresql-8.0-315.jdbc3.jar} ${included.lib.file.reference.postgresql-8.1-407.jdbc3.jar} ${included.lib.file.reference.postgresql-8.2-506.jdbc4.jar} ${included.lib.file.reference.cayenne-server-3.0M2.jar} ${included.lib.file.reference.commons-collections-3.1.jar} ${included.lib.file.reference.commons-lang-2.1.jar} ${included.lib.file.reference.commons-logging-1.1.jar} ${included.lib.file.reference.evolute.jar} ${included.lib.file.reference.jcalendar-1.3.2.jar} ${included.lib.file.reference.log4j-1.2.8.jar} ${included.lib.file.reference.mail.jar-1} ${included.lib.file.reference.TableLayout.jar} ${included.lib.file.reference.ashwood-1.1.jar} "/>
</manifest>
<delete dir="${dist.ear.dir}/temp"/>
</target>
@ -586,6 +610,16 @@ or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties f
<copy file="${file.reference.postgresql-8.0-315.jdbc3.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copy file="${file.reference.postgresql-8.1-407.jdbc3.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copy file="${file.reference.postgresql-8.2-506.jdbc4.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copy file="${file.reference.cayenne-server-3.0M2.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copy file="${file.reference.commons-collections-3.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copy file="${file.reference.commons-lang-2.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copy file="${file.reference.commons-logging-1.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copy file="${file.reference.evolute.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copy file="${file.reference.jcalendar-1.3.2.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copy file="${file.reference.log4j-1.2.8.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copy file="${file.reference.mail.jar-1}" todir="${build.web.dir}/WEB-INF/lib"/>
<copy file="${file.reference.TableLayout.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copy file="${file.reference.ashwood-1.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copy file="${libs.exceptionhandler-runtime.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>
</target>
<target depends="init,compile,compile-jsps,-pre-dist,library-inclusion-in-manifest" name="do-ear-dist">
@ -760,9 +794,12 @@ or ant -Dj2ee.platform.classpath=&lt;server_classpath&gt; (where no properties f
<path path="${javac.classpath}:${j2ee.platform.classpath}"/>
</classpath>
<sourcepath>
<pathelement location="${src.src.dir}"/>
<pathelement location="${src.dir}"/>
</sourcepath>
<packageset dir="${src.src.dir}" includes="*/**"/>
<packageset dir="${src.dir}" includes="*/**"/>
<fileset dir="${src.src.dir}" includes="*.java"/>
<fileset dir="${src.dir}" includes="*.java"/>
</javadoc>
</target>

@ -1,8 +1,8 @@
build.xml.data.CRC32=a8b7045a
build.xml.data.CRC32=3084e562
build.xml.script.CRC32=fa3993b7
build.xml.stylesheet.CRC32=cfd7ba16
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=a8b7045a
nbproject/build-impl.xml.script.CRC32=64f15e59
nbproject/build-impl.xml.data.CRC32=3084e562
nbproject/build-impl.xml.script.CRC32=db27eab1
nbproject/build-impl.xml.stylesheet.CRC32=8926891b

@ -20,10 +20,21 @@ dist.ear.war=${dist.dir}/${war.ear.name}
dist.javadoc.dir=${dist.dir}/javadoc
dist.war=${dist.dir}/${war.name}
file.reference.activation.jar=jars/activation.jar
file.reference.ashwood-1.1.jar=../common/lib/ashwood-1.1.jar
file.reference.cayenne-server-3.0M2.jar=../common/lib/cayenne-server-3.0M2.jar
file.reference.common-src=../common/src
file.reference.commons-collections-3.1.jar=../common/lib/commons-collections-3.1.jar
file.reference.commons-lang-2.1.jar=../common/lib/commons-lang-2.1.jar
file.reference.commons-logging-1.1.jar=../common/lib/commons-logging-1.1.jar
file.reference.evolute.jar=../common/lib/evolute.jar
file.reference.jcalendar-1.3.2.jar=../common/lib/jcalendar-1.3.2.jar
file.reference.log4j-1.2.8.jar=../common/lib/log4j-1.2.8.jar
file.reference.mail.jar=jars/mail.jar
file.reference.mail.jar-1=../common/lib/mail.jar
file.reference.postgresql-8.0-315.jdbc3.jar=jars/postgresql-8.0-315.jdbc3.jar
file.reference.postgresql-8.1-407.jdbc3.jar=jars/postgresql-8.1-407.jdbc3.jar
file.reference.postgresql-8.2-506.jdbc4.jar=jars/postgresql-8.2-506.jdbc4.jar
file.reference.TableLayout.jar=../common/lib/TableLayout.jar
j2ee.platform=1.5
j2ee.server.type=Tomcat60
jar.compress=false
@ -37,7 +48,17 @@ javac.classpath=\
${file.reference.mail.jar}:\
${file.reference.postgresql-8.0-315.jdbc3.jar}:\
${file.reference.postgresql-8.1-407.jdbc3.jar}:\
${file.reference.postgresql-8.2-506.jdbc4.jar}
${file.reference.postgresql-8.2-506.jdbc4.jar}:\
${file.reference.cayenne-server-3.0M2.jar}:\
${file.reference.commons-collections-3.1.jar}:\
${file.reference.commons-lang-2.1.jar}:\
${file.reference.commons-logging-1.1.jar}:\
${file.reference.evolute.jar}:\
${file.reference.jcalendar-1.3.2.jar}:\
${file.reference.log4j-1.2.8.jar}:\
${file.reference.mail.jar-1}:\
${file.reference.TableLayout.jar}:\
${file.reference.ashwood-1.1.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.debug=true
@ -74,6 +95,7 @@ runmain.jvmargs=
source.encoding=ISO-8859-1
source.root=src
src.dir=${source.root}/java
src.src.dir=${file.reference.common-src}
test.src.dir=test
war.content.additional=\
${libs.exceptionhandler-runtime.classpath}

@ -47,6 +47,46 @@
<file>${file.reference.postgresql-8.2-506.jdbc4.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library files="1">
<file>${file.reference.cayenne-server-3.0M2.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library files="1">
<file>${file.reference.commons-collections-3.1.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library files="1">
<file>${file.reference.commons-lang-2.1.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library files="1">
<file>${file.reference.commons-logging-1.1.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library files="1">
<file>${file.reference.evolute.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library files="1">
<file>${file.reference.jcalendar-1.3.2.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library files="1">
<file>${file.reference.log4j-1.2.8.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library files="1">
<file>${file.reference.mail.jar-1}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library files="1">
<file>${file.reference.TableLayout.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library files="1">
<file>${file.reference.ashwood-1.1.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
</web-module-libraries>
<web-module-additional-libraries>
<library files="1">
@ -55,6 +95,7 @@
</library>
</web-module-additional-libraries>
<source-roots>
<root id="src.src.dir"/>
<root id="src.dir"/>
</source-roots>
<test-roots>

@ -5,6 +5,7 @@
package db.entidades;
import java.util.List;
import java.util.Vector;
/**
@ -16,7 +17,7 @@ public class Medida {
private Integer risco_id;
private String descricao;
private String activa;
private Vector<PostoTrabalho> postos;
private List<PostoTrabalho> postos;
public Integer getId() {
return id;
@ -50,11 +51,11 @@ public class Medida {
this.risco_id = risco_id;
}
public Vector<PostoTrabalho> getPostos() {
public List<PostoTrabalho> getPostos() {
return postos;
}
public void setPostos(Vector<PostoTrabalho> postos) {
public void setPostos(List<PostoTrabalho> postos) {
this.postos = postos;
}
}

@ -5,8 +5,10 @@
package db.entidades;
import java.sql.Date;
import java.util.Vector;
import global.Global;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
/**
*
@ -15,12 +17,14 @@ import java.util.Vector;
public class PlanoActuacao {
private Integer id;
private Integer estabelecimento_id;
private String nome_estabelecimento;
private Integer fase;
private String descricao;
private Vector<Risco> riscos;
private List<Risco> riscos;
//
private Date data_visita;
private String data_visita_str;
private Integer tecnico_hs_id;
private String fase_nome;
private String tecnico_hs_nome;
@ -48,6 +52,7 @@ public class PlanoActuacao {
public void setFase(Integer fase) {
this.fase = fase;
fase_nome = Global.FASES_TEXTO[fase.intValue()-1];
}
public String getDescricao() {
@ -58,11 +63,11 @@ public class PlanoActuacao {
this.descricao = descricao;
}
public Vector<Risco> getRiscos() {
public List<Risco> getRiscos() {
return riscos;
}
public void setRiscos(Vector<Risco> riscos) {
public void setRiscos(List<Risco> riscos) {
this.riscos = riscos;
}
@ -72,7 +77,9 @@ public class PlanoActuacao {
public void setData_visita(Date data_visita) {
this.data_visita = data_visita;
}
SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
data_visita_str = formatter.format(data_visita);
}
public Integer getTecnico_hs_id() {
return tecnico_hs_id;
@ -105,4 +112,20 @@ public class PlanoActuacao {
public void setLoja_nome(String loja_nome) {
this.loja_nome = loja_nome;
}
public String getData_visita_str() {
return data_visita_str;
}
public void setData_visita_str(String data_visita_str) {
this.data_visita_str = data_visita_str;
}
public String getNome_estabelecimento() {
return nome_estabelecimento;
}
public void setNome_estabelecimento(String nome_estabelecimento) {
this.nome_estabelecimento = nome_estabelecimento;
}
}

@ -5,6 +5,7 @@
package db.entidades;
import java.util.List;
import java.util.Vector;
/**
@ -18,7 +19,7 @@ public class Risco {
private String activo;
private Integer valor;
private Vector<Medida> medidas;
private List<Medida> medidas;
public Integer getId() {
return id;
@ -60,11 +61,11 @@ public class Risco {
this.valor = valor;
}
public Vector<Medida> getMedidas() {
public List<Medida> getMedidas() {
return medidas;
}
public void setMedidas(Vector<Medida> medidas) {
public void setMedidas(List<Medida> medidas) {
this.medidas = medidas;
}
}

@ -14,6 +14,8 @@ import global.Global;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
*
@ -26,10 +28,15 @@ public class PlanosDataProvider extends GenericDataProvider{
{
Statement st = createStatement();
Integer newId = getMaxTableId("planos_actuacao");
String sql = "";
//To Do sql string here :
String sql = "insert into planos_actuacao (id, estabelecimento_id, fase, data_visita, nome_estabelecimento) values (";
sql += newId + ", ";
sql += p.getEstabelecimento_id() + ", ";
sql += p.getFase() + ", '";
java.sql.Date sqlDate = new java.sql.Date(p.getData_visita().getTime());
sql += sqlDate + "', '";
sql += p.getNome_estabelecimento() + "'";
sql += ")";
System.out.println("SQL CREATE PLANO : " + sql);
st.execute(sql);
@ -49,6 +56,26 @@ public class PlanosDataProvider extends GenericDataProvider{
st.execute(sql);
}
public List<Date> getPlanosOnline() throws Exception
{
ArrayList list = new ArrayList();
Statement st = createStatement();
String sql = "select data_visita from planos_actuacao";
ResultSet rs = st.executeQuery(sql);
if(rs.isBeforeFirst())
{
rs.first();
do
{
java.sql.Date sqlDate = rs.getDate("data_visita");
java.util.Date data_visita = new java.util.Date(sqlDate.getTime());
list.add(data_visita);
}while(rs.next());
}
return list;
}
public ArrayList getPlanosActivos(Utilizador u) throws Exception
{
int userType = u.getTipo().intValue();
@ -111,7 +138,7 @@ public class PlanosDataProvider extends GenericDataProvider{
return list;
}
public ArrayList getPlanosConcluidos(Utilizador u) throws Exception
public ArrayList getPlanosConcluidos() throws Exception
{
Statement st = createStatement();
String sql = "select * from planos_actuacao where fase = 6";
@ -131,8 +158,10 @@ public class PlanosDataProvider extends GenericDataProvider{
PlanoActuacao pa = new PlanoActuacao();
pa.setId( new Integer( rs.getInt("id") ) );
pa.setEstabelecimento_id(new Integer(rs.getInt("estabelecimento_id")));
pa.setNome_estabelecimento(rs.getString("nome_estabelecimento"));
pa.setFase( new Integer( rs.getInt("fase") ) );
pa.setData_visita(rs.getDate("data_visita"));
java.sql.Date sqlDate = rs.getDate("data_visita");
pa.setData_visita(new java.util.Date(sqlDate.getTime()));
list.add(pa);
}while(rs.next());

@ -15,6 +15,8 @@ import com.sun.webui.jsf.component.PanelGroup;
import com.sun.webui.jsf.component.StaticText;
import com.sun.webui.jsf.component.TextArea;
import com.sun.webui.jsf.component.TextField;
import com.sun.webui.jsf.model.Option;
import com.sun.webui.jsf.model.SingleSelectOptionsList;
import db.entidades.Medida;
import db.entidades.PlanoActuacao;
@ -158,15 +160,6 @@ public class EditarPlano extends AbstractPageBean {
public void setChkValidacao(Checkbox c) {
this.chkValidacao = c;
}
private SingleSelectOptionsList drpIrParaDefaultOptions = new SingleSelectOptionsList();
public SingleSelectOptionsList getDrpIrParaDefaultOptions() {
return drpIrParaDefaultOptions;
}
public void setDrpIrParaDefaultOptions(SingleSelectOptionsList ssol) {
this.drpIrParaDefaultOptions = ssol;
}
private HtmlPanelGrid gridParecer = new HtmlPanelGrid();
public HtmlPanelGrid getGridParecer() {
@ -738,6 +731,10 @@ public class EditarPlano extends AbstractPageBean {
{
hidValidacao.setValue("dns");
}
else if(u.getTipo().intValue() == Global.DIRECTOR_LOJA)
{
hidValidacao.setValue("dir_loja");
}
//gridValidar.setStyleClass("hidden");
@ -764,6 +761,35 @@ public class EditarPlano extends AbstractPageBean {
// }
// }
PlanoActuacao p = getSessionBean1().getPlanoActuacao();
int fase = p.getFase().intValue();
switch(fase)
{
case Global.FASE_SEGURANCA_PREENCHIMENTO:
butEnviar.setText("Enviar a Director de Loja>>");
break;
case Global.FASE_DIR_LOJA_VALIDACAO:
//butEnviar.setText("Enviar a Director de Loja");
butEnviar.setText("Enviar para Responsável de Segurança>>");
break;
case Global.FASE_DNS_PARECER:
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");
listOptions[1] = new Option(new Integer(Global.FASE_DIR_LOJA_VALIDACAO), "Director de loja");
drpIrPara.setItems(listOptions);
drpIrPara.setSelected(new Integer( Global.FASE_SEGURANCA_PREENCHIMENTO ));
butEnviar.setText("Enviar para Responsável de segurança>>");
break;
case Global.FASE_SIPRP_CONCLUSAO:
butEnviar.setText("Concluir");
break;
}
gridPlano.setWidth("100%");
gridPlano.setColumns(1);
gridPlano.setColumnClasses("gridColCenter");
@ -829,6 +855,20 @@ public class EditarPlano extends AbstractPageBean {
break;
case Global.FASE_DIR_LOJA_VALIDACAO:
Boolean validacao = (Boolean)chkValidacao.getSelected();
if(validacao == null)
{
processo_validado = false;
}
else
{
processo_validado = false;
if(validacao.booleanValue())
{
processo_validado = true;
}
}
if(processo_validado)
{
fase++;
@ -840,16 +880,31 @@ public class EditarPlano extends AbstractPageBean {
break;
case Global.FASE_DNS_PARECER:
validacao = (Boolean)chkValidacao.getSelected();
if(validacao == null)
{
processo_validado = false;
}
else
{
processo_validado = false;
if(validacao.booleanValue())
{
processo_validado = true;
}
}
if(processo_validado)
{
fase++;
}
else
{
Integer irPara = (Integer)drpIrPara.getSelected();
dns_next_fase = irPara.intValue();
fase = dns_next_fase;
}
break;
}
//dummy : later on will update db with new fase
@ -931,6 +986,10 @@ public class EditarPlano extends AbstractPageBean {
gridParecer.setStyleClass("hidden");
}
}
public void drpIrPara_processValueChange(ValueChangeEvent event) {
}
}

@ -16,8 +16,16 @@ import db.entidades.Utilizador;
import db.providers.PlanosDataProvider;
import global.Global;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import javax.faces.FacesException;
import javax.faces.context.FacesContext;
import siprp.database.cayenne.objects.HsRelatorio;
import siprp.database.cayenne.objects.HsRelatorioMedida;
import siprp.database.cayenne.objects.HsRelatorioRisco;
import siprp.database.cayenne.providers.PlanoActuacaoDAO;
import tabledataproviders.PlanosActualDataProvider;
import utils.JSFUtils;
@ -78,6 +86,7 @@ public class ListaPlanos extends AbstractPageBean {
}
// </editor-fold>
PlanosDataProvider pdp = new PlanosDataProvider();
/**
* <p>Construct a new Page bean instance.</p>
@ -236,210 +245,260 @@ public class ListaPlanos extends AbstractPageBean {
return null;
}
private void initialize()
{
PlanosDataProvider pdp = new PlanosDataProvider();
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)
Integer estabelecimento_id = null;
if(u.getTipo().intValue() != Global.TECNICO_HS)
{
ex.printStackTrace();
estabelecimento_id = u.getEstabelecimento_id();
}
PlanoActuacaoDAO pa = new PlanoActuacaoDAO();
List<Date> list = new ArrayList();
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.DAY_OF_MONTH, 27);
calendar.set(Calendar.MONTH, 9);
calendar.set(Calendar.YEAR, 2008);
java.util.Date date = new java.util.Date(calendar.getTimeInMillis());
//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();
}
// list.add(date);
// List<HsRelatorio> listPlanos = pa.getRelatoriosNotIn(list);
// System.out.println("PLANOS = " + listPlanos.size());
// Iterator iter = listPlanos.iterator();
// while(iter.hasNext())
// {
// HsRelatorio relatorio = (HsRelatorio) iter.next();
//
// List<HsRelatorioRisco> relatorio_riscoList = relatorio.getHsRelatorioRiscoArray();
// HsRelatorioRisco rr = null;
// HsRelatorioMedida rm = null;
//
//
// //next is to get estabelecimento from relatorio
//
//// MarcacoesEstabelecimento me = relatorio.getToHsMarcacoesEstabelecimento();
//// Estabelecimentos es = me.getToEstabelecimentos();
//// Integer id = es.getId(); // estabelecimento id ??
// }
PlanosActuacao planos = new PlanosActuacao();
//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();
}
List listPlanosActivos = planos.getPlanosActivos(u);
getSessionBean1().getPlanosActualDataProvider().setList(listPlanosActivos);
List listPlanosSeguimento = planos.getPlanosSeguimento(u);
getSessionBean1().getPlanosSeguimentoDataProvider().setList(listPlanosSeguimento);
//Dummy : to remove later
// ArrayList listActivos = new ArrayList();
// PlanoActuacao pa = new PlanoActuacao();
List listPlanosConcluidos = planos.getPlanosConcluidos();
getSessionBean1().getPlanosConcluidosDataProvider().setList(listPlanosConcluidos);
}
// private void initialize1()
// {
//
// Utilizador u = getSessionBean1().getCurrentUser();
//
// Calendar cal = Calendar.getInstance();
// //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");
// }
//
// cal.set( cal.YEAR, 2008 );
// cal.set( cal.MONTH, cal.SEPTEMBER );
// cal.set( cal.DATE, 3 );
//
// 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");
// }
//
// 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 = (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();
// }
//
//
// 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);
// //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 = new PlanoActuacao();
//
// 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();
// }
//
//
// cal.set( cal.YEAR, 2008 );
// cal.set( cal.MONTH, cal.OCTOBER );
// cal.set( cal.DATE, 12 );
// //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");
// }
//
// cal.set( cal.HOUR_OF_DAY, 0 );
// cal.set( cal.MINUTE, 0 );
// cal.set( cal.SECOND, 0 );
// cal.set( cal.MILLISECOND, 0 );
//
// 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");
// }
//
// dataVisita =
// new java.sql.Date( cal.getTime().getTime() );
//
// 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();
// }
//
// 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
}
//
// //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()
{

@ -0,0 +1,122 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package planosactuacao;
import db.entidades.PlanoActuacao;
import db.entidades.Utilizador;
import db.providers.PlanosDataProvider;
import global.Global;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import siprp.database.cayenne.objects.HsRelatorio;
import siprp.database.cayenne.providers.PlanoActuacaoDAO;
/**
*
* @author lluis
*/
public class PlanosActuacao {
PlanosDataProvider pdp = new PlanosDataProvider();
List<PlanoActuacao> planosList;
List<Date> planosOnlineList;
PlanoActuacaoDAO pa = new PlanoActuacaoDAO();
public PlanosActuacao(){
List<Date> planosOnlineList = getPlanosOnline();
List<HsRelatorio> listRelatorios = getRelatorios(planosOnlineList);
putPlanosOnline(listRelatorios);
}
private List<Date> getPlanosOnline()
{
List<Date> list = null;
try
{
list = pdp.getPlanosOnline();
}
catch(Exception ex)
{
}
return list;
}
private List<HsRelatorio> getRelatorios(List<Date> list)
{
List<HsRelatorio> listRelatorios = pa.getRelatoriosNotIn(list);
return listRelatorios;
}
private void putPlanosOnline(List<HsRelatorio> listRelatorios)
{
Iterator<HsRelatorio> iter = listRelatorios.iterator();
while(iter.hasNext())
{
HsRelatorio relatorio = iter.next();
PlanoActuacao p = new PlanoActuacao();
p.setData_visita(relatorio.getToHsMarcacoesEstabelecimento().getData());
p.setFase(new Integer(Global.FASE_SEGURANCA_PREENCHIMENTO));
p.setEstabelecimento_id(relatorio.getToHsMarcacoesEstabelecimento().getToEstabelecimentos().getId());
p.setNome_estabelecimento(relatorio.getToHsMarcacoesEstabelecimento().getToEstabelecimentos().getNome());
try
{
pdp.createPlano(p);
}
catch(Exception ex)
{
ex.printStackTrace();
}
}
}
public List<PlanoActuacao> getPlanosActivos(Utilizador u)
{
ArrayList list = new ArrayList();
try
{
list = pdp.getPlanosActivos(u);
}
catch(Exception ex)
{
}
return list;
}
public List<PlanoActuacao> getPlanosSeguimento(Utilizador u)
{
ArrayList list = new ArrayList();
try
{
list = pdp.getPlanosSeguimento(u);
}
catch(Exception ex)
{
}
return list;
}
public List<PlanoActuacao> getPlanosConcluidos()
{
ArrayList list = new ArrayList();
try
{
list = pdp.getPlanosConcluidos();
}
catch(Exception ex)
{
}
return list;
}
}

@ -307,5 +307,25 @@ public class SessionBean1 extends AbstractSessionBean {
public void setPlanoActuacao(PlanoActuacao planoActuacao) {
this.planoActuacao = planoActuacao;
}
private Integer irParaChoice;
public Integer getIrParaChoice() {
return irParaChoice;
}
public void setIrParaChoice(Integer irParaChoice) {
this.irParaChoice = irParaChoice;
}
private com.sun.webui.jsf.model.Option[] irParaOptions;
public com.sun.webui.jsf.model.Option[] getIrParaOptions() {
return irParaOptions;
}
public void setIrParaOptions(com.sun.webui.jsf.model.Option[] irParaOptions) {
this.irParaOptions = irParaOptions;
}
}

@ -12,6 +12,47 @@
<webuijsf:head id="head1">
<webuijsf:link id="link1" url="/resources/stylesheet.css"/>
<script>
function setButEnviarText(chk, index)
{
if(chk == null) // dropDown
{
hid = document.getElementById("form1:hidValidacao");
if(hid.value == "dns")
{
var butEnviar = document.getElementById("form1:groupPanel2:butEnviar");
var drp = document.getElementById("form1:groupPanel2:drpIrPara");
//var fase = drp.selectedIndex;
var fase = index;
switch(fase)
{
case 0:
butEnviar.value = "Enviar para Responsável de segurança&gt;&gt;";
break;
case 1:
butEnviar.value = "Enviar para Director de loja&gt;&gt;";
break;
}
}
}
//else
//{
// hid = document.getElementById("form1:hidValidacao");
// if(hid.value == "dir_loja")
// {
// var butEnviar = document.getElementById("form1:groupPanel2:butEnviar");
// if(chk.checked)
// {
//
// butEnviar.value = "Enviar para DNS"; }
// else
// {
// butEnviar.value = "Enviar para Responsável de segurança";
// }
// }
//}
}
function show(chk)
{
hid = document.getElementById("form1:hidValidacao");
@ -22,14 +63,30 @@
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 = "";
document.getElementById("_form1:groupPanel2:drpIrPara").className = "";
setButEnviarText(null, 0);
}
}
}
else if(hid.value == 'dir_loja')
{
if(chk.checked)
{
var butEnviar = document.getElementById("form1:groupPanel2:butEnviar");
butEnviar.value = "Enviar para Director Nacional de Segurança&gt;&gt;";
}
else
{
var butEnviar = document.getElementById("form1:groupPanel2:butEnviar");
butEnviar.value = "Enviar para Responsável de Segurança&gt;&gt;";
}
}
}
</script>
@ -75,11 +132,13 @@
<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:panelGroup id="groupPanel2" style="width: 194px">
<webuijsf:staticText binding="#{EditarPlano.stIrPara}" escape="false" id="stIrPara" styleClass="label" text="Enviar para:&amp;nbsp;"/>
<webuijsf:dropDown binding="#{EditarPlano.drpIrPara}" id="drpIrPara"
items="#{EditarPlano.drpIrParaDefaultOptions.options}" style="" width="150"/>
<webuijsf:staticText binding="#{EditarPlano.stIrPara}" escape="false" id="stIrPara"
style="font-size: 12px; font-weight: bold" text="Enviar para:&amp;nbsp;"/>
<webuijsf:dropDown binding="#{EditarPlano.drpIrPara}" id="drpIrPara" items="#{SessionBean1.irParaOptions}"
onChange="setButEnviarText(null, this.selectedIndex);" selected="#{SessionBean1.irParaChoice}" style=""
valueChangeListenerExpression="#{EditarPlano.drpIrPara_processValueChange}" width="150"/>
<webuijsf:staticText escape="false" id="staticText4" text="&amp;nbsp;&amp;nbsp;"/>
<webuijsf:button actionExpression="#{EditarPlano.butEnviar_action}" binding="#{EditarPlano.butEnviar}" id="butEnviar" style="width: 153px"/>
<webuijsf:button actionExpression="#{EditarPlano.butEnviar_action}" binding="#{EditarPlano.butEnviar}" id="butEnviar" style="width: 223px"/>
</webuijsf:panelGroup>
</h:panelGrid>
</h:panelGrid>

@ -7,11 +7,11 @@
<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="gridCol30,gridCol70" columns="2" id="gridPanel2" style="height: 24px; width: 80%" styleClass="centerBlock" width="552">
<h:panelGrid columnClasses="gridCol50,gridCol50" 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;"/>
<webuijsf:image height="40" id="image2" style="" url="/resources/images/logo_auchan_small.jpg"/>
<webuijsf:image height="40" id="image2" style="" url="/resources/images/Logo_Auchan_novo.jpg"/>
</webuijsf:panelGroup>
<h:panelGrid columnClasses="gridColRight" columns="1" id="gridPanel3" style="height: 24px; width: 80%" styleClass="centerBlock">
<webuijsf:panelGroup id="groupPanel2" style="">

@ -50,7 +50,7 @@
<webuijsf:tableRowGroup binding="#{ListaPlanos.tableRowGroup1}" id="tableRowGroup1" rows="10"
sourceData="#{SessionBean1.planosActualDataProvider}" sourceVar="currentRow">
<webuijsf:tableColumn headerText="Data da visita" id="tableColumn1" sort="data_visita">
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goEditarPlano_action}" id="lnkDataActivo" text="#{currentRow.value['data_visita']}"/>
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goEditarPlano_action}" id="lnkDataActivo" text="#{currentRow.value['data_visita_str']}"/>
</webuijsf:tableColumn>
<webuijsf:tableColumn headerText="Técnico de HST" id="tableColumn2" sort="tecnico_hs_nome">
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goEditarPlano_action}" id="lnkTecnicoHsActivo" text="#{currentRow.value['tecnico_hs_nome']}"/>
@ -62,7 +62,7 @@
<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['loja_nome']}"/>
<webuijsf:hyperlink actionExpression="#{ListaPlanos.goEditarPlano_action}" id="lnkLojaActivo" text="#{currentRow.value['nome_estabelecimento']}"/>
</webuijsf:tableColumn>
</webuijsf:tableRowGroup>
</webuijsf:table>
@ -76,7 +76,7 @@
<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']}"/>
<webuijsf:staticText id="staticText9" 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']}"/>
@ -88,7 +88,7 @@
<webuijsf:staticText id="staticText20" style="color: #008000;" text="imprimir"/>
</webuijsf:tableColumn>
<webuijsf:tableColumn headerText="Loja" id="tableColumn14">
<webuijsf:staticText id="staticText23" text="#{currentRow.value['loja_nome']}"/>
<webuijsf:staticText id="staticText23" text="#{currentRow.value['nome_estabelecimento']}"/>
</webuijsf:tableColumn>
</webuijsf:tableRowGroup>
</webuijsf:table>
@ -102,7 +102,7 @@
<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']}"/>
<webuijsf:staticText id="staticText16" 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']}"/>
@ -114,7 +114,7 @@
<webuijsf:staticText id="staticText21" style="color: #008000;" text="imprimir"/>
</webuijsf:tableColumn>
<webuijsf:tableColumn headerText="Loja" id="tableColumn15">
<webuijsf:staticText id="staticText24" text="#{currentRow.value['loja_nome']}"/>
<webuijsf:staticText id="staticText24" text="#{currentRow.value['nome_estabelecimento']}"/>
</webuijsf:tableColumn>
</webuijsf:tableRowGroup>
</webuijsf:table>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

@ -93,7 +93,20 @@ body {background-color: #f8f8f0;}
}
.gridCol30{
width: 30%;
}
.gridCol40{
width: 40%;
}
.gridCol50{
width: 50%;
}
.gridCol60{
width: 60%;
}
.gridCol70{
width: 70%;
}

Loading…
Cancel
Save