<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.2"
              xmlns="http://xmlns.jcp.org/xml/ns/javaee"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">
    <application>
        <locale-config>
            <default-locale>en</default-locale>
            <supported-locale>de</supported-locale>
            <supported-locale>es</supported-locale>
            <supported-locale>pt</supported-locale>
            <supported-locale>zh</supported-locale>
        </locale-config>
        <resource-bundle>
            <base-name>javaeetutorial.dukestutoring.web.messages.Messages</base-name>
            <var>bundle</var>
        </resource-bundle>
    </application>

    <navigation-rule>
        <from-view-id>/index.xhtml</from-view-id>
        <navigation-case>
            <from-outcome>checkinSucceeded</from-outcome>
            <to-view-id>/index.xhtml</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>fail</from-outcome>
            <to-view-id>/error.xhtml</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>atParkSucceeded</from-outcome>
            <to-view-id>/index.xhtml</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>backFromParkSucceeded</from-outcome>
            <to-view-id>/index.xhtml</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>checkoutSucceeded</from-outcome>
            <to-view-id>/index.xhtml</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>admin</from-outcome>
            <to-view-id>/admin/index.xhtml</to-view-id>
        </navigation-case>
    </navigation-rule>
    <navigation-rule>
        <from-view-id>/login.xhtml</from-view-id>
        <navigation-case>
            <from-outcome>loginUser</from-outcome>
            <to-view-id>/admin/index.xhtml</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-action>loginError</from-action>
            <to-view-id>/loginError.xhtml</to-view-id>
        </navigation-case>
        
    </navigation-rule>
    <navigation-rule>
        <from-view-id>/admin/index.xhtml</from-view-id>
        <navigation-case>
            <from-outcome>editStudent</from-outcome>
            <to-view-id>/admin/student/editStudent.xhtml</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>createStudent</from-outcome>
            <to-view-id>/admin/student/createStudent.xhtml</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>activateStudent</from-outcome>
            <to-view-id>/admin/student/activateStudent.xhtml</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>deleteStudent</from-outcome>
            <to-view-id>/admin/student/deleteStudent.xhtml</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>createGuardian</from-outcome>
            <to-view-id>/admin/guardian/createGuardian.xhtml</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>editGuardian</from-outcome>
            <to-view-id>/admin/guardian/editGuardian.xhtml</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>deleteGuardian</from-outcome>
            <to-view-id>/admin/guardian/deleteGuardian.xhtml</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>createAddress</from-outcome>
            <to-view-id>/admin/address/createAddress.xhtml</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>editAddress</from-outcome>
            <to-view-id>/admin/address/editAddress.xhtml</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>deleteAddress</from-outcome>
            <to-view-id>/admin/address/deleteAddress.xhtml</to-view-id>
        </navigation-case>
    </navigation-rule>
    <navigation-rule>
        <from-view-id>/admin/student/activateStudent.xhtml</from-view-id>
        <navigation-case>
            <from-outcome>activatedStudent</from-outcome>
            <to-view-id>/admin/index.xhtml</to-view-id>
        </navigation-case>
    </navigation-rule>
    <navigation-rule>
        <from-view-id>/admin/student/editStudent.xhtml</from-view-id>
        <navigation-case>
            <from-outcome>editedStudent</from-outcome>
            <to-view-id>/admin/index.xhtml</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>editedStudents</from-outcome>
            <to-view-id>/admin/index.xhtml</to-view-id>
        </navigation-case>
    </navigation-rule>
    <navigation-rule>
        <from-view-id>/admin/student/createStudent.xhtml</from-view-id>
        <navigation-case>
            <from-outcome>createdStudent</from-outcome>
            <to-view-id>/admin/index.xhtml</to-view-id>
        </navigation-case>
    </navigation-rule>
    <navigation-rule>
        <from-view-id>/admin/student/deleteStudent.xhtml</from-view-id>
        <navigation-case>
            <from-outcome>removedStudent</from-outcome>
            <to-view-id>/admin/index.xhtml</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>removedStudents</from-outcome>
            <to-view-id>/admin/index.xhtml</to-view-id>
        </navigation-case>
    </navigation-rule>
    <navigation-rule>
        <from-view-id>/admin/guardian/createGuardian.xhtml</from-view-id>
        <navigation-case>
            <from-outcome>createdGuardian</from-outcome>
            <to-view-id>/admin/index.xhtml</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>addedGuardians</from-outcome>
            <to-view-id>/admin/index.xhtml</to-view-id>
        </navigation-case>
    </navigation-rule>
    <navigation-rule>
        <from-view-id>/admin/guardian/editGuardian.xhtml</from-view-id>
        <navigation-case>
            <from-outcome>editedGuardian</from-outcome>
            <to-view-id>/admin/index.xhtml</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>editedGuardians</from-outcome>
            <to-view-id>/admin/index.xhtml</to-view-id>
        </navigation-case>
    </navigation-rule>
    <navigation-rule>
        <from-view-id>/admin/guardian/deleteGuardian.xhtml</from-view-id>
        <navigation-case>
            <from-outcome>removedGuardian</from-outcome>
            <to-view-id>/admin/index.xhtml</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>removedGuardians</from-outcome>
            <to-view-id>/admin/index.xhtml</to-view-id>
        </navigation-case>
    </navigation-rule>
    <navigation-rule>
        <from-view-id>/admin/address/createAddress.xhtml</from-view-id>
        <navigation-case>
            <from-outcome>createdAddress</from-outcome>
            <to-view-id>/admin/index.xhtml</to-view-id>
        </navigation-case>
    </navigation-rule>
    <navigation-rule>
        <from-view-id>/admin/address/editAddress.xhtml</from-view-id>
        <navigation-case>
            <from-outcome>editedAddress</from-outcome>
            <to-view-id>/admin/index.xhtml</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>editedAddresses</from-outcome>
            <to-view-id>/admin/index.xhtml</to-view-id>
        </navigation-case>
    </navigation-rule>
    <navigation-rule>
        <from-view-id>/admin/address/deleteAddress.xhtml</from-view-id>
        <navigation-case>
            <from-outcome>removedAddress</from-outcome>
            <to-view-id>/admin/index.xhtml</to-view-id>
        </navigation-case>
        <navigation-case>
            <from-outcome>removedAddresses</from-outcome>
            <to-view-id>/admin/index.xhtml</to-view-id>
        </navigation-case>
    </navigation-rule>
</faces-config>
