<?xml version="1.0"?>

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

<!-- =========== FACES CONFIGURATION FILE ================================== -->

<faces-config>

  <application>
    <message-bundle>org.sakaiproject.tool.presentation.bundle.Messages</message-bundle>
    <locale-config>
      <default-locale>en</default-locale>
    </locale-config>
  </application>

  <!-- =================== Tool Beans ============== -->

	<managed-bean>
		<description>Presentation Tool Bean</description>
		<managed-bean-name>PresentationTool</managed-bean-name>
		<managed-bean-class>org.sakaiproject.tool.presentation.PresentationTool</managed-bean-class>
		<managed-bean-scope>session</managed-bean-scope>

		<!-- Inject the PresentationManager into prMgr. -->
		<managed-property>
			<description>Service Dependency: Presentation Service</description>
			<property-name>prMgr</property-name>
			<value>#{Components["org.sakaiproject.api.app.presentation.PresentationManager"]}</value>
		</managed-property>

		<managed-property>
			<description>Service Dependency: Id Manager</description>
			<property-name>idMgr</property-name>
			<value>#{Components["org.osid.id.IdManager"]}</value>
		</managed-property>

	</managed-bean>

        <navigation-rule>
          <from-view-id>/presentation/*</from-view-id>

          <navigation-case>
            <from-outcome>main</from-outcome>
            <to-view-id>/presentation/main.jsp</to-view-id>
            <redirect/>
          </navigation-case>

          <navigation-case>
            <from-outcome>view</from-outcome>
            <to-view-id>/presentation/view.jsp</to-view-id>
            <redirect/>
          </navigation-case>

          <navigation-case>
            <from-outcome>show</from-outcome>
            <to-view-id>/presentation/show.jsp</to-view-id>
            <redirect/>
          </navigation-case>

          <navigation-case>
            <from-outcome>join</from-outcome>
            <to-view-id>/presentation/join.jsp</to-view-id>
            <redirect/>
          </navigation-case>

        </navigation-rule>

</faces-config>
