git-svn-id: https://svn.coded.pt/svn/SIPRP@1435 bb69d46d-e84e-40c8-a05a-06db0d633741

lxbfYeaa
Diogo Neves 15 years ago
parent 769b43ab67
commit 0a65efccff

@ -537,13 +537,16 @@ exists or setup the property manually. For example like this:
<copyfiles files="${file.reference.evologger.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.evologger.jar" todir="${dist.ear.dir}"/> <copyfiles files="${file.reference.evologger.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.evologger.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.poi-3.5-beta6-20090622.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.poi-3.5-beta6-20090622.jar" todir="${dist.ear.dir}"/> <copyfiles files="${file.reference.poi-3.5-beta6-20090622.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.poi-3.5-beta6-20090622.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.poi-ooxml-3.5-beta6-20090622.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.poi-ooxml-3.5-beta6-20090622.jar" todir="${dist.ear.dir}"/> <copyfiles files="${file.reference.poi-ooxml-3.5-beta6-20090622.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.poi-ooxml-3.5-beta6-20090622.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.commons-io-1.3.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.commons-io-1.3.1.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.commons-logging-1.0.4.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.commons-logging-1.0.4.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.xalan-2.7.0.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.xalan-2.7.0.jar" todir="${dist.ear.dir}"/> <copyfiles files="${file.reference.xalan-2.7.0.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.xalan-2.7.0.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.commons-io-1.4.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.commons-io-1.4.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.commons-logging-1.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.commons-logging-1.1.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.log4j-1.2.15.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.log4j-1.2.15.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.xercesImpl-2.7.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.xercesImpl-2.7.1.jar" todir="${dist.ear.dir}"/> <copyfiles files="${file.reference.xercesImpl-2.7.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.xercesImpl-2.7.1.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.xml-apis-1.3.04.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.xml-apis-1.3.04.jar" todir="${dist.ear.dir}"/> <copyfiles files="${file.reference.xml-apis-1.3.04.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.xml-apis-1.3.04.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.xml-apis-ext-1.3.04.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.xml-apis-ext-1.3.04.jar" todir="${dist.ear.dir}"/> <copyfiles files="${file.reference.xml-apis-ext-1.3.04.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.xml-apis-ext-1.3.04.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.serializer-2.7.0.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.serializer-2.7.0.jar" todir="${dist.ear.dir}"/> <copyfiles files="${file.reference.serializer-2.7.0.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.serializer-2.7.0.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.commons-collections-3.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.commons-collections-3.1.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${file.reference.commons-lang-2.1.jar}" iftldtodir="${build.web.dir}/WEB-INF" manifestproperty="manifest.file.reference.commons-lang-2.1.jar" todir="${dist.ear.dir}"/>
<copyfiles files="${libs.jsf-runtime.classpath}" todir="${build.web.dir}/WEB-INF/lib"/> <copyfiles files="${libs.jsf-runtime.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${libs.jsfsupport-runtime.classpath}" todir="${build.web.dir}/WEB-INF/lib"/> <copyfiles files="${libs.jsfsupport-runtime.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${libs.webui-runtime.classpath}" todir="${build.web.dir}/WEB-INF/lib"/> <copyfiles files="${libs.webui-runtime.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>
@ -553,7 +556,7 @@ exists or setup the property manually. For example like this:
<copyfiles files="${libs.jstl11.classpath}" todir="${build.web.dir}/WEB-INF/lib"/> <copyfiles files="${libs.jstl11.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>
<mkdir dir="${build.web.dir}/META-INF"/> <mkdir dir="${build.web.dir}/META-INF"/>
<manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"> <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update">
<attribute name="Class-Path" value="${manifest.libs.jsf-designtime.classpath} ${manifest.libs.jsfsupport-designtime.classpath} ${manifest.libs.webui-designtime.classpath} ${manifest.libs.jdbcsupport-designtime.classpath} ${manifest.libs.theme-default.classpath} ${manifest.libs.jstl11.classpath} ${manifest.libs.rowset-ri.classpath} ${manifest.file.reference.activation.jar} ${manifest.file.reference.avalon-framework-4.2.0.jar} ${manifest.file.reference.iText-2.0.8.jar} ${manifest.file.reference.batik-all-1.7.jar} ${manifest.file.reference.fop.jar} ${manifest.file.reference.xmlgraphics-commons-1.3.1.jar} ${manifest.file.reference.jai_imageio.jar} ${manifest.file.reference.jdom.jar} ${manifest.file.reference.mail.jar} ${manifest.file.reference.postgresql-8.2-506.jdbc4.jar} ${manifest.file.reference.evolute.jar} ${manifest.file.reference.evologger.jar} ${manifest.file.reference.poi-3.5-beta6-20090622.jar} ${manifest.file.reference.poi-ooxml-3.5-beta6-20090622.jar} ${manifest.file.reference.commons-io-1.3.1.jar} ${manifest.file.reference.commons-logging-1.0.4.jar} ${manifest.file.reference.xalan-2.7.0.jar} ${manifest.file.reference.xercesImpl-2.7.1.jar} ${manifest.file.reference.xml-apis-1.3.04.jar} ${manifest.file.reference.xml-apis-ext-1.3.04.jar} ${manifest.file.reference.serializer-2.7.0.jar} "/> <attribute name="Class-Path" value="${manifest.libs.jsf-designtime.classpath} ${manifest.libs.jsfsupport-designtime.classpath} ${manifest.libs.webui-designtime.classpath} ${manifest.libs.jdbcsupport-designtime.classpath} ${manifest.libs.theme-default.classpath} ${manifest.libs.jstl11.classpath} ${manifest.libs.rowset-ri.classpath} ${manifest.file.reference.activation.jar} ${manifest.file.reference.avalon-framework-4.2.0.jar} ${manifest.file.reference.iText-2.0.8.jar} ${manifest.file.reference.batik-all-1.7.jar} ${manifest.file.reference.fop.jar} ${manifest.file.reference.xmlgraphics-commons-1.3.1.jar} ${manifest.file.reference.jai_imageio.jar} ${manifest.file.reference.jdom.jar} ${manifest.file.reference.mail.jar} ${manifest.file.reference.postgresql-8.2-506.jdbc4.jar} ${manifest.file.reference.evolute.jar} ${manifest.file.reference.evologger.jar} ${manifest.file.reference.poi-3.5-beta6-20090622.jar} ${manifest.file.reference.poi-ooxml-3.5-beta6-20090622.jar} ${manifest.file.reference.xalan-2.7.0.jar} ${manifest.file.reference.commons-io-1.4.jar} ${manifest.file.reference.commons-logging-1.1.jar} ${manifest.file.reference.log4j-1.2.15.jar} ${manifest.file.reference.xercesImpl-2.7.1.jar} ${manifest.file.reference.xml-apis-1.3.04.jar} ${manifest.file.reference.xml-apis-ext-1.3.04.jar} ${manifest.file.reference.serializer-2.7.0.jar} ${manifest.file.reference.commons-collections-3.1.jar} ${manifest.file.reference.commons-lang-2.1.jar} "/>
</manifest> </manifest>
</target> </target>
<target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir"> <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
@ -578,13 +581,16 @@ exists or setup the property manually. For example like this:
<copyfiles files="${file.reference.evologger.jar}" todir="${build.web.dir}/WEB-INF/lib"/> <copyfiles files="${file.reference.evologger.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.poi-3.5-beta6-20090622.jar}" todir="${build.web.dir}/WEB-INF/lib"/> <copyfiles files="${file.reference.poi-3.5-beta6-20090622.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.poi-ooxml-3.5-beta6-20090622.jar}" todir="${build.web.dir}/WEB-INF/lib"/> <copyfiles files="${file.reference.poi-ooxml-3.5-beta6-20090622.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.commons-io-1.3.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.commons-logging-1.0.4.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.xalan-2.7.0.jar}" todir="${build.web.dir}/WEB-INF/lib"/> <copyfiles files="${file.reference.xalan-2.7.0.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.commons-io-1.4.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.commons-logging-1.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.log4j-1.2.15.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.xercesImpl-2.7.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/> <copyfiles files="${file.reference.xercesImpl-2.7.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.xml-apis-1.3.04.jar}" todir="${build.web.dir}/WEB-INF/lib"/> <copyfiles files="${file.reference.xml-apis-1.3.04.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.xml-apis-ext-1.3.04.jar}" todir="${build.web.dir}/WEB-INF/lib"/> <copyfiles files="${file.reference.xml-apis-ext-1.3.04.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.serializer-2.7.0.jar}" todir="${build.web.dir}/WEB-INF/lib"/> <copyfiles files="${file.reference.serializer-2.7.0.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.commons-collections-3.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.commons-lang-2.1.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${libs.jsf-runtime.classpath}" todir="${build.web.dir}/WEB-INF/lib"/> <copyfiles files="${libs.jsf-runtime.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${libs.jsfsupport-runtime.classpath}" todir="${build.web.dir}/WEB-INF/lib"/> <copyfiles files="${libs.jsfsupport-runtime.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${libs.webui-runtime.classpath}" todir="${build.web.dir}/WEB-INF/lib"/> <copyfiles files="${libs.webui-runtime.classpath}" todir="${build.web.dir}/WEB-INF/lib"/>

@ -1,8 +1,8 @@
build.xml.data.CRC32=5acb9ddc build.xml.data.CRC32=2069b7a3
build.xml.script.CRC32=97b5d0ef build.xml.script.CRC32=97b5d0ef
build.xml.stylesheet.CRC32=c0ebde35@1.15.2.1 build.xml.stylesheet.CRC32=c0ebde35@1.15.2.1
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # 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. # 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=5acb9ddc nbproject/build-impl.xml.data.CRC32=2069b7a3
nbproject/build-impl.xml.script.CRC32=edf16d0b nbproject/build-impl.xml.script.CRC32=4c16c504
nbproject/build-impl.xml.stylesheet.CRC32=8ab4467e@1.15.2.1 nbproject/build-impl.xml.stylesheet.CRC32=8ab4467e@1.15.2.1

@ -23,14 +23,17 @@ excludes=
file.reference.activation.jar=lib/activation.jar file.reference.activation.jar=lib/activation.jar
file.reference.avalon-framework-4.2.0.jar=lib/avalon-framework-4.2.0.jar file.reference.avalon-framework-4.2.0.jar=lib/avalon-framework-4.2.0.jar
file.reference.batik-all-1.7.jar=lib/batik-all-1.7.jar file.reference.batik-all-1.7.jar=lib/batik-all-1.7.jar
file.reference.commons-io-1.3.1.jar=lib/commons-io-1.3.1.jar file.reference.commons-collections-3.1.jar=lib/commons-collections-3.1.jar
file.reference.commons-logging-1.0.4.jar=lib/commons-logging-1.0.4.jar file.reference.commons-io-1.4.jar=lib/commons-io-1.4.jar
file.reference.commons-lang-2.1.jar=lib/commons-lang-2.1.jar
file.reference.commons-logging-1.1.jar=lib/commons-logging-1.1.jar
file.reference.evologger.jar=lib/evologger.jar file.reference.evologger.jar=lib/evologger.jar
file.reference.evolute.jar=lib/evolute.jar file.reference.evolute.jar=lib/evolute.jar
file.reference.fop.jar=lib/fop.jar file.reference.fop.jar=lib/fop.jar
file.reference.iText-2.0.8.jar=lib/iText-2.0.8.jar file.reference.iText-2.0.8.jar=lib/iText-2.0.8.jar
file.reference.jai_imageio.jar=lib/jai_imageio.jar file.reference.jai_imageio.jar=lib/jai_imageio.jar
file.reference.jdom.jar=lib/jdom.jar file.reference.jdom.jar=lib/jdom.jar
file.reference.log4j-1.2.15.jar=lib/log4j-1.2.15.jar
file.reference.mail.jar=lib/mail.jar file.reference.mail.jar=lib/mail.jar
file.reference.poi-3.5-beta6-20090622.jar=lib/poi-3.5-beta6-20090622.jar file.reference.poi-3.5-beta6-20090622.jar=lib/poi-3.5-beta6-20090622.jar
file.reference.poi-ooxml-3.5-beta6-20090622.jar=lib/poi-ooxml-3.5-beta6-20090622.jar file.reference.poi-ooxml-3.5-beta6-20090622.jar=lib/poi-ooxml-3.5-beta6-20090622.jar
@ -68,13 +71,16 @@ javac.classpath=\
${file.reference.evologger.jar}:\ ${file.reference.evologger.jar}:\
${file.reference.poi-3.5-beta6-20090622.jar}:\ ${file.reference.poi-3.5-beta6-20090622.jar}:\
${file.reference.poi-ooxml-3.5-beta6-20090622.jar}:\ ${file.reference.poi-ooxml-3.5-beta6-20090622.jar}:\
${file.reference.commons-io-1.3.1.jar}:\
${file.reference.commons-logging-1.0.4.jar}:\
${file.reference.xalan-2.7.0.jar}:\ ${file.reference.xalan-2.7.0.jar}:\
${file.reference.commons-io-1.4.jar}:\
${file.reference.commons-logging-1.1.jar}:\
${file.reference.log4j-1.2.15.jar}:\
${file.reference.xercesImpl-2.7.1.jar}:\ ${file.reference.xercesImpl-2.7.1.jar}:\
${file.reference.xml-apis-1.3.04.jar}:\ ${file.reference.xml-apis-1.3.04.jar}:\
${file.reference.xml-apis-ext-1.3.04.jar}:\ ${file.reference.xml-apis-ext-1.3.04.jar}:\
${file.reference.serializer-2.7.0.jar} ${file.reference.serializer-2.7.0.jar}:\
${file.reference.commons-collections-3.1.jar}:\
${file.reference.commons-lang-2.1.jar}
# Space-separated list of extra javac options # Space-separated list of extra javac options
javac.compilerargs= javac.compilerargs=
javac.debug=true javac.debug=true

@ -92,15 +92,19 @@
<path-in-war>WEB-INF/lib</path-in-war> <path-in-war>WEB-INF/lib</path-in-war>
</library> </library>
<library> <library>
<file>${file.reference.commons-io-1.3.1.jar}</file> <file>${file.reference.xalan-2.7.0.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war> <path-in-war>WEB-INF/lib</path-in-war>
</library> </library>
<library> <library>
<file>${file.reference.commons-logging-1.0.4.jar}</file> <file>${file.reference.commons-io-1.4.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war> <path-in-war>WEB-INF/lib</path-in-war>
</library> </library>
<library> <library>
<file>${file.reference.xalan-2.7.0.jar}</file> <file>${file.reference.commons-logging-1.1.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.log4j-1.2.15.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war> <path-in-war>WEB-INF/lib</path-in-war>
</library> </library>
<library> <library>
@ -119,6 +123,14 @@
<file>${file.reference.serializer-2.7.0.jar}</file> <file>${file.reference.serializer-2.7.0.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war> <path-in-war>WEB-INF/lib</path-in-war>
</library> </library>
<library>
<file>${file.reference.commons-collections-3.1.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
<library>
<file>${file.reference.commons-lang-2.1.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war>
</library>
</web-module-libraries> </web-module-libraries>
<web-module-additional-libraries> <web-module-additional-libraries>
<library> <library>

@ -7,6 +7,7 @@
package analiseacidentestrabalho; package analiseacidentestrabalho;
import beans.Utilizador; import beans.Utilizador;
import com.evolute.utils.error.ErrorLogger;
import com.sun.rave.web.ui.appbase.AbstractPageBean; import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.rave.web.ui.component.DropDown; import com.sun.rave.web.ui.component.DropDown;
import com.sun.rave.web.ui.component.StaticText; import com.sun.rave.web.ui.component.StaticText;
@ -217,7 +218,7 @@ public class Acesso extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
return "login"; return "login";
} }
@ -263,7 +264,7 @@ public class Acesso extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
return "gestor"; return "gestor";
} }
@ -304,7 +305,7 @@ public class Acesso extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
return null; return null;
@ -324,7 +325,7 @@ public class Acesso extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }

@ -16,6 +16,7 @@ import beans.Trabalhador;
import beans.Utilizador; import beans.Utilizador;
import beans.Acidentado; import beans.Acidentado;
import beans.AnaliseAcidente; import beans.AnaliseAcidente;
import com.evolute.utils.error.ErrorLogger;
import com.sun.data.provider.RowKey; import com.sun.data.provider.RowKey;
import com.sun.rave.web.ui.appbase.AbstractPageBean; import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.rave.web.ui.component.Body; import com.sun.rave.web.ui.component.Body;
@ -64,12 +65,6 @@ import javax.faces.component.html.HtmlPanelGrid;
import javax.faces.el.MethodBinding; import javax.faces.el.MethodBinding;
import javax.faces.event.ActionEvent; import javax.faces.event.ActionEvent;
import javax.faces.event.ValueChangeEvent; import javax.faces.event.ValueChangeEvent;
import javax.mail.Authenticator;
import javax.mail.BodyPart;
import javax.mail.Message;
import javax.mail.Multipart;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress; import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart; import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage; import javax.mail.internet.MimeMessage;
@ -6990,7 +6985,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
{ {
@ -6998,7 +6993,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
@ -7010,7 +7005,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
@ -7055,7 +7050,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
// { // {
// //lblActivos.setRendered(false); // //lblActivos.setRendered(false);
// table1.setRendered(false); // table1.setRendered(false);
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
// } // }
@ -7080,7 +7075,10 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_acidente().getTime()); java.util.Date ddate = new java.util.Date(a.getData_acidente().getTime());
stHeaderDate.setText(utils.Utils.dateToYYYYMMDD(ddate)); stHeaderDate.setText(utils.Utils.dateToYYYYMMDD(ddate));
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
AnalisesDataProvider adp = new AnalisesDataProvider(); AnalisesDataProvider adp = new AnalisesDataProvider();
try try
{ {
@ -7089,7 +7087,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
{ {
@ -7097,7 +7095,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
Acidentado ac = null; Acidentado ac = null;
@ -7111,7 +7109,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
@ -7522,7 +7520,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
{ {
@ -7532,7 +7530,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -7556,7 +7554,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
{ {
@ -7566,7 +7564,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -7589,12 +7587,18 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
{ {
cod_postal1 = a.getCod_postal().substring(0, 4); cod_postal1 = a.getCod_postal().substring(0, 4);
} }
catch(Exception ex){} catch(Exception ex)
{
ErrorLogger.logException( ex );
}
try try
{ {
cod_postal2 = a.getCod_postal().substring(5, 8); cod_postal2 = a.getCod_postal().substring(5, 8);
} }
catch(Exception ex){} catch(Exception ex)
{
ErrorLogger.logException( ex );
}
txtCodPostal1.setText(cod_postal1); txtCodPostal1.setText(cod_postal1);
@ -7606,7 +7610,10 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_admissao().getTime()); java.util.Date ddate = new java.util.Date(a.getData_admissao().getTime());
stDataAdmissao.setText(utils.Utils.dateToYYYYMMDD(ddate)); stDataAdmissao.setText(utils.Utils.dateToYYYYMMDD(ddate));
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
stFuncao.setText(a.getFuncao()); stFuncao.setText(a.getFuncao());
rbTurnoManha.setSelected(null); rbTurnoManha.setSelected(null);
@ -7640,7 +7647,10 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_nascimento().getTime()); java.util.Date ddate = new java.util.Date(a.getData_nascimento().getTime());
stDataNascimento.setText(utils.Utils.dateToYYYYMMDD(ddate)); stDataNascimento.setText(utils.Utils.dateToYYYYMMDD(ddate));
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
stBI.setText(a.getBilhete_identidade()); stBI.setText(a.getBilhete_identidade());
stMorada.setText(a.getMorada()); stMorada.setText(a.getMorada());
String cod_postal1 = ""; String cod_postal1 = "";
@ -7677,7 +7687,10 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_admissao().getTime()); java.util.Date ddate = new java.util.Date(a.getData_admissao().getTime());
stDataAdmissao1.setText(utils.Utils.dateToYYYYMMDD(ddate)); stDataAdmissao1.setText(utils.Utils.dateToYYYYMMDD(ddate));
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
stFuncao1.setText(a.getFuncao()); stFuncao1.setText(a.getFuncao());
String turno_str = ""; String turno_str = "";
if(a.getTurno() != null) if(a.getTurno() != null)
@ -7739,7 +7752,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
if(a.getHoras_turno() != null) if(a.getHoras_turno() != null)
@ -7766,7 +7779,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
txtLocal.setText(a.getLocal_trabalho()); txtLocal.setText(a.getLocal_trabalho());
@ -7853,7 +7866,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -7874,7 +7887,10 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_acidente().getTime()); java.util.Date ddate = new java.util.Date(a.getData_acidente().getTime());
stDataAcidente1.setText(utils.Utils.dateToYYYYMMDD(ddate)); stDataAcidente1.setText(utils.Utils.dateToYYYYMMDD(ddate));
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
} }
if(a.getHora_acidente() == null) if(a.getHora_acidente() == null)
@ -7895,7 +7911,10 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
{ {
stHoraAcidente1.setText(utils.Utils.timeToHHMM(hour + ":" + minutes)); stHoraAcidente1.setText(utils.Utils.timeToHHMM(hour + ":" + minutes));
} }
catch(Exception ex){} catch(Exception ex)
{
ErrorLogger.logException( ex );
}
} }
boolean booTurnoSeccaoLocal = false; boolean booTurnoSeccaoLocal = false;
@ -7938,7 +7957,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
lblSeccao.setRendered(false); lblSeccao.setRendered(false);
txtSeccao1.setRendered(false); txtSeccao1.setRendered(false);
} }
@ -8060,7 +8079,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
gridCausas.setRendered(false); gridCausas.setRendered(false);
} }
@ -8203,7 +8222,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -8233,7 +8252,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
{ {
@ -8241,7 +8260,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
{ {
@ -8249,7 +8268,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
{ {
@ -8257,7 +8276,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
{ {
@ -8265,7 +8284,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
else if(a.getOutros_acidentes_com_colaborador().matches("n")) else if(a.getOutros_acidentes_com_colaborador().matches("n"))
@ -8287,7 +8306,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
@ -8296,7 +8315,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
@ -8305,7 +8324,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
@ -8314,7 +8333,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
@ -8323,7 +8342,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
else if( a.getAcidentes_outros_colaboradores().matches("n") ) else if( a.getAcidentes_outros_colaboradores().matches("n") )
@ -8653,7 +8672,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -8692,7 +8711,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -8748,7 +8767,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -8787,7 +8806,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -9334,7 +9353,10 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_aval_incapacidade().getTime()); java.util.Date ddate = new java.util.Date(a.getData_aval_incapacidade().getTime());
st.setText(utils.Utils.dateToYYYYMMDD(ddate)); st.setText(utils.Utils.dateToYYYYMMDD(ddate));
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
pg.getChildren().add(st); pg.getChildren().add(st);
} }
@ -9355,7 +9377,10 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_rev_incapacidade().getTime()); java.util.Date ddate = new java.util.Date(a.getData_rev_incapacidade().getTime());
st.setText(utils.Utils.dateToYYYYMMDD(ddate)); st.setText(utils.Utils.dateToYYYYMMDD(ddate));
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
pg.getChildren().add(st); pg.getChildren().add(st);
} }
@ -9386,7 +9411,10 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getPeriodo_incapacidade_de().getTime()); java.util.Date ddate = new java.util.Date(a.getPeriodo_incapacidade_de().getTime());
st.setText(utils.Utils.dateToYYYYMMDD(ddate)); st.setText(utils.Utils.dateToYYYYMMDD(ddate));
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
pg.getChildren().add(st); pg.getChildren().add(st);
st = new StaticText(); st = new StaticText();
st.setId("stPeriodoIncapacidadeLbl2"); st.setId("stPeriodoIncapacidadeLbl2");
@ -9402,7 +9430,10 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getPeriodo_incapacidade_a().getTime()); java.util.Date ddate = new java.util.Date(a.getPeriodo_incapacidade_a().getTime());
st.setText(utils.Utils.dateToYYYYMMDD(ddate)); st.setText(utils.Utils.dateToYYYYMMDD(ddate));
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
pg.getChildren().add(st); pg.getChildren().add(st);
} }
@ -10037,7 +10068,10 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_inicio_processo().getTime()); java.util.Date ddate = new java.util.Date(a.getData_inicio_processo().getTime());
txtVer += utils.Utils.dateToYYYYMMDD(ddate) + "."; txtVer += utils.Utils.dateToYYYYMMDD(ddate) + ".";
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
st.setText(txtVer); st.setText(txtVer);
gridAssinaturasView.getChildren().add(st); gridAssinaturasView.getChildren().add(st);
} }
@ -10055,7 +10089,10 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_consolidacao().getTime()); java.util.Date ddate = new java.util.Date(a.getData_consolidacao().getTime());
txtVer += utils.Utils.dateToYYYYMMDD(ddate) + "."; txtVer += utils.Utils.dateToYYYYMMDD(ddate) + ".";
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
st.setText(txtVer); st.setText(txtVer);
gridAssinaturasView.getChildren().add(st); gridAssinaturasView.getChildren().add(st);
} }
@ -10072,7 +10109,10 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_assinatura_seg().getTime()); java.util.Date ddate = new java.util.Date(a.getData_assinatura_seg().getTime());
txtVer += utils.Utils.dateToYYYYMMDD(ddate) + "."; txtVer += utils.Utils.dateToYYYYMMDD(ddate) + ".";
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
st.setText(txtVer); st.setText(txtVer);
gridAssinaturasView.getChildren().add(st); gridAssinaturasView.getChildren().add(st);
} }
@ -10089,7 +10129,10 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_assinatura_rh().getTime()); java.util.Date ddate = new java.util.Date(a.getData_assinatura_rh().getTime());
txtVer += utils.Utils.dateToYYYYMMDD(ddate) + "."; txtVer += utils.Utils.dateToYYYYMMDD(ddate) + ".";
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
st.setText(txtVer); st.setText(txtVer);
gridAssinaturasView.getChildren().add(st); gridAssinaturasView.getChildren().add(st);
} }
@ -10116,7 +10159,10 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(ac.getData_email_superior_hierarquico().getTime()); java.util.Date ddate = new java.util.Date(ac.getData_email_superior_hierarquico().getTime());
txtVer += " a " + utils.Utils.dateToYYYYMMDD(ddate); txtVer += " a " + utils.Utils.dateToYYYYMMDD(ddate);
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
} }
} }
txtVer += "."; txtVer += ".";
@ -10127,7 +10173,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
HtmlPanelGrid grid = new HtmlPanelGrid(); HtmlPanelGrid grid = new HtmlPanelGrid();
@ -10190,7 +10236,10 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_assinatura_superior().getTime()); java.util.Date ddate = new java.util.Date(a.getData_assinatura_superior().getTime());
stData += utils.Utils.dateToYYYYMMDD(ddate); stData += utils.Utils.dateToYYYYMMDD(ddate);
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
stAssSup2.setText(txt + nome_acidentado + ", a " + stData); stAssSup2.setText(txt + nome_acidentado + ", a " + stData);
} }
@ -10207,7 +10256,10 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_assinatura_superior().getTime()); java.util.Date ddate = new java.util.Date(a.getData_assinatura_superior().getTime());
stData += utils.Utils.dateToYYYYMMDD(ddate); stData += utils.Utils.dateToYYYYMMDD(ddate);
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
String txt = "Assinado na Ficha de An&aacute;lise de Acidente em papel por " + a.getNome_superior() + ", superior hier&aacute;rquico / superior de "; String txt = "Assinado na Ficha de An&aacute;lise de Acidente em papel por " + a.getNome_superior() + ", superior hier&aacute;rquico / superior de ";
txt += getSessionBean1().getAcidentado().getNome() + ", a " + stData; txt += getSessionBean1().getAcidentado().getNome() + ", a " + stData;
@ -10301,7 +10353,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -10391,7 +10443,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
{ {
getSessionBean1().setMsg("Erro na inser&ccedil;&atilde;o da an&aacute;lise !"); getSessionBean1().setMsg("Erro na inser&ccedil;&atilde;o da an&aacute;lise !");
getSessionBean1().setGravado(false); getSessionBean1().setGravado(false);
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -10473,7 +10525,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
{ {
getSessionBean1().setMsg("Erro na actualiza&ccedil;&atilde;o da an&aacute;lise !"); getSessionBean1().setMsg("Erro na actualiza&ccedil;&atilde;o da an&aacute;lise !");
getSessionBean1().setGravado(false); getSessionBean1().setGravado(false);
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
} }
@ -10533,7 +10585,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
{ {
getSessionBean1().setMsg("Erro no envio da an&aacute;lise !"); getSessionBean1().setMsg("Erro no envio da an&aacute;lise !");
getSessionBean1().setSubmetido(false); getSessionBean1().setSubmetido(false);
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
else else
@ -10646,7 +10698,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
{ {
getSessionBean1().setMsg("Erro na actualiza&ccedil;&atilde;o da an&aacute;lise !"); getSessionBean1().setMsg("Erro na actualiza&ccedil;&atilde;o da an&aacute;lise !");
getSessionBean1().setSubmetido(false); getSessionBean1().setSubmetido(false);
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
else else
@ -10686,7 +10738,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
ListIterator iter = recs.listIterator(); ListIterator iter = recs.listIterator();
while(iter.hasNext()) while(iter.hasNext())
@ -10704,7 +10756,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
ListIterator iter = meds.listIterator(); ListIterator iter = meds.listIterator();
while(iter.hasNext()) while(iter.hasNext())
@ -10902,10 +10954,8 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
a.setAveriguador((String) txtAveriguador.getText()); a.setAveriguador((String) txtAveriguador.getText());
} }
java.util.Date today = java.util.Date today = new java.util.Date();
new java.util.Date(); java.sql.Date sqlToday = new java.sql.Date(today.getTime());
java.sql.Date sqlToday =
new java.sql.Date(today.getTime());
//if(a.getData_acidente() == null) //if(a.getData_acidente() == null)
//{ //{
// a.setData_acidente(sqlToday); // a.setData_acidente(sqlToday);
@ -10923,7 +10973,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
a.setData_acidente(null); a.setData_acidente(null);
} }
//} //}
@ -10953,7 +11003,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -10986,7 +11036,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
a.setHoras_turno(horas_turno); a.setHoras_turno(horas_turno);
@ -11003,7 +11053,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
a.setDepartamento_id(( Integer ) drpDepartamento.getSelected()); a.setDepartamento_id(( Integer ) drpDepartamento.getSelected());
@ -11022,7 +11072,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
@ -11038,7 +11088,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
@ -11054,7 +11104,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
// try // try
@ -11070,7 +11120,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
try try
@ -11086,7 +11136,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
@ -11102,7 +11152,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
// try // try
@ -11118,7 +11168,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
a.setCausas((Integer) drpCausas.getSelected()); a.setCausas((Integer) drpCausas.getSelected());
@ -11136,7 +11186,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
@ -11152,7 +11202,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
@ -11168,7 +11218,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
a.setAveriguacao_posterior("n"); a.setAveriguacao_posterior("n");
@ -11246,7 +11296,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
} }
@ -11263,7 +11313,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
} }
@ -11279,7 +11329,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
} }
@ -11295,7 +11345,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
} }
@ -11311,7 +11361,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
} }
@ -11354,7 +11404,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
} }
@ -11371,7 +11421,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
} }
@ -11387,7 +11437,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
} }
@ -11403,7 +11453,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
} }
@ -11419,7 +11469,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
} }
@ -11623,7 +11673,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -11950,10 +12000,8 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
{ {
String nome_resp_consolidacao = getSessionBean1().getCurrentUser().getNome(); String nome_resp_consolidacao = getSessionBean1().getCurrentUser().getNome();
a.setNome_resp_consolidacao(nome_resp_consolidacao); a.setNome_resp_consolidacao(nome_resp_consolidacao);
java.util.Date today = java.util.Date today = new java.util.Date();
new java.util.Date(); java.sql.Date sqlToday = new java.sql.Date(today.getTime());
java.sql.Date sqlToday =
new java.sql.Date(today.getTime());
a.setData_consolidacao(sqlToday); a.setData_consolidacao(sqlToday);
a.setAss_consolidacao("y"); a.setAss_consolidacao("y");
return a; return a;
@ -12014,7 +12062,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
meta = null; meta = null;
meta_ac = null; meta_ac = null;
} }
@ -13218,7 +13266,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -13263,7 +13311,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -13546,7 +13594,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
stBI.setText(a.getBi()); stBI.setText(a.getBi());
@ -13665,7 +13713,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -13821,7 +13869,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -13852,7 +13900,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -13952,7 +14000,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
// //
// } // }
@ -13971,7 +14019,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
// } // }
// //
@ -14033,7 +14081,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
// //
// break; // break;
@ -14052,7 +14100,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
// break; // break;
// } // }
@ -14123,7 +14171,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex1) catch(Exception ex1)
{ {
ex1.printStackTrace(); ErrorLogger.logException( ex1 );
System.out.println("MAIL ERROR : " + ex1.getMessage()); System.out.println("MAIL ERROR : " + ex1.getMessage());
} }
@ -14131,7 +14179,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -14147,7 +14195,10 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_acidente().getTime()); java.util.Date ddate = new java.util.Date(a.getData_acidente().getTime());
data_acidente = utils.Utils.dateToYYYYMMDD(ddate); data_acidente = utils.Utils.dateToYYYYMMDD(ddate);
} }
catch(Exception ex){} catch(Exception ex)
{
ErrorLogger.logException( ex );
}
String texto_email = "<p style='text-align: justify; font-family: arial, sans-serif'>Caro(a) Colega,</p>"; String texto_email = "<p style='text-align: justify; font-family: arial, sans-serif'>Caro(a) Colega,</p>";
texto_email += "<p style='text-align: justify; font-family: arial, sans-serif'>Na sequ&ecirc;ncia do acidente de trabalho do colaborador "; texto_email += "<p style='text-align: justify; font-family: arial, sans-serif'>Na sequ&ecirc;ncia do acidente de trabalho do colaborador ";
@ -14162,7 +14213,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -14191,7 +14242,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
} }
@ -14220,13 +14271,13 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
System.out.println("EMAIL FASE 4 ERROR : " + ex.getMessage()); System.out.println("EMAIL FASE 4 ERROR : " + ex.getMessage());
} }
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -14264,7 +14315,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
//// catch (Exception ex) //// catch (Exception ex)
//// { //// {
//// System.out.println("MAIL ERROR : " + ex.getMessage()); //// System.out.println("MAIL ERROR : " + ex.getMessage());
//// ex.printStackTrace(); //// ErrorLogger.logException( ex );
//// } //// }
// //
// } // }
@ -14516,7 +14567,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
catch(Exception ex) catch(Exception ex)
{ {
getSessionBean1().setMsg("Erro na actualiza&ccedil;&atilde;o da an&aacute;lise !"); getSessionBean1().setMsg("Erro na actualiza&ccedil;&atilde;o da an&aacute;lise !");
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -14568,7 +14619,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
return null; return null;
} }
@ -14657,7 +14708,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
txtTrabalhador.setText(""); txtTrabalhador.setText("");
gridSiprp.setRendered(false); gridSiprp.setRendered(false);
gridDadosAcidenteSeg.setRendered(false); gridDadosAcidenteSeg.setRendered(false);
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
return null; return null;
@ -14808,7 +14859,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
hidAnchor.setValue("dados"); hidAnchor.setValue("dados");
} }
@ -14827,7 +14878,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
getSessionBean1().setIeBug(true); getSessionBean1().setIeBug(true);
return null; return null;
@ -14863,7 +14914,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
return false; return false;
} }
return true; return true;
@ -14900,7 +14951,7 @@ public class AnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
return false; return false;
} }

@ -7,6 +7,7 @@
package analiseacidentestrabalho; package analiseacidentestrabalho;
import beans.Correcao; import beans.Correcao;
import com.evolute.utils.error.ErrorLogger;
import com.sun.data.provider.RowKey; import com.sun.data.provider.RowKey;
import com.sun.rave.web.ui.appbase.AbstractPageBean; import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.rave.web.ui.component.Body; import com.sun.rave.web.ui.component.Body;
@ -31,7 +32,6 @@ import java.util.ArrayList;
import javax.faces.FacesException; import javax.faces.FacesException;
import javax.faces.component.html.HtmlPanelGrid; import javax.faces.component.html.HtmlPanelGrid;
import javax.faces.event.ValueChangeEvent; import javax.faces.event.ValueChangeEvent;
import javax.servlet.ServletContext;
/** /**
* <p>Page bean that corresponds to a similarly named JSP page. This * <p>Page bean that corresponds to a similarly named JSP page. This
@ -678,7 +678,7 @@ public class EnviarCorrecao extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
// return "form_hs"; // return "form_hs";
return null; return null;
@ -712,7 +712,7 @@ public class EnviarCorrecao extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
return null; return null;
} }
@ -738,7 +738,7 @@ public class EnviarCorrecao extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
return "form_hs"; return "form_hs";
} }

@ -8,6 +8,7 @@ package analiseacidentestrabalho;
import beans.Permissao; import beans.Permissao;
import beans.Utilizador; import beans.Utilizador;
import com.evolute.utils.error.ErrorLogger;
import com.sun.rave.web.ui.appbase.AbstractPageBean; import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.rave.web.ui.component.Body; import com.sun.rave.web.ui.component.Body;
import com.sun.rave.web.ui.component.Button; import com.sun.rave.web.ui.component.Button;
@ -730,12 +731,12 @@ public class FichaUtilizador extends AbstractPageBean {
} }
catch(Exception ex1) catch(Exception ex1)
{ {
ex1.printStackTrace(); ErrorLogger.logException( ex1 );
} }
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -783,7 +784,7 @@ public class FichaUtilizador extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
@ -794,7 +795,7 @@ public class FichaUtilizador extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -812,7 +813,7 @@ public class FichaUtilizador extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
getSessionBean1().setMsg("Erro na elimina&ccedil;&atilde;o do utilizador!"); getSessionBean1().setMsg("Erro na elimina&ccedil;&atilde;o do utilizador!");
} }
@ -824,7 +825,7 @@ public class FichaUtilizador extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
} }
@ -986,9 +987,14 @@ public class FichaUtilizador extends AbstractPageBean {
} }
catch(Exception ex){} catch(Exception ex){}
try { try
getExternalContext().redirect("Login.jsp"); {
} catch(Exception e) {} getExternalContext().redirect("Login.jsp");
}
catch ( Exception e )
{
ErrorLogger.logException( e );
}
//return "login"; //return "login";
return null; return null;
} }
@ -1017,7 +1023,7 @@ public class FichaUtilizador extends AbstractPageBean {
catch(Exception ex) catch(Exception ex)
{ {
getSessionBean1().setMsg("Erro na cria&ccedil;&atilde;o do utilizador!"); getSessionBean1().setMsg("Erro na cria&ccedil;&atilde;o do utilizador!");
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
else //edit else //edit
@ -1031,7 +1037,7 @@ public class FichaUtilizador extends AbstractPageBean {
catch(Exception ex) catch(Exception ex)
{ {
getSessionBean1().setMsg("Erro na actualiza&ccedil;&atilde;o do utilizador"); getSessionBean1().setMsg("Erro na actualiza&ccedil;&atilde;o do utilizador");
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -1062,7 +1068,7 @@ public class FichaUtilizador extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
if(tipo.intValue() == SEG || tipo.intValue() == RH || tipo.intValue() == GESTOR || tipo.intValue() == DIRECTOR_RH || tipo.intValue() == DIRECTOR_SIPRP) if(tipo.intValue() == SEG || tipo.intValue() == RH || tipo.intValue() == GESTOR || tipo.intValue() == DIRECTOR_RH || tipo.intValue() == DIRECTOR_SIPRP)
{ {
@ -1090,7 +1096,7 @@ public class FichaUtilizador extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
else // medicos else // medicos
@ -1106,7 +1112,7 @@ public class FichaUtilizador extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
} }
@ -1255,7 +1261,7 @@ public class FichaUtilizador extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
} }
@ -1316,7 +1322,7 @@ public class FichaUtilizador extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
drpNome.setSelected(u.getFuncionario_hst_id()); drpNome.setSelected(u.getFuncionario_hst_id());
drpNome.setStyleClass("show"); drpNome.setStyleClass("show");
@ -1347,7 +1353,7 @@ public class FichaUtilizador extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
drpNome.setSelected(u.getMedico_id()); drpNome.setSelected(u.getMedico_id());
txtNome.setStyleClass("hide"); txtNome.setStyleClass("hide");
@ -1380,10 +1386,8 @@ public class FichaUtilizador extends AbstractPageBean {
// u.setLogin( (String) txtLogin.getText() ); // u.setLogin( (String) txtLogin.getText() );
String password = (String) txtPassword.getText(); String password = (String) txtPassword.getText();
u.setPassword( password ); u.setPassword( password );
java.util.Date today = java.util.Date today = new java.util.Date();
new java.util.Date(); java.sql.Date sqlToday = new java.sql.Date(today.getTime());
java.sql.Date sqlToday =
new java.sql.Date(today.getTime());
u.setData_password(sqlToday); u.setData_password(sqlToday);
@ -1410,7 +1414,7 @@ public class FichaUtilizador extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
// u.setCap( (String) txtCap.getText()); // u.setCap( (String) txtCap.getText());
// } // }
@ -1424,7 +1428,7 @@ public class FichaUtilizador extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
// u.setNumero_cedula( (String) stCedula.getText()); // u.setNumero_cedula( (String) stCedula.getText());
// } // }
@ -1560,9 +1564,7 @@ public class FichaUtilizador extends AbstractPageBean {
getSessionBean1().setNavFrom("FormDirSiprp"); getSessionBean1().setNavFrom("FormDirSiprp");
} }
return "gestao_utilizadores"; return "gestao_utilizadores";
} }
public String lnkAjuda_action() { public String lnkAjuda_action() {
@ -1579,7 +1581,7 @@ public class FichaUtilizador extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
return null; return null;
} }

@ -8,6 +8,7 @@ package analiseacidentestrabalho;
import beans.Utilizador; import beans.Utilizador;
import beans.AnaliseAcidente; import beans.AnaliseAcidente;
import com.evolute.utils.error.ErrorLogger;
import com.sun.data.provider.RowKey; import com.sun.data.provider.RowKey;
import com.sun.rave.web.ui.appbase.AbstractPageBean; import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.rave.web.ui.component.Body; import com.sun.rave.web.ui.component.Body;
@ -1016,7 +1017,7 @@ public class FormDirGerRh extends AbstractPageBean {
{ {
//lblActivos.setRendered(false); //lblActivos.setRendered(false);
table1.setRendered(false); table1.setRendered(false);
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
@ -1031,7 +1032,7 @@ public class FormDirGerRh extends AbstractPageBean {
{ {
//lblActivos.setRendered(false); //lblActivos.setRendered(false);
table2.setRendered(false); table2.setRendered(false);
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
fillAnoDropDown(); fillAnoDropDown();
} }
@ -1098,11 +1099,19 @@ public class FormDirGerRh extends AbstractPageBean {
(javax.servlet.http.HttpSession) getExternalContext().getSession(true); (javax.servlet.http.HttpSession) getExternalContext().getSession(true);
session.invalidate(); session.invalidate();
} }
catch(Exception ex){} catch(Exception ex)
{
ErrorLogger.logException( ex );
}
try { try
getExternalContext().redirect("Login.jsp"); {
} catch(Exception e) {} getExternalContext().redirect("Login.jsp");
}
catch(Exception e)
{
ErrorLogger.logException( e );
}
//return "login"; //return "login";
return null; return null;
} }
@ -1238,7 +1247,7 @@ public class FormDirGerRh extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
Integer ano = null; Integer ano = null;
@ -1300,16 +1309,14 @@ public class FormDirGerRh extends AbstractPageBean {
table2.setRendered(true); table2.setRendered(true);
txtSearchMsg.setRendered(false); txtSearchMsg.setRendered(false);
getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList);
} }
catch(Exception ex) catch(Exception ex)
{ {
table2.setRendered(false); table2.setRendered(false);
txtSearchMsg.setRendered(true); txtSearchMsg.setRendered(true);
txtSearchMsg.setText("N&atilde;o foram encontrados registos para a sua pesquisa !"); txtSearchMsg.setText("N&atilde;o foram encontrados registos para a sua pesquisa !");
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
return null; return null;
@ -1424,7 +1431,7 @@ public class FormDirGerRh extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -1471,7 +1478,7 @@ public class FormDirGerRh extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
return null; return null;
} }
@ -1491,7 +1498,7 @@ public class FormDirGerRh extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// // ErrorLogger.logException( ex );
// } // }
return null; return null;
} }
@ -1549,6 +1556,7 @@ public class FormDirGerRh extends AbstractPageBean {
table1.setRendered( false ); table1.setRendered( false );
txtSearchMsg.setRendered( true ); txtSearchMsg.setRendered( true );
txtSearchMsg.setText( "N&atilde;o foram encontrados registos para a sua pesquisa !" ); txtSearchMsg.setText( "N&atilde;o foram encontrados registos para a sua pesquisa !" );
ErrorLogger.logException( e );
} }
return null; return null;

@ -8,6 +8,7 @@ package analiseacidentestrabalho;
import beans.Utilizador; import beans.Utilizador;
import beans.AnaliseAcidente; import beans.AnaliseAcidente;
import com.evolute.utils.error.ErrorLogger;
import com.sun.data.provider.RowKey; import com.sun.data.provider.RowKey;
import com.sun.rave.web.ui.appbase.AbstractPageBean; import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.rave.web.ui.component.Body; import com.sun.rave.web.ui.component.Body;
@ -1037,7 +1038,7 @@ public class FormDirSiprp extends AbstractPageBean {
{ {
//lblActivos.setRendered(false); //lblActivos.setRendered(false);
table2.setRendered( false ); table2.setRendered( false );
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
@ -1052,7 +1053,7 @@ public class FormDirSiprp extends AbstractPageBean {
{ {
//lblActivos.setRendered(false); //lblActivos.setRendered(false);
table3.setRendered(false); table3.setRendered(false);
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
fillAnoDropDown(); fillAnoDropDown();
} }
@ -1109,11 +1110,19 @@ public class FormDirSiprp extends AbstractPageBean {
(javax.servlet.http.HttpSession) getExternalContext().getSession(true); (javax.servlet.http.HttpSession) getExternalContext().getSession(true);
session.invalidate(); session.invalidate();
} }
catch(Exception ex){} catch(Exception ex)
{
ErrorLogger.logException( ex );
}
try { try
getExternalContext().redirect("Login.jsp"); {
} catch(Exception e) {} getExternalContext().redirect("Login.jsp");
}
catch(Exception e)
{
ErrorLogger.logException( e );
}
//return "login"; //return "login";
return null; return null;
} }
@ -1276,7 +1285,7 @@ public class FormDirSiprp extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
Integer ano = null; Integer ano = null;
@ -1347,7 +1356,7 @@ public class FormDirSiprp extends AbstractPageBean {
table3.setRendered(false); table3.setRendered(false);
txtSearchMsg.setRendered(true); txtSearchMsg.setRendered(true);
txtSearchMsg.setText("N&atilde;o foram encontrados registos para a sua pesquisa !"); txtSearchMsg.setText("N&atilde;o foram encontrados registos para a sua pesquisa !");
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
return null; return null;
@ -1455,7 +1464,7 @@ public class FormDirSiprp extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -1502,7 +1511,7 @@ public class FormDirSiprp extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
return null; return null;
} }
@ -1527,7 +1536,7 @@ public class FormDirSiprp extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// // ErrorLogger.logException( ex );
// } // }
return null; return null;
} }
@ -1586,6 +1595,7 @@ public class FormDirSiprp extends AbstractPageBean {
table2.setRendered( false ); table2.setRendered( false );
txtSearchMsg.setRendered( true ); txtSearchMsg.setRendered( true );
txtSearchMsg.setText( "N&atilde;o foram encontrados registos para a sua pesquisa !" ); txtSearchMsg.setText( "N&atilde;o foram encontrados registos para a sua pesquisa !" );
ErrorLogger.logException( e );
} }
return null; return null;

@ -8,6 +8,7 @@ package analiseacidentestrabalho;
import beans.Utilizador; import beans.Utilizador;
import beans.AnaliseAcidente; import beans.AnaliseAcidente;
import com.evolute.utils.error.ErrorLogger;
import com.sun.data.provider.RowKey; import com.sun.data.provider.RowKey;
import com.sun.rave.web.ui.appbase.AbstractPageBean; import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.rave.web.ui.component.Body; import com.sun.rave.web.ui.component.Body;
@ -1056,7 +1057,7 @@ public class FormGestor extends AbstractPageBean {
{ {
//lblActivos.setRendered(false); //lblActivos.setRendered(false);
table1.setRendered(false); table1.setRendered(false);
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
@ -1079,7 +1080,7 @@ public class FormGestor extends AbstractPageBean {
{ {
//lblActivos.setRendered(false); //lblActivos.setRendered(false);
table2.setRendered(false); table2.setRendered(false);
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
fillAnoDropDown(); fillAnoDropDown();
} }
@ -1133,7 +1134,7 @@ public class FormGestor extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// // ErrorLogger.logException( ex );
// } // }
return null; return null;
} }
@ -1166,11 +1167,19 @@ public class FormGestor extends AbstractPageBean {
(javax.servlet.http.HttpSession) getExternalContext().getSession(true); (javax.servlet.http.HttpSession) getExternalContext().getSession(true);
session.invalidate(); session.invalidate();
} }
catch(Exception ex){} catch(Exception ex)
{
ErrorLogger.logException( ex );
}
try { try
getExternalContext().redirect("Login.jsp"); {
} catch(Exception e) {} getExternalContext().redirect("Login.jsp");
}
catch(Exception e)
{
ErrorLogger.logException( e );
}
//return "login"; //return "login";
return null; return null;
} }
@ -1308,7 +1317,7 @@ public class FormGestor extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
Integer ano = null; Integer ano = null;
@ -1363,7 +1372,6 @@ public class FormGestor extends AbstractPageBean {
AnalisesDataProvider adp = new AnalisesDataProvider(); AnalisesDataProvider adp = new AnalisesDataProvider();
try try
{ {
//getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList()); //getSessionBean1().getAnalisesConcluidasDataProvider().setList(new ArrayList());
ArrayList concluidasList = null; ArrayList concluidasList = null;
if ( getSessionBean1().getCurrentUser().getGestor_geral().matches( "y" ) ) if ( getSessionBean1().getCurrentUser().getGestor_geral().matches( "y" ) )
@ -1378,19 +1386,16 @@ public class FormGestor extends AbstractPageBean {
ano, mes, dia, por, nome, null ); ano, mes, dia, por, nome, null );
} }
table2.setRendered(true); table2.setRendered(true);
txtSearchMsg.setRendered(false); txtSearchMsg.setRendered(false);
getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList);
} }
catch(Exception ex) catch(Exception ex)
{ {
table2.setRendered(false); table2.setRendered(false);
txtSearchMsg.setRendered(true); txtSearchMsg.setRendered(true);
txtSearchMsg.setText("N&atilde;o foram encontrados registos para a sua pesquisa !"); txtSearchMsg.setText("N&atilde;o foram encontrados registos para a sua pesquisa !");
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
return null; return null;
@ -1496,7 +1501,7 @@ public class FormGestor extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -1543,7 +1548,7 @@ public class FormGestor extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
return null; return null;
} }
@ -1630,6 +1635,7 @@ public class FormGestor extends AbstractPageBean {
table1.setRendered( false ); table1.setRendered( false );
txtSearchMsg.setRendered( true ); txtSearchMsg.setRendered( true );
txtSearchMsg.setText( "N&atilde;o foram encontrados registos para a sua pesquisa !" ); txtSearchMsg.setText( "N&atilde;o foram encontrados registos para a sua pesquisa !" );
ErrorLogger.logException( e );
} }
return null; return null;

@ -8,6 +8,7 @@ package analiseacidentestrabalho;
import beans.Utilizador; import beans.Utilizador;
import beans.AnaliseAcidente; import beans.AnaliseAcidente;
import com.evolute.utils.error.ErrorLogger;
import com.sun.data.provider.RowKey; import com.sun.data.provider.RowKey;
import com.sun.rave.web.ui.appbase.AbstractPageBean; import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.rave.web.ui.component.Body; import com.sun.rave.web.ui.component.Body;
@ -1336,7 +1337,7 @@ public class FormHS extends AbstractPageBean {
{ {
//lblActivos.setRendered(false); //lblActivos.setRendered(false);
table1.setRendered(false); table1.setRendered(false);
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
@ -1351,7 +1352,7 @@ public class FormHS extends AbstractPageBean {
{ {
//lblActivos.setRendered(false); //lblActivos.setRendered(false);
table2.setRendered(false); table2.setRendered(false);
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
@ -1367,8 +1368,8 @@ public class FormHS extends AbstractPageBean {
{ {
//lblActivos.setRendered(false); //lblActivos.setRendered(false);
table3.setRendered(false); table3.setRendered(false);
ex.printStackTrace(); ErrorLogger.logException( ex );
System.out.println("ERRRRRROR : " + ex.getMessage()); // System.out.println("ERRRRRROR : " + ex.getMessage());
} }
fillAnoDropDown(); fillAnoDropDown();
} }
@ -1418,11 +1419,19 @@ public class FormHS extends AbstractPageBean {
(javax.servlet.http.HttpSession) getExternalContext().getSession(true); (javax.servlet.http.HttpSession) getExternalContext().getSession(true);
session.invalidate(); session.invalidate();
} }
catch(Exception ex){} catch(Exception ex)
{
ErrorLogger.logException( ex );
}
try { try
getExternalContext().redirect("Login.jsp"); {
} catch(Exception e) {} getExternalContext().redirect("Login.jsp");
}
catch(Exception e)
{
ErrorLogger.logException( e );
}
//return "login"; //return "login";
return null; return null;
} }
@ -1583,7 +1592,7 @@ public class FormHS extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
Integer ano = null; Integer ano = null;
@ -1646,16 +1655,14 @@ public class FormHS extends AbstractPageBean {
table3.setRendered(true); table3.setRendered(true);
txtSearchMsg.setRendered(false); txtSearchMsg.setRendered(false);
getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList);
} }
catch(Exception ex) catch(Exception ex)
{ {
table3.setRendered(false); table3.setRendered(false);
txtSearchMsg.setRendered(true); txtSearchMsg.setRendered(true);
txtSearchMsg.setText("N&atilde;o foram encontrados registos para a sua pesquisa !"); txtSearchMsg.setText("N&atilde;o foram encontrados registos para a sua pesquisa !");
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
return null; return null;
@ -1697,7 +1704,7 @@ public class FormHS extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -1914,7 +1921,7 @@ public class FormHS extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
return null; return null;
} }
@ -1939,7 +1946,7 @@ public class FormHS extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// // ErrorLogger.logException( ex );
// } // }
return null; return null;
} }
@ -2001,6 +2008,7 @@ public class FormHS extends AbstractPageBean {
table1.setRendered( false ); table1.setRendered( false );
txtSearchMsg.setRendered( true ); txtSearchMsg.setRendered( true );
txtSearchMsg.setText( "N&atilde;o foram encontrados registos para a sua pesquisa !" ); txtSearchMsg.setText( "N&atilde;o foram encontrados registos para a sua pesquisa !" );
ErrorLogger.logException( e );
} }
return null; return null;
@ -2061,6 +2069,7 @@ public class FormHS extends AbstractPageBean {
table2.setRendered( false ); table2.setRendered( false );
txtSearchMsg.setRendered( true ); txtSearchMsg.setRendered( true );
txtSearchMsg.setText( "N&atilde;o foram encontrados registos para a sua pesquisa !" ); txtSearchMsg.setText( "N&atilde;o foram encontrados registos para a sua pesquisa !" );
ErrorLogger.logException( e );
} }
return null; return null;

@ -7,6 +7,7 @@
package analiseacidentestrabalho; package analiseacidentestrabalho;
import beans.AnaliseAcidente; import beans.AnaliseAcidente;
import com.evolute.utils.error.ErrorLogger;
import com.sun.data.provider.RowKey; import com.sun.data.provider.RowKey;
import com.sun.rave.web.ui.appbase.AbstractPageBean; import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.rave.web.ui.component.Body; import com.sun.rave.web.ui.component.Body;
@ -1248,7 +1249,7 @@ public class FormMedico extends AbstractPageBean {
{ {
//lblActivos.setRendered(false); //lblActivos.setRendered(false);
table1.setRendered(false); table1.setRendered(false);
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
table2.setRendered(false); table2.setRendered(false);
@ -1265,7 +1266,7 @@ public class FormMedico extends AbstractPageBean {
{ {
//lblActivos.setRendered(false); //lblActivos.setRendered(false);
table2.setRendered(false); table2.setRendered(false);
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
@ -1280,7 +1281,7 @@ public class FormMedico extends AbstractPageBean {
{ {
//lblActivos.setRendered(false); //lblActivos.setRendered(false);
table3.setRendered(false); table3.setRendered(false);
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
fillAnoDropDown(); fillAnoDropDown();
} }
@ -1335,7 +1336,10 @@ public class FormMedico extends AbstractPageBean {
(javax.servlet.http.HttpSession) getExternalContext().getSession(true); (javax.servlet.http.HttpSession) getExternalContext().getSession(true);
session.invalidate(); session.invalidate();
} }
catch(Exception ex){} catch(Exception ex)
{
ErrorLogger.logException( ex );
}
return "login"; return "login";
} }
@ -1477,7 +1481,7 @@ public class FormMedico extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
Integer ano = null; Integer ano = null;
@ -1540,7 +1544,7 @@ public class FormMedico extends AbstractPageBean {
table3.setRendered(false); table3.setRendered(false);
txtSearchMsg.setRendered(true); txtSearchMsg.setRendered(true);
txtSearchMsg.setText("N&atilde;o foram encontrados registos para a sua pesquisa !"); txtSearchMsg.setText("N&atilde;o foram encontrados registos para a sua pesquisa !");
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
return null; return null;
} }
@ -1575,7 +1579,7 @@ public class FormMedico extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -1754,6 +1758,7 @@ public class FormMedico extends AbstractPageBean {
table1.setRendered( false ); table1.setRendered( false );
txtSearchMsg.setRendered( true ); txtSearchMsg.setRendered( true );
txtSearchMsg.setText( "N&atilde;o foram encontrados registos para a sua pesquisa !" ); txtSearchMsg.setText( "N&atilde;o foram encontrados registos para a sua pesquisa !" );
ErrorLogger.logException( e );
} }
return null; return null;
@ -1804,6 +1809,7 @@ public class FormMedico extends AbstractPageBean {
table2.setRendered( false ); table2.setRendered( false );
txtSearchMsg.setRendered( true ); txtSearchMsg.setRendered( true );
txtSearchMsg.setText( "N&atilde;o foram encontrados registos para a sua pesquisa !" ); txtSearchMsg.setText( "N&atilde;o foram encontrados registos para a sua pesquisa !" );
ErrorLogger.logException( e );
} }
return null; return null;

@ -8,6 +8,7 @@ package analiseacidentestrabalho;
import beans.Utilizador; import beans.Utilizador;
import beans.AnaliseAcidente; import beans.AnaliseAcidente;
import com.evolute.utils.error.ErrorLogger;
import com.sun.data.provider.RowKey; import com.sun.data.provider.RowKey;
import com.sun.rave.web.ui.appbase.AbstractPageBean; import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.rave.web.ui.component.Body; import com.sun.rave.web.ui.component.Body;
@ -1309,7 +1310,7 @@ public class FormRH extends AbstractPageBean {
{ {
//lblActivos.setRendered(false); //lblActivos.setRendered(false);
table1.setRendered(false); table1.setRendered(false);
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
@ -1324,7 +1325,7 @@ public class FormRH extends AbstractPageBean {
{ {
//lblActivos.setRendered(false); //lblActivos.setRendered(false);
table2.setRendered(false); table2.setRendered(false);
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
@ -1339,7 +1340,7 @@ public class FormRH extends AbstractPageBean {
{ {
//lblActivos.setRendered(false); //lblActivos.setRendered(false);
table3.setRendered(false); table3.setRendered(false);
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
fillAnoDropDown(); fillAnoDropDown();
} }
@ -1389,11 +1390,19 @@ public class FormRH extends AbstractPageBean {
(javax.servlet.http.HttpSession) getExternalContext().getSession(true); (javax.servlet.http.HttpSession) getExternalContext().getSession(true);
session.invalidate(); session.invalidate();
} }
catch(Exception ex){} catch(Exception ex)
{
ErrorLogger.logException( ex );
}
try { try
getExternalContext().redirect("Login.jsp"); {
} catch(Exception e) {} getExternalContext().redirect("Login.jsp");
}
catch ( Exception e )
{
ErrorLogger.logException( e );
}
//return "login"; //return "login";
return null; return null;
} }
@ -1562,7 +1571,7 @@ public class FormRH extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
Integer ano = null; Integer ano = null;
@ -1624,7 +1633,7 @@ public class FormRH extends AbstractPageBean {
table3.setRendered(false); table3.setRendered(false);
txtSearchMsg.setRendered(true); txtSearchMsg.setRendered(true);
txtSearchMsg.setText("N&atilde;o foram encontrados registos para a sua pesquisa !"); txtSearchMsg.setText("N&atilde;o foram encontrados registos para a sua pesquisa !");
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
return null; return null;
@ -1666,7 +1675,7 @@ public class FormRH extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -1885,7 +1894,7 @@ public class FormRH extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
return null; return null;
} }
@ -1963,6 +1972,7 @@ public class FormRH extends AbstractPageBean {
table1.setRendered( false ); table1.setRendered( false );
txtSearchMsg.setRendered( true ); txtSearchMsg.setRendered( true );
txtSearchMsg.setText( "N&atilde;o foram encontrados registos para a sua pesquisa !" ); txtSearchMsg.setText( "N&atilde;o foram encontrados registos para a sua pesquisa !" );
ErrorLogger.logException( e );
} }
return null; return null;
@ -2014,6 +2024,7 @@ public class FormRH extends AbstractPageBean {
table2.setRendered( false ); table2.setRendered( false );
txtSearchMsg.setRendered( true ); txtSearchMsg.setRendered( true );
txtSearchMsg.setText( "N&atilde;o foram encontrados registos para a sua pesquisa !" ); txtSearchMsg.setText( "N&atilde;o foram encontrados registos para a sua pesquisa !" );
ErrorLogger.logException( e );
} }
return null; return null;

@ -8,6 +8,7 @@ package analiseacidentestrabalho;
import beans.Utilizador; import beans.Utilizador;
import beans.AnaliseAcidente; import beans.AnaliseAcidente;
import com.evolute.utils.error.ErrorLogger;
import com.sun.data.provider.RowKey; import com.sun.data.provider.RowKey;
import com.sun.rave.web.ui.appbase.AbstractPageBean; import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.rave.web.ui.component.Body; import com.sun.rave.web.ui.component.Body;
@ -1332,7 +1333,7 @@ public class FormSeguranca extends AbstractPageBean {
{ {
//lblActivos.setRendered(false); //lblActivos.setRendered(false);
table1.setRendered(false); table1.setRendered(false);
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
@ -1348,7 +1349,7 @@ public class FormSeguranca extends AbstractPageBean {
{ {
//lblActivos.setRendered(false); //lblActivos.setRendered(false);
table2.setRendered(false); table2.setRendered(false);
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
@ -1363,7 +1364,7 @@ public class FormSeguranca extends AbstractPageBean {
{ {
//lblActivos.setRendered(false); //lblActivos.setRendered(false);
table3.setRendered(false); table3.setRendered(false);
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
fillAnoDropDown(); fillAnoDropDown();
} }
@ -1420,7 +1421,7 @@ public class FormSeguranca extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -1530,11 +1531,19 @@ public class FormSeguranca extends AbstractPageBean {
(javax.servlet.http.HttpSession) getExternalContext().getSession(true); (javax.servlet.http.HttpSession) getExternalContext().getSession(true);
session.invalidate(); session.invalidate();
} }
catch(Exception ex){} catch(Exception ex)
{
ErrorLogger.logException( ex );
}
try { try
getExternalContext().redirect("Login.jsp"); {
} catch(Exception e) {} getExternalContext().redirect("Login.jsp");
}
catch(Exception e)
{
ErrorLogger.logException( e );
}
//return "login"; //return "login";
return null; return null;
} }
@ -1620,6 +1629,7 @@ public class FormSeguranca extends AbstractPageBean {
table1.setRendered( false ); table1.setRendered( false );
txtSearchMsg.setRendered( true ); txtSearchMsg.setRendered( true );
txtSearchMsg.setText( "N&atilde;o foram encontrados registos para a sua pesquisa !" ); txtSearchMsg.setText( "N&atilde;o foram encontrados registos para a sua pesquisa !" );
ErrorLogger.logException( e );
} }
return null; return null;
@ -1671,6 +1681,7 @@ public class FormSeguranca extends AbstractPageBean {
table2.setRendered( false ); table2.setRendered( false );
txtSearchMsg.setRendered( true ); txtSearchMsg.setRendered( true );
txtSearchMsg.setText( "N&atilde;o foram encontrados registos para a sua pesquisa !" ); txtSearchMsg.setText( "N&atilde;o foram encontrados registos para a sua pesquisa !" );
ErrorLogger.logException( e );
} }
return null; return null;
@ -1690,7 +1701,7 @@ public class FormSeguranca extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
Integer ano = null; Integer ano = null;
@ -1744,16 +1755,14 @@ public class FormSeguranca extends AbstractPageBean {
table3.setRendered(true); table3.setRendered(true);
txtSearchMsg.setRendered(false); txtSearchMsg.setRendered(false);
getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList); getSessionBean1().getAnalisesConcluidasDataProvider().setList(concluidasList);
} }
catch(Exception ex) catch(Exception ex)
{ {
table3.setRendered(false); table3.setRendered(false);
txtSearchMsg.setRendered(true); txtSearchMsg.setRendered(true);
txtSearchMsg.setText("N&atilde;o foram encontrados registos para a sua pesquisa !"); txtSearchMsg.setText("N&atilde;o foram encontrados registos para a sua pesquisa !");
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
return null; return null;
@ -2007,7 +2016,7 @@ public class FormSeguranca extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// return null; // return null;
// } // }
return null; return null;

@ -7,6 +7,7 @@
package analiseacidentestrabalho; package analiseacidentestrabalho;
import beans.Utilizador; import beans.Utilizador;
import com.evolute.utils.error.ErrorLogger;
import com.sun.data.provider.RowKey; import com.sun.data.provider.RowKey;
import com.sun.rave.web.ui.appbase.AbstractPageBean; import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.rave.web.ui.component.Body; import com.sun.rave.web.ui.component.Body;
@ -38,7 +39,6 @@ import javax.faces.component.html.HtmlPanelGrid;
import javax.faces.context.FacesContext; import javax.faces.context.FacesContext;
import javax.faces.event.ValueChangeEvent; import javax.faces.event.ValueChangeEvent;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import utils.JSFUtils;
import utils.Utils; import utils.Utils;
/** /**
@ -815,7 +815,7 @@ public class GestaoUtilizadores extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
String isDirRh = "n"; String isDirRh = "n";
@ -830,7 +830,7 @@ public class GestaoUtilizadores extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
//ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
@ -840,7 +840,7 @@ public class GestaoUtilizadores extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
//ex.printStackTrace(); ErrorLogger.logException( ex );
getSessionBean1().getUtilizadoresInactivosListDataProvider().setList(new ArrayList()); getSessionBean1().getUtilizadoresInactivosListDataProvider().setList(new ArrayList());
table1.setRendered(false); table1.setRendered(false);
} }
@ -896,9 +896,14 @@ public class GestaoUtilizadores extends AbstractPageBean {
javax.servlet.http.HttpSession session = javax.servlet.http.HttpSession session =
(javax.servlet.http.HttpSession) getExternalContext().getSession(true); (javax.servlet.http.HttpSession) getExternalContext().getSession(true);
session.invalidate(); session.invalidate();
try { try
getExternalContext().redirect("Login.jsp"); {
} catch(Exception e) {} getExternalContext().redirect("Login.jsp");
}
catch ( Exception e )
{
ErrorLogger.logException( e );
}
//return "login"; //return "login";
return null; return null;
@ -1041,7 +1046,7 @@ public class GestaoUtilizadores extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
//ex.printStackTrace(); ErrorLogger.logException( ex );
getSessionBean1().getUtilizadoresActivosListDataProvider().setList(new ArrayList()); getSessionBean1().getUtilizadoresActivosListDataProvider().setList(new ArrayList());
} }
@ -1052,7 +1057,7 @@ public class GestaoUtilizadores extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
//ex.printStackTrace(); ErrorLogger.logException( ex );
getSessionBean1().getUtilizadoresInactivosListDataProvider().setList(new ArrayList()); getSessionBean1().getUtilizadoresInactivosListDataProvider().setList(new ArrayList());
} }
@ -1196,7 +1201,7 @@ public class GestaoUtilizadores extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
return null; return null;
} }

@ -6,6 +6,7 @@
*/ */
package analiseacidentestrabalho; package analiseacidentestrabalho;
import com.evolute.utils.error.ErrorLogger;
import com.sun.rave.web.ui.appbase.AbstractPageBean; import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.rave.web.ui.component.Body; import com.sun.rave.web.ui.component.Body;
import com.sun.rave.web.ui.component.Button; import com.sun.rave.web.ui.component.Button;
@ -261,7 +262,7 @@ public class LoadImage extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -418,7 +419,7 @@ public class LoadImage extends AbstractPageBean {
getSessionBean1().setImageName(justFileName); getSessionBean1().setImageName(justFileName);
//getSessionBean1().setMsg("Ficheiro carregado !"); //getSessionBean1().setMsg("Ficheiro carregado !");
} catch (Exception ex) { } catch (Exception ex) {
ex.printStackTrace(); ErrorLogger.logException( ex );
getSessionBean1().setMsg("N&atilde;o foi possivel carregar o ficheiro !"); getSessionBean1().setMsg("N&atilde;o foi possivel carregar o ficheiro !");
return null; return null;
} }

@ -7,6 +7,7 @@
package analiseacidentestrabalho; package analiseacidentestrabalho;
import beans.Utilizador; import beans.Utilizador;
import com.evolute.utils.error.ErrorLogger;
import com.sun.rave.web.ui.appbase.AbstractPageBean; import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.rave.web.ui.component.Body; import com.sun.rave.web.ui.component.Body;
import com.sun.rave.web.ui.component.Button; import com.sun.rave.web.ui.component.Button;
@ -22,15 +23,12 @@ import com.sun.rave.web.ui.component.TextField;
import com.sun.rave.web.ui.model.Option; import com.sun.rave.web.ui.model.Option;
import db.AnalisesDataProvider; import db.AnalisesDataProvider;
import db.UtilizadoresDataProvider; import db.UtilizadoresDataProvider;
import global.Global;
import java.sql.Connection; import java.sql.Connection;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Calendar; import java.util.Calendar;
import java.util.GregorianCalendar; import java.util.GregorianCalendar;
import javax.faces.FacesException; import javax.faces.FacesException;
import javax.faces.component.html.HtmlPanelGrid; import javax.faces.component.html.HtmlPanelGrid;
import javax.faces.context.FacesContext;
import utils.JSFUtils;
/** /**
* <p>Page bean that corresponds to a similarly named JSP page. This * <p>Page bean that corresponds to a similarly named JSP page. This
@ -455,7 +453,7 @@ public class Login extends AbstractPageBean {
} }
catch(Exception e1) catch(Exception e1)
{ {
e1.printStackTrace(); ErrorLogger.logException( e1 );
getSessionBean1().setMsg("N&atilde;o tem permiss&atilde;o para entrar na aplica&ccedil;&atilde;o !"); getSessionBean1().setMsg("N&atilde;o tem permiss&atilde;o para entrar na aplica&ccedil;&atilde;o !");
} }
} }
@ -468,7 +466,7 @@ public class Login extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
getSessionBean1().setMsg("Utilizador inv&aacute;lido ! "); getSessionBean1().setMsg("Utilizador inv&aacute;lido ! ");
} }
} }
@ -502,23 +500,25 @@ public class Login extends AbstractPageBean {
private void connect() private void connect()
{ {
db.Db db = new db.Db(); db.Db db = new db.Db();
try try
{ {
Connection connection = db.connect(); Connection connection = db.connect();
} }
catch(Exception ex) catch(Exception ex)
{ {
getSessionBean1().setMsg("Erro na liga&ccedil;&atilde;o &agrave; Base de Dados"); getSessionBean1().setMsg("Erro na liga&ccedil;&atilde;o &agrave; Base de Dados");
//***** terminate session //***** terminate session
try { try
getExternalContext().redirect("faces/Erro.jsp"); {
} catch(Exception e) { getExternalContext().redirect("faces/Erro.jsp");
// . . . handle exception . . . }
e.printStackTrace(); catch ( Exception e )
} {
ex.printStackTrace(); ErrorLogger.logException( e );
} }
ErrorLogger.logException( ex );
}
} }
private void initializeClock() private void initializeClock()
@ -571,7 +571,7 @@ public class Login extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
// try // try
@ -581,7 +581,7 @@ public class Login extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
AnalisesDataProvider adp = new AnalisesDataProvider(); AnalisesDataProvider adp = new AnalisesDataProvider();
@ -591,7 +591,7 @@ public class Login extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
@ -600,7 +600,7 @@ public class Login extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -649,7 +649,7 @@ public class Login extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }

@ -9,6 +9,7 @@ package analiseacidentestrabalho;
import beans.Medico; import beans.Medico;
import beans.Trabalhador; import beans.Trabalhador;
import beans.Utilizador; import beans.Utilizador;
import com.evolute.utils.error.ErrorLogger;
import com.sun.data.provider.RowKey; import com.sun.data.provider.RowKey;
import com.sun.rave.web.ui.appbase.AbstractPageBean; import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.rave.web.ui.component.Body; import com.sun.rave.web.ui.component.Body;
@ -1271,7 +1272,7 @@ public class NovoUtilizador extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
u.setFuncionario_hst_id((Integer) drpNomeHs.getSelected()); u.setFuncionario_hst_id((Integer) drpNomeHs.getSelected());
try try
@ -1281,7 +1282,7 @@ public class NovoUtilizador extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
u.setCap(cap); u.setCap(cap);
@ -1321,7 +1322,7 @@ public class NovoUtilizador extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
u.setMedico_id((Integer) drpNomeMed.getSelected()); u.setMedico_id((Integer) drpNomeMed.getSelected());
//u.setNome(drpNomeMed.getLabel()); //u.setNome(drpNomeMed.getLabel());
@ -1335,7 +1336,7 @@ public class NovoUtilizador extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
u.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id()); u.setEmpresa_id(getSessionBean1().getCurrentUser().getEmpresa_id());
u.setEstabelecimento((Integer) drpEstabelecimentoMed.getSelected()); u.setEstabelecimento((Integer) drpEstabelecimentoMed.getSelected());
@ -1345,7 +1346,7 @@ public class NovoUtilizador extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
u.setResponsavel_loja("n"); u.setResponsavel_loja("n");
getSessionBean1().setNewUser(u); getSessionBean1().setNewUser(u);
@ -1397,7 +1398,7 @@ public class NovoUtilizador extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
u = setUserTipo(u); u = setUserTipo(u);
@ -1508,7 +1509,7 @@ public class NovoUtilizador extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
@ -1518,7 +1519,7 @@ public class NovoUtilizador extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
@ -1528,7 +1529,7 @@ public class NovoUtilizador extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -1628,7 +1629,7 @@ public class NovoUtilizador extends AbstractPageBean {
getSessionBean1().setMsg("Trabalhador inexistente !"); getSessionBean1().setMsg("Trabalhador inexistente !");
getSessionBean1().getTrabalhadoresListDataProvider().setList(new ArrayList()); getSessionBean1().getTrabalhadoresListDataProvider().setList(new ArrayList());
tblTrabalhadores.setStyleClass("hidden"); tblTrabalhadores.setStyleClass("hidden");
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
return null; return null;
} }
@ -1850,7 +1851,7 @@ public class NovoUtilizador extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
return u; return u;
} }
@ -2012,7 +2013,7 @@ public class NovoUtilizador extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
return null; return null;
} }

@ -7,6 +7,7 @@
package analiseacidentestrabalho; package analiseacidentestrabalho;
import beans.Utilizador; import beans.Utilizador;
import com.evolute.utils.error.ErrorLogger;
import com.sun.rave.web.ui.appbase.AbstractPageBean; import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.rave.web.ui.component.Body; import com.sun.rave.web.ui.component.Body;
import com.sun.rave.web.ui.component.Button; import com.sun.rave.web.ui.component.Button;
@ -398,7 +399,7 @@ public class RecuperarPassword extends AbstractPageBean {
catch(Exception ex) catch(Exception ex)
{ {
getSessionBean1().setMsg("Erro no envio da password !"); getSessionBean1().setMsg("Erro no envio da password !");
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -469,7 +470,7 @@ public class RecuperarPassword extends AbstractPageBean {
// catch (Exception ex) // catch (Exception ex)
// { // {
// System.out.println("MAIL ERROR : " + ex.getMessage()); // System.out.println("MAIL ERROR : " + ex.getMessage());
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
} }

@ -8,6 +8,7 @@ package analiseacidentestrabalho;
import beans.Permissao; import beans.Permissao;
import beans.Utilizador; import beans.Utilizador;
import com.evolute.utils.error.ErrorLogger;
import com.sun.rave.web.ui.appbase.AbstractPageBean; import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.rave.web.ui.component.Body; import com.sun.rave.web.ui.component.Body;
import com.sun.rave.web.ui.component.Button; import com.sun.rave.web.ui.component.Button;
@ -836,14 +837,18 @@ public class UtilizadorFields extends AbstractPageBean {
getSessionBean1().setMsg("Utilizador eliminado!"); getSessionBean1().setMsg("Utilizador eliminado!");
//return "gestao_utilizadores"; //return "gestao_utilizadores";
getSessionBean1().setUserDeleted(true); getSessionBean1().setUserDeleted(true);
try { try
{
getExternalContext().redirect("GestaoUtilizadores.jsp"); getExternalContext().redirect("GestaoUtilizadores.jsp");
} catch(Exception e) { }
catch(Exception e)
{
ErrorLogger.logException( e );
} }
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
getSessionBean1().setMsg("Erro na elimina&ccedil;&atilde;o do utilizador!"); getSessionBean1().setMsg("Erro na elimina&ccedil;&atilde;o do utilizador!");
} }
} }
@ -908,10 +913,17 @@ public class UtilizadorFields extends AbstractPageBean {
(javax.servlet.http.HttpSession) getExternalContext().getSession(true); (javax.servlet.http.HttpSession) getExternalContext().getSession(true);
session.invalidate(); session.invalidate();
} }
catch(Exception ex){} catch(Exception ex)
{
ErrorLogger.logException( ex );
}
try { try {
getExternalContext().redirect("Login.jsp"); getExternalContext().redirect("Login.jsp");
} catch(Exception e) {} }
catch(Exception e)
{
ErrorLogger.logException( e );
}
return null; return null;
} }
@ -966,7 +978,7 @@ public class UtilizadorFields extends AbstractPageBean {
catch(Exception ex) catch(Exception ex)
{ {
getSessionBean1().setMsg("Erro na cria&ccedil;&atilde;o do utilizador!"); getSessionBean1().setMsg("Erro na cria&ccedil;&atilde;o do utilizador!");
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
else if( getSessionBean1().getModoEdicaoUtilizador().matches("edit") ) else if( getSessionBean1().getModoEdicaoUtilizador().matches("edit") )
@ -980,7 +992,7 @@ public class UtilizadorFields extends AbstractPageBean {
catch(Exception ex) catch(Exception ex)
{ {
getSessionBean1().setMsg("Erro na actualiza&ccedil;&atilde;o do utilizador"); getSessionBean1().setMsg("Erro na actualiza&ccedil;&atilde;o do utilizador");
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
} }
@ -1036,7 +1048,7 @@ public class UtilizadorFields extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
Utilizador u = getSessionBean1().getEditUser(); Utilizador u = getSessionBean1().getEditUser();
@ -1060,7 +1072,7 @@ public class UtilizadorFields extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
drpEstabelecimentos.setSelected(u.getEstabelecimento_id()); drpEstabelecimentos.setSelected(u.getEstabelecimento_id());
@ -1147,7 +1159,7 @@ public class UtilizadorFields extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
} }
@ -1298,7 +1310,7 @@ public class UtilizadorFields extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -1461,7 +1473,10 @@ public class UtilizadorFields extends AbstractPageBean {
} }
} }
} }
catch(Exception ex){} catch(Exception ex)
{
ErrorLogger.logException( ex );
}
u.setResponsavel_loja("n"); u.setResponsavel_loja("n");
try try
@ -1474,7 +1489,10 @@ public class UtilizadorFields extends AbstractPageBean {
} }
} }
} }
catch(Exception ex){} catch(Exception ex)
{
ErrorLogger.logException( ex );
}
u.setPrimeiro_login("n"); u.setPrimeiro_login("n");
UtilizadoresDataProvider udp = new UtilizadoresDataProvider(); UtilizadoresDataProvider udp = new UtilizadoresDataProvider();
udp.updateUtilizador(u); udp.updateUtilizador(u);
@ -1534,7 +1552,7 @@ public class UtilizadorFields extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
u.setCap( nu.getCap()); u.setCap( nu.getCap());
} }
@ -1549,7 +1567,7 @@ public class UtilizadorFields extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
//u.setNumero_cedula( (String) stCedula.getText()); //u.setNumero_cedula( (String) stCedula.getText());
u.setNumero_cedula(nu.getNumero_cedula()); u.setNumero_cedula(nu.getNumero_cedula());
@ -1628,7 +1646,7 @@ public class UtilizadorFields extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
return null; return null;
} }

@ -13,6 +13,7 @@ import beans.Medida;
import beans.Utilizador; import beans.Utilizador;
import beans.Acidentado; import beans.Acidentado;
import beans.AnaliseAcidente; import beans.AnaliseAcidente;
import com.evolute.utils.error.ErrorLogger;
import com.sun.rave.web.ui.appbase.AbstractPageBean; import com.sun.rave.web.ui.appbase.AbstractPageBean;
import com.sun.rave.web.ui.component.Body; import com.sun.rave.web.ui.component.Body;
import com.sun.rave.web.ui.component.Button; import com.sun.rave.web.ui.component.Button;
@ -20,7 +21,6 @@ import com.sun.rave.web.ui.component.Form;
import com.sun.rave.web.ui.component.Head; import com.sun.rave.web.ui.component.Head;
import com.sun.rave.web.ui.component.HiddenField; import com.sun.rave.web.ui.component.HiddenField;
import com.sun.rave.web.ui.component.Html; import com.sun.rave.web.ui.component.Html;
import com.sun.rave.web.ui.component.Hyperlink;
import com.sun.rave.web.ui.component.ImageComponent; import com.sun.rave.web.ui.component.ImageComponent;
import com.sun.rave.web.ui.component.Link; import com.sun.rave.web.ui.component.Link;
import com.sun.rave.web.ui.component.Page; import com.sun.rave.web.ui.component.Page;
@ -2221,7 +2221,7 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex1) catch(Exception ex1)
{ {
ex1.printStackTrace(); ErrorLogger.logException( ex1 );
} }
} }
else if(u.getTipo().intValue() == Global.TIPO_UTILIZADOR_HS) else if(u.getTipo().intValue() == Global.TIPO_UTILIZADOR_HS)
@ -2233,7 +2233,7 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex1) catch(Exception ex1)
{ {
ex1.printStackTrace(); ErrorLogger.logException( ex1 );
} }
} }
@ -2241,14 +2241,14 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
catch(Exception ex) catch(Exception ex)
{ {
getSessionBean1().setMsg("Erro na elimina&ccedil;&atilde;o da an&aacute;lise"); getSessionBean1().setMsg("Erro na elimina&ccedil;&atilde;o da an&aacute;lise");
ex.printStackTrace(); ErrorLogger.logException( ex );
// try // try
// { // {
// getExternalContext().redirect("EditarQuestionario.jsp"); // getExternalContext().redirect("EditarQuestionario.jsp");
// } // }
// catch(Exception ex1) // catch(Exception ex1)
// { // {
// ex1.printStackTrace(); // ErrorLogger.logException( ex1 );
// } // }
} }
} }
@ -2515,7 +2515,10 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_acidente().getTime()); java.util.Date ddate = new java.util.Date(a.getData_acidente().getTime());
stHeaderDate.setText(utils.Utils.dateToYYYYMMDD(ddate)); stHeaderDate.setText(utils.Utils.dateToYYYYMMDD(ddate));
} }
catch(Exception ex){}; catch ( Exception ex )
{
ErrorLogger.logException( ex );
}
} }
private void fillSIPRP(AnaliseAcidente a) private void fillSIPRP(AnaliseAcidente a)
@ -2529,7 +2532,7 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
{ {
@ -2539,7 +2542,7 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -2552,7 +2555,10 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_nascimento().getTime()); java.util.Date ddate = new java.util.Date(a.getData_nascimento().getTime());
stDataNascimento.setText(utils.Utils.dateToYYYYMMDD(ddate)); stDataNascimento.setText(utils.Utils.dateToYYYYMMDD(ddate));
} }
catch(Exception ex){}; catch ( Exception ex )
{
ErrorLogger.logException( ex );
}
stBI.setText(a.getBilhete_identidade()); stBI.setText(a.getBilhete_identidade());
stMorada.setText(a.getMorada()); stMorada.setText(a.getMorada());
String cod_postal1 = ""; String cod_postal1 = "";
@ -2579,7 +2585,10 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_admissao().getTime()); java.util.Date ddate = new java.util.Date(a.getData_admissao().getTime());
stDataAdmissao.setText(utils.Utils.dateToYYYYMMDD(ddate)); stDataAdmissao.setText(utils.Utils.dateToYYYYMMDD(ddate));
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
stFuncao.setText(a.getFuncao()); stFuncao.setText(a.getFuncao());
String turno_str = ""; String turno_str = "";
if(a.getTurno().matches("m")) if(a.getTurno().matches("m"))
@ -2610,7 +2619,7 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
{ {
@ -2618,7 +2627,7 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
// try // try
@ -2636,7 +2645,7 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
txtTrabalhador.setText(a.getNome_acidentado()); txtTrabalhador.setText(a.getNome_acidentado());
@ -2656,7 +2665,10 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_acidente().getTime()); java.util.Date ddate = new java.util.Date(a.getData_acidente().getTime());
stDataAcidente1.setText(utils.Utils.dateToYYYYMMDD(ddate)); stDataAcidente1.setText(utils.Utils.dateToYYYYMMDD(ddate));
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
} }
if(a.getHora_acidente() == null) if(a.getHora_acidente() == null)
@ -2677,7 +2689,10 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
{ {
stHoraAcidente1.setText(utils.Utils.timeToHHMM(hour + ":" + minutes)); stHoraAcidente1.setText(utils.Utils.timeToHHMM(hour + ":" + minutes));
} }
catch(Exception ex){} catch(Exception ex)
{
ErrorLogger.logException( ex );
}
} }
boolean booTurnoSeccaoLocal = false; boolean booTurnoSeccaoLocal = false;
@ -2721,7 +2736,7 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
lblSeccao.setRendered(false); lblSeccao.setRendered(false);
txtSeccao.setRendered(false); txtSeccao.setRendered(false);
} }
@ -2843,7 +2858,7 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
gridCausas.setRendered(false); gridCausas.setRendered(false);
} }
@ -2971,7 +2986,7 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
catch(Exception ex) catch(Exception ex)
{ {
System.out.println("IMAGES ERROR : " + ex.getMessage()); System.out.println("IMAGES ERROR : " + ex.getMessage());
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -3271,7 +3286,7 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -3310,7 +3325,7 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -3536,7 +3551,10 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_aval_incapacidade().getTime()); java.util.Date ddate = new java.util.Date(a.getData_aval_incapacidade().getTime());
st.setText(utils.Utils.dateToYYYYMMDD(ddate)); st.setText(utils.Utils.dateToYYYYMMDD(ddate));
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
pg.getChildren().add(st); pg.getChildren().add(st);
} }
@ -3558,7 +3576,10 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_rev_incapacidade().getTime()); java.util.Date ddate = new java.util.Date(a.getData_rev_incapacidade().getTime());
st.setText(utils.Utils.dateToYYYYMMDD(ddate)); st.setText(utils.Utils.dateToYYYYMMDD(ddate));
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
pg.getChildren().add(st); pg.getChildren().add(st);
} }
@ -3586,7 +3607,10 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getPeriodo_incapacidade_de().getTime()); java.util.Date ddate = new java.util.Date(a.getPeriodo_incapacidade_de().getTime());
st.setText(utils.Utils.dateToYYYYMMDD(ddate)); st.setText(utils.Utils.dateToYYYYMMDD(ddate));
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
pg.getChildren().add(st); pg.getChildren().add(st);
st = new StaticText(); st = new StaticText();
st.setId("stPeriodoIncapacidadeLbl2"); st.setId("stPeriodoIncapacidadeLbl2");
@ -3603,7 +3627,10 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getPeriodo_incapacidade_a().getTime()); java.util.Date ddate = new java.util.Date(a.getPeriodo_incapacidade_a().getTime());
st.setText(utils.Utils.dateToYYYYMMDD(ddate)); st.setText(utils.Utils.dateToYYYYMMDD(ddate));
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
pg.getChildren().add(st); pg.getChildren().add(st);
gridIncapacidade.getChildren().add(pg); gridIncapacidade.getChildren().add(pg);
} }
@ -4181,7 +4208,10 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_inicio_processo().getTime()); java.util.Date ddate = new java.util.Date(a.getData_inicio_processo().getTime());
txtVer += utils.Utils.dateToYYYYMMDD(ddate) + "."; txtVer += utils.Utils.dateToYYYYMMDD(ddate) + ".";
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
st.setText(txtVer); st.setText(txtVer);
gridAssinaturasView.getChildren().add(st); gridAssinaturasView.getChildren().add(st);
} }
@ -4199,7 +4229,10 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_consolidacao().getTime()); java.util.Date ddate = new java.util.Date(a.getData_consolidacao().getTime());
txtVer += utils.Utils.dateToYYYYMMDD(ddate) + "."; txtVer += utils.Utils.dateToYYYYMMDD(ddate) + ".";
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
st.setText(txtVer); st.setText(txtVer);
gridAssinaturasView.getChildren().add(st); gridAssinaturasView.getChildren().add(st);
} }
@ -4216,7 +4249,10 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_assinatura_seg().getTime()); java.util.Date ddate = new java.util.Date(a.getData_assinatura_seg().getTime());
txtVer += utils.Utils.dateToYYYYMMDD(ddate) + "."; txtVer += utils.Utils.dateToYYYYMMDD(ddate) + ".";
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
st.setText(txtVer); st.setText(txtVer);
gridAssinaturasView.getChildren().add(st); gridAssinaturasView.getChildren().add(st);
} }
@ -4233,7 +4269,10 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_assinatura_rh().getTime()); java.util.Date ddate = new java.util.Date(a.getData_assinatura_rh().getTime());
txtVer += utils.Utils.dateToYYYYMMDD(ddate) + "."; txtVer += utils.Utils.dateToYYYYMMDD(ddate) + ".";
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
st.setText(txtVer); st.setText(txtVer);
gridAssinaturasView.getChildren().add(st); gridAssinaturasView.getChildren().add(st);
} }
@ -4260,7 +4299,10 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(ac.getData_email_superior_hierarquico().getTime()); java.util.Date ddate = new java.util.Date(ac.getData_email_superior_hierarquico().getTime());
txtVer += " a " + utils.Utils.dateToYYYYMMDD(ddate); txtVer += " a " + utils.Utils.dateToYYYYMMDD(ddate);
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
} }
} }
txtVer += "."; txtVer += ".";
@ -4271,7 +4313,7 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
HtmlPanelGrid grid = new HtmlPanelGrid(); HtmlPanelGrid grid = new HtmlPanelGrid();
@ -4298,7 +4340,10 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
java.util.Date ddate = new java.util.Date(a.getData_assinatura_superior().getTime()); java.util.Date ddate = new java.util.Date(a.getData_assinatura_superior().getTime());
stData += utils.Utils.dateToYYYYMMDD(ddate); stData += utils.Utils.dateToYYYYMMDD(ddate);
} }
catch(Exception ex){}; catch(Exception ex)
{
ErrorLogger.logException( ex );
}
String txt = "Assinado na Ficha de An&aacute;lise de Acidente em papel por " + a.getNome_superior() + ", superior hier&aacute;rquico / superior de "; String txt = "Assinado na Ficha de An&aacute;lise de Acidente em papel por " + a.getNome_superior() + ", superior hier&aacute;rquico / superior de ";
txt += getSessionBean1().getAcidentado().getNome() + ", a " + stData; txt += getSessionBean1().getAcidentado().getNome() + ", a " + stData;
@ -4334,7 +4379,7 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ErrorLogger.logException( ex );
} }
} }
@ -4471,7 +4516,7 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
return null; return null;
} }
@ -4496,7 +4541,7 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
// try // try
@ -4505,7 +4550,7 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
// //
// try // try
@ -4514,7 +4559,7 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
// //
// try // try
@ -4523,7 +4568,7 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
// //
// try // try
@ -4532,7 +4577,7 @@ public class ViewAnaliseAcidenteTrabalho extends AbstractPageBean {
// } // }
// catch(Exception ex) // catch(Exception ex)
// { // {
// ex.printStackTrace(); // ErrorLogger.logException( ex );
// } // }
// //
// //

@ -9,6 +9,7 @@
package db; package db;
import com.evolute.utils.error.ErrorLogger;
import java.sql.Connection; import java.sql.Connection;
import java.sql.DriverManager; import java.sql.DriverManager;
import java.sql.ResultSet; import java.sql.ResultSet;
@ -20,16 +21,20 @@ import javax.servlet.http.HttpSession;
* *
* @author lluis * @author lluis
*/ */
public class Db { public class Db
// String connectionURL = "jdbc:postgresql://storage:5432/siprp_20100629"; //testes {
// String connectionURL = "jdbc:postgresql://evoserver:5432/siprp_20100629"; //testes
String connectionURL = "jdbc:postgresql://localhost:5436/siprp"; //real String connectionURL = "jdbc:postgresql://localhost:5436/siprp"; //real
String User = "postgres"; String User = "postgres";
String Pass = null; String Pass = null;
Connection connection = null; Connection connection = null;
/** Creates a new instance of Db */ /** Creates a new instance of Db */
public Db() { public Db()
{
} }
public Connection connect() throws Exception public Connection connect() throws Exception
@ -53,7 +58,7 @@ public class Db {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
return null; return null;
} }
} }

@ -9,6 +9,7 @@
package db; package db;
import com.evolute.utils.error.ErrorLogger;
import java.sql.Connection; import java.sql.Connection;
import java.sql.DriverManager; import java.sql.DriverManager;
import java.sql.ResultSet; import java.sql.ResultSet;
@ -20,15 +21,20 @@ import javax.servlet.http.HttpSession;
* *
* @author lluis * @author lluis
*/ */
public class Dblocal { public class Dblocal
// String connectionURL = "jdbc:postgresql://storage:5432/siprp_local_3_20100713"; //testes {
// String connectionURL = "jdbc:postgresql://evoserver:5432/siprp_local_3_20100713"; //testes
String connectionURL = "jdbc:postgresql://localhost:5436/siprp_local_3"; String connectionURL = "jdbc:postgresql://localhost:5436/siprp_local_3";
String User = "postgres";
String User = "postgres";
String Pass = null; String Pass = null;
Connection connection = null; Connection connection = null;
/** Creates a new instance of Dblocal */ /** Creates a new instance of Dblocal */
public Dblocal() { public Dblocal()
{
} }
public Connection connect() throws Exception public Connection connect() throws Exception
@ -52,7 +58,7 @@ public class Dblocal {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
return null; return null;
} }
} }

@ -13,6 +13,7 @@ import beans.Medico;
import beans.Permissao; import beans.Permissao;
import beans.TecnicoSaude; import beans.TecnicoSaude;
import beans.Utilizador; import beans.Utilizador;
import com.evolute.utils.error.ErrorLogger;
import com.sun.rave.web.ui.model.Option; import com.sun.rave.web.ui.model.Option;
import global.Global; import global.Global;
import java.sql.ResultSet; import java.sql.ResultSet;
@ -49,7 +50,7 @@ public class UtilizadoresDataProvider {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
return new Integer(1); return new Integer(1);
} }
} }
@ -348,7 +349,7 @@ public class UtilizadoresDataProvider {
} }
catch(Exception e) catch(Exception e)
{ {
e.printStackTrace(); ErrorLogger.logException( e );
} }
if(booDirRh.matches("y")) if(booDirRh.matches("y"))
{ {
@ -391,6 +392,7 @@ public class UtilizadoresDataProvider {
} }
catch(Exception ex) catch(Exception ex)
{ {
ErrorLogger.logException( ex );
return null; return null;
} }
} }
@ -412,6 +414,7 @@ public class UtilizadoresDataProvider {
} }
catch(Exception ex) catch(Exception ex)
{ {
ErrorLogger.logException( ex );
return null; return null;
} }
} }
@ -504,7 +507,7 @@ public class UtilizadoresDataProvider {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
return new Integer(1); return new Integer(1);
} }
} }

@ -11,6 +11,7 @@ package global;
import beans.Utilizador; import beans.Utilizador;
//import com.sun.org.apache.bcel.internal.generic.GETFIELD; //import com.sun.org.apache.bcel.internal.generic.GETFIELD;
import com.evolute.utils.error.ErrorLogger;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.FileOutputStream; import java.io.FileOutputStream;
@ -97,7 +98,7 @@ public class Global {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }
@ -160,7 +161,7 @@ public class Global {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
} }

@ -11,14 +11,13 @@ package pdf;
import beans.Acidentado; import beans.Acidentado;
import beans.AnaliseAcidente; import beans.AnaliseAcidente;
import com.lowagie.text.Chunk; import com.evolute.utils.error.ErrorLogger;
import com.lowagie.text.Document; import com.lowagie.text.Document;
import com.lowagie.text.Font; import com.lowagie.text.Font;
import com.lowagie.text.FontFactory; import com.lowagie.text.FontFactory;
import com.lowagie.text.Paragraph; import com.lowagie.text.Paragraph;
import com.lowagie.text.Rectangle; import com.lowagie.text.Rectangle;
import com.lowagie.text.pdf.BaseFont; import com.lowagie.text.pdf.BaseFont;
import com.lowagie.text.pdf.PdfAction;
import com.lowagie.text.pdf.PdfPCell; import com.lowagie.text.pdf.PdfPCell;
import com.lowagie.text.pdf.PdfPTable; import com.lowagie.text.pdf.PdfPTable;
import com.lowagie.text.pdf.PdfWriter; import com.lowagie.text.pdf.PdfWriter;
@ -61,7 +60,7 @@ public class Pdf {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
document.close(); document.close();
} }
@ -85,7 +84,7 @@ public class Pdf {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
try try
{ {
@ -93,7 +92,7 @@ public class Pdf {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
Acidentado ac = null; Acidentado ac = null;
@ -104,7 +103,7 @@ public class Pdf {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
} }
//TableEvents event = new TableEvents(); //TableEvents event = new TableEvents();

@ -6,15 +6,14 @@
package phaselistener; package phaselistener;
import beans.Utilizador; import beans.Utilizador;
import global.Global;
import javax.faces.application.NavigationHandler;
import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext; import javax.faces.context.FacesContext;
import javax.faces.event.PhaseEvent; import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseId; import javax.faces.event.PhaseId;
import javax.faces.event.PhaseListener; import javax.faces.event.PhaseListener;
import javax.servlet.http.HttpServletRequest;
import analiseacidentestrabalho.SessionBean1; import analiseacidentestrabalho.SessionBean1;
import com.evolute.utils.error.ErrorLogger;
import java.util.logging.Level;
import utils.AnaliseAcidentesTrabalhoLogger;
import utils.JSFUtils; import utils.JSFUtils;
import utils.Logos; import utils.Logos;
@ -22,12 +21,32 @@ import utils.Logos;
* *
* @author lluis * @author lluis
*/ */
public class MainPhaseListener implements PhaseListener{ public class MainPhaseListener implements PhaseListener
{
private static Boolean loggerIsLoaded = Boolean.FALSE;
static
{
try
{
if ( ! loggerIsLoaded )
{
System.out.println( "\nInitializing AAT logger ..." );
AnaliseAcidentesTrabalhoLogger.init();
loggerIsLoaded = Boolean.TRUE;
}
}
catch ( Throwable e )
{
e.printStackTrace( System.err );
}
}
private boolean firstEntry = true; private boolean firstEntry = true;
public void afterPhase(PhaseEvent pe) { public void afterPhase(PhaseEvent pe)
{
} }
public void beforePhase(PhaseEvent pe) { public void beforePhase(PhaseEvent pe) {

@ -0,0 +1,40 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package utils;
import com.evolute.utils.error.ErrorLogger;
import com.evolute.utils.error.LoggerProperties;
import com.evolute.utils.error.ProjectsEnum;
import com.evolute.utils.error.log4j.DBLogger;
import java.util.HashMap;
import java.util.Map;
/**
*
* @author dneves
*/
public class AnaliseAcidentesTrabalhoLogger
{
private static String EVO_LOGGER_DB = "jdbc:postgresql://www.evolute.pt:5436/evo_logging?logUnclosedConnections=true&loginTimeout=5&socketTimeout=5&tcpKeepAlive=true";
private static String EVO_LOGGER_USER = "evo_logger";
private static String EVO_LOGGER_PASSWD = "2DD-rg2hLOG";
public static void init()
{
Map< LoggerProperties, String > map = new HashMap< LoggerProperties, String >();
map.put( LoggerProperties.USERNAME, EVO_LOGGER_USER );
map.put( LoggerProperties.PASSWORD, EVO_LOGGER_PASSWD );
map.put( LoggerProperties.URL, EVO_LOGGER_DB );
map.put( LoggerProperties.PROJECT, ProjectsEnum.ANALISE_ACIDENTES_TRABALHO.toString() );
map.put( LoggerProperties.PROJECT_NAME, ProjectsEnum.ANALISE_ACIDENTES_TRABALHO.toString() );
map.put( LoggerProperties.SOFTWARE_VERSION, "1" );
map.put( LoggerProperties.PROJECT_VERSION, "1" );
map.put( LoggerProperties.SOFTWARE_NAME, "SIPRP - Analise Acidentes Trabalho" );
ErrorLogger.initializeLogger( new DBLogger( map ) );
}
}

@ -5,6 +5,7 @@
package utils; package utils;
import com.evolute.utils.error.ErrorLogger;
import db.AnalisesDataProvider; import db.AnalisesDataProvider;
import global.Global; import global.Global;
import java.io.File; import java.io.File;
@ -46,7 +47,7 @@ public class Logos {
} }
catch(Exception ex) catch(Exception ex)
{ {
ex.printStackTrace(); ErrorLogger.logException( ex );
return null; return null;
} }

Loading…
Cancel
Save