<?xml version='1.0' encoding='UTF-8'?>
<!--
Copyright 2004 The Apache Software Foundation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

-->

<!DOCTYPE faces-config PUBLIC
  "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
  "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">

<faces-config>

  <application>
    <locale-config>
      <default-locale>en</default-locale>
      <supported-locale>de</supported-locale>
      <supported-locale>fr</supported-locale>
      <supported-locale>es</supported-locale>
    </locale-config>
  </application>

  <navigation-rule>
    <description>
        The decision rule used by the NavigationHandler to
        determine which view must be displayed after the
        current view, greeting.jsp is processed.
    </description>
    <from-view-id>/greeting.jsp</from-view-id>
    <navigation-case>
        <description>
            Indicates to the NavigationHandler that the response.jsp
            view must be displayed if the Action referenced by a 
            UICommand component on the greeting.jsp view returns 
            the outcome "success".
        </description>
      <from-outcome>success</from-outcome>
      <to-view-id>/response.jsp</to-view-id>
    </navigation-case>
  </navigation-rule>
  
  <navigation-rule>
    <description>
        The decision rule used by the NavigationHandler to
        determine which view must be displayed after the
        current view, greeting.jsp is processed.
    </description>
    <from-view-id>/greeting.jsp</from-view-id>
    <navigation-case>
        <description>
            Indicates to the NavigationHandler that the response.jsp
            view must be displayed if the Action referenced by a 
            UICommand component on the greeting.jsp view returns 
            the outcome "treeView".
        </description>
      <from-outcome>treeView</from-outcome>
      <to-view-id>/tree.jsp</to-view-id>
    </navigation-case>
  </navigation-rule>
  
  <navigation-rule>
    <description>
        The decision rule used by the NavigationHandler to
        determine which view must be displayed after the
        current view, greeting.jsp is processed.
    </description>
    <from-view-id>/greeting.jsp</from-view-id>
    <navigation-case>
        <description>
            Indicates to the NavigationHandler that the response.jsp
            view must be displayed if the Action referenced by a 
            UICommand component on the greeting.jsp view returns 
            the outcome "treeView".
        </description>
      <from-outcome>treeTableView</from-outcome>
      <to-view-id>/treeTable.jsp</to-view-id>
    </navigation-case>
  </navigation-rule>

  <navigation-rule>
    <from-view-id>/tree.jsp</from-view-id>
    <navigation-case>
      <from-outcome>guessGameStartFromTree</from-outcome>
      <to-view-id>/greeting.jsp</to-view-id>
    </navigation-case>
  </navigation-rule>
  
  <navigation-rule>
    <from-view-id>/treeTable.jsp</from-view-id>
    <navigation-case>
      <from-outcome>guessGameStartFromTreeTable</from-outcome>
      <to-view-id>/greeting.jsp</to-view-id>
    </navigation-case>
  </navigation-rule>

  <navigation-rule>
   <description>
        The decision rules used by the NavigationHandler to
        determine which view must be displayed after the
        current view, response.jsp is processed.
    </description>
    <from-view-id>/response.jsp</from-view-id>
    <navigation-case>
        <description>
            Indicates to the NavigationHandler that the greeting.jsp
            view must be displayed if the Action referenced by a 
            UICommand component on the response.jsp view returns 
            the outcome "success".
        </description>
        <from-outcome>success</from-outcome>
      <to-view-id>/greeting.jsp</to-view-id>
    </navigation-case>
  </navigation-rule>

	<navigation-rule>
        <from-view-id>/WEB-INF/view/calendar-view.jsp</from-view-id> 
		<navigation-case>
			<from-outcome>editNotes</from-outcome>
            <to-view-id>/WEB-INF/view/calendar-notes.jsp</to-view-id>
		</navigation-case>
	</navigation-rule>

	<navigation-rule>
        <from-view-id>/WEB-INF/view/calendar-notes.jsp</from-view-id> 
		<navigation-case>
			<from-outcome>returnFromNotes</from-outcome>
            <to-view-id>/WEB-INF/view/calendar-view.jsp</to-view-id>
		</navigation-case>
	</navigation-rule>
	
    <managed-bean>
        <managed-bean-name>calendar</managed-bean-name>
        <managed-bean-class>org.apache.portals.applications.desktop.calendar.CalendarBean</managed-bean-class>
        <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>

  <managed-bean>
    <description>
      The "backing file" bean that backs up the guessNumber webapp
    </description>
    <managed-bean-name>UserNumberBean</managed-bean-name>
    <managed-bean-class>guessNumber.UserNumberBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
      <property-name>minimum</property-name>
      <property-class>int</property-class>
      <value>0</value>
    </managed-property>
    <managed-property>
      <property-name>maximum</property-name>
      <property-class>int</property-class>
      <value>10</value>
    </managed-property>

  </managed-bean>
  
  <!-- Managed bean for tree -->
  <managed-bean>
    <managed-bean-name>treeTable</managed-bean-name>
    <managed-bean-class>guessNumber.TreeTable</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
  </managed-bean>
  


</faces-config>
