<?xml version='1.0' encoding='UTF-8'?>

<!-- =========== FULL CONFIGURATION FILE ================================== -->

<faces-config version="1.2" 
    xmlns="http://java.sun.com/xml/ns/javaee" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
    <application>
        <view-handler>viewhandler.CustomViewHandler</view-handler>        
        <locale-config>
            <default-locale>pt_PT</default-locale>
        </locale-config>
    </application>
    <lifecycle>
        <phase-listener>phaselistener.MainPhaseListener</phase-listener>
    </lifecycle>        
    <managed-bean>
        <managed-bean-name>SessionBean1</managed-bean-name>
        <managed-bean-class>planosactuacao.SessionBean1</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>Login</managed-bean-name>
        <managed-bean-class>planosactuacao.Login</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>ApplicationBean1</managed-bean-name>
        <managed-bean-class>planosactuacao.ApplicationBean1</managed-bean-class>
        <managed-bean-scope>application</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>RequestBean1</managed-bean-name>
        <managed-bean-class>planosactuacao.RequestBean1</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>Erro</managed-bean-name>
        <managed-bean-class>planosactuacao.Erro</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>EditarPlano</managed-bean-name>
        <managed-bean-class>planosactuacao.EditarPlano</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>ListaPlanos</managed-bean-name>
        <managed-bean-class>planosactuacao.ListaPlanos</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
        <from-view-id>/Login.jsp</from-view-id>
        <navigation-case>
            <from-outcome>lista_planos</from-outcome>
            <to-view-id>/ListaPlanos.jsp</to-view-id>
        </navigation-case>
    </navigation-rule>
    <navigation-rule>
        <from-view-id>/ListaPlanos.jsp</from-view-id>
        <navigation-case>
            <from-outcome>editar_plano</from-outcome>
            <to-view-id>/EditarPlano.jsp</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>ver_plano</from-outcome>
            <to-view-id>/ViewPlano.jsp</to-view-id>
        </navigation-case>        
    </navigation-rule>
    <navigation-rule>
        <from-view-id>/EditarPlano.jsp</from-view-id>
        <navigation-case>
            <from-outcome>lista_planos</from-outcome>
            <to-view-id>/ListaPlanos.jsp</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>enviar_correcao</from-outcome>
            <to-view-id>/EnviarCorrecao.jsp</to-view-id>
        </navigation-case>
    </navigation-rule>
    <managed-bean>
        <managed-bean-name>Header</managed-bean-name>
        <managed-bean-class>planosactuacao.Header</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
        <from-view-id>/ViewPlano.jsp</from-view-id>
        <navigation-case>
            <from-outcome>lista_planos</from-outcome>
            <to-view-id>/ListaPlanos.jsp</to-view-id>
        </navigation-case>
    </navigation-rule>    
    <navigation-rule>
        <from-view-id>/EditarPlano.jsp</from-view-id>
        <navigation-case>
            <from-outcome>lista_planos</from-outcome>
            <to-view-id>/ListaPlanos.jsp</to-view-id>
        </navigation-case>
    </navigation-rule>        
    <managed-bean>
        <managed-bean-name>Dummy</managed-bean-name>
        <managed-bean-class>planosactuacao.Dummy</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>Footer</managed-bean-name>
        <managed-bean-class>planosactuacao.Footer</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>ViewPlano</managed-bean-name>
        <managed-bean-class>planosactuacao.ViewPlano</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
        <managed-bean-name>EnviarCorrecao</managed-bean-name>
        <managed-bean-class>planosactuacao.EnviarCorrecao</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
        <from-view-id>/EnviarCorrecao.jsp</from-view-id>
        <navigation-case>
            <from-outcome>editar_plano</from-outcome>
            <to-view-id>/EditarPlano.jsp</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>lista_planos</from-outcome>
            <to-view-id>/ListaPlanos.jsp</to-view-id>
        </navigation-case>        
    </navigation-rule>
</faces-config>
