|
|
|
|
@ -109,36 +109,30 @@ public class Header extends AbstractFragmentBean {
|
|
|
|
|
public void destroy() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String lnkLogout_action() {
|
|
|
|
|
// TODO: Process the action. Return value is a navigation
|
|
|
|
|
// case name where null will return to the same page.
|
|
|
|
|
FacesContext fc = getFacesContext();
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
JSFUtils.logout(fc);
|
|
|
|
|
//JSFUtils.navigateTo(fc, "login");
|
|
|
|
|
public String lnkLogout_action()
|
|
|
|
|
{
|
|
|
|
|
FacesContext fc = getFacesContext();
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
JSFUtils.logout( fc );
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
//JSFUtils.redirect(fc, "http://localhost:8084/AnaliseAcidentesTrabalho/faces/Login.jsp");
|
|
|
|
|
JSFUtils.redirect(fc, Global.ANALISE_ACIDENTES_URL + "Login.jsp");
|
|
|
|
|
JSFUtils.redirect( fc, Global.ANALISE_ACIDENTES_URL + "Login.jsp" );
|
|
|
|
|
}
|
|
|
|
|
catch(Exception ex)
|
|
|
|
|
catch ( Exception ex )
|
|
|
|
|
{
|
|
|
|
|
ErrorLogger.logException( ex );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
catch(Exception ex)
|
|
|
|
|
{
|
|
|
|
|
ErrorLogger.logException( ex );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch ( Exception ex )
|
|
|
|
|
{
|
|
|
|
|
ErrorLogger.logException( ex );
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String lnkAnaliseAcidentes_action() {
|
|
|
|
|
// TODO: Process the action. Return value is a navigation
|
|
|
|
|
// case name where null will return to the same page.
|
|
|
|
|
|
|
|
|
|
public String lnkAnaliseAcidentes_action()
|
|
|
|
|
{
|
|
|
|
|
FacesContext fc = getFacesContext();
|
|
|
|
|
SessionBean1 session = JSFUtils.getSessionBean(fc);
|
|
|
|
|
Utilizador u = session.getCurrentUser();
|
|
|
|
|
|