[jboss-cvs] jboss-seam/examples/spring/resources/WEB-INF ...

Norman Richards norman.richards at jboss.com
Mon Feb 19 16:53:24 EST 2007


  User: nrichards
  Date: 07/02/19 16:53:24

  Modified:    examples/spring/resources/WEB-INF     components.xml
                        pages.xml web.xml
  Added:       examples/spring/resources/WEB-INF     navigation.xml
  Log:
  booking
  
  Revision  Changes    Path
  1.5       +40 -14    jboss-seam/examples/spring/resources/WEB-INF/components.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: components.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/spring/resources/WEB-INF/components.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- components.xml	19 Feb 2007 19:30:26 -0000	1.4
  +++ components.xml	19 Feb 2007 21:53:24 -0000	1.5
  @@ -1,14 +1,40 @@
  +<?xml version="1.0" encoding="UTF-8"?>
   <components xmlns="http://jboss.com/products/seam/components"
  -            xmlns:spring="http://jboss.com/products/seam/spring"
               xmlns:core="http://jboss.com/products/seam/core"
  -            xmlns:framework="http://jboss.com/products/seam/framework">
  +            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  +            xsi:schemaLocation=
  +                "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-1.1.xsd 
  +                 http://jboss.com/products/seam/components http://jboss.com/products/seam/components-1.1.xsd">
   
  +    <core:init debug="true"/>    
   
  -    <core:entity-manager-factory name="bookingDatabase"/>
  -    <core:managed-persistence-context name="em" 
  -                                      auto-create="true" 
  -                                      entity-manager-factory="#{bookingDatabase}"/>
  +    <core:manager conversation-timeout="120000" 
  +                  concurrent-request-timeout="500"
  +                  conversation-id-parameter="cid"
  +                  conversation-is-long-running-parameter="clr"/>
       
  +    <core:hibernate-session-factory name="hibernateSessionFactory"/>
  +    
  +    <core:managed-hibernate-session name="bookingDatabase"
  +                                    auto-create="true"/>
  +    
  +</components>
  +
  +<!--
  +<components>
  +
  +    <component name="org.jboss.seam.core.init">
  +        <property name="debug">true</property>
  +    </component>
  +
  +    <component name="org.jboss.seam.core.manager">
  +        <property name="conversationTimeout">120000</property>
  +    </component>
  +    
  +    <component name="bookingDatabase" 
  +              class="org.jboss.seam.core.ManagedHibernateSession"/>
  +    <component name="hibernateSessionFactory"
  +              class="org.jboss.seam.core.HibernateSessionFactory"/> 
   
  -    <core:init debug="true" jndi-pattern="@jndiPattern@" />
   </components>
  +-->
  
  
  
  1.6       +101 -24   jboss-seam/examples/spring/resources/WEB-INF/pages.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: pages.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/spring/resources/WEB-INF/pages.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- pages.xml	19 Feb 2007 19:30:26 -0000	1.5
  +++ pages.xml	19 Feb 2007 21:53:24 -0000	1.6
  @@ -2,13 +2,55 @@
     "-//JBoss/Seam Pages Configuration DTD 1.1//EN"
     "http://jboss.com/products/seam/pages-1.1.dtd">
   
  -<pages>
  -    <page view-id="/main.xhtml"
  -          login-required="true">
  +<pages no-conversation-view-id="/main.xhtml">
  +
  +    <page view-id="/register.xhtml">
  +    
  +        <action if="#{validation.failed}"
  +           execute="#{register.invalid}"/>
  +    
  +        <navigation>
  +            <rule if="#{register.registered}">
  +                <redirect view-id="/home.xhtml"/>
  +            </rule>
  +        </navigation>
  +        
  +    </page>
  +
  +    <page view-id="/home.xhtml">
  +    
  +        <navigation>
  +            <rule if="#{login.loggedIn}">
  +                <redirect view-id="/main.xhtml"/>
  +            </rule>
  +        </navigation>
  +        
  +    </page>
  +    
  +    <page view-id="/password.xhtml">
  +    
  +        <navigation>
  +            <rule if="#{changePassword.changed}">
  +                <redirect view-id="/main.xhtml"/>
  +            </rule>
  +        </navigation>
  +        
  +    </page>
  +
  +    <page view-id="/main.xhtml">
  +    
  +        <action execute="#{login.validateLogin}"/>
  +        
  +        <navigation from-action="#{login.validateLogin}">
  +            <rule if="#{not login.loggedIn}">
  +                <redirect view-id="/home.xhtml"/>
  +            </rule>
  +        </navigation>
           
           <navigation from-action="#{hotelBooking.selectHotel(hot)}">
               <redirect view-id="/hotel.xhtml"/>
           </navigation>
  +        
       </page>
   
       <page view-id="/hotel.xhtml"
  @@ -21,4 +63,39 @@
           </navigation>
           
       </page>
  +
  +	<page view-id="/book.xhtml" 
  +          conversation-required="true">
  +          
  +        <description>Book hotel: #{hotel.name}</description>
  +        
  +        <navigation from-action="#{hotelBooking.setBookingDetails}">
  +            <redirect view-id="/confirm.xhtml"/>
  +        </navigation>
  +        
  +    </page>
  +
  +	<page view-id="/confirm.xhtml" 
  +          conversation-required="true">
  +          
  +        <description>Confirm booking: #{booking.description}</description>
  +        
  +        <navigation from-action="#{hotelBooking.confirm}">
  +            <redirect view-id="/main.xhtml"/>
  +        </navigation>
  +        
  +    </page>
  +    
  +    <page view-id="*">
  +    
  +        <navigation from-action="#{login.logout}">
  +            <redirect view-id="/home.xhtml"/>
  +        </navigation>
  +
  +        <navigation from-action="#{hotelBooking.cancel}">
  +            <redirect view-id="/main.xhtml"/>
  +        </navigation>
  +        
  +    </page>
  +
   </pages>
  
  
  
  1.3       +1 -1      jboss-seam/examples/spring/resources/WEB-INF/web.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: web.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/spring/resources/WEB-INF/web.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- web.xml	12 Feb 2007 21:14:23 -0000	1.2
  +++ web.xml	19 Feb 2007 21:53:24 -0000	1.3
  @@ -14,7 +14,7 @@
   
       <context-param>
           <param-name>contextConfigLocation</param-name>
  -        <param-value>classpath:/spring-beans.xml</param-value>
  +        <param-value>classpath:/applicationContext.xml</param-value>
       </context-param>
       
       <filter>
  
  
  
  1.1      date: 2007/02/19 21:53:24;  author: nrichards;  state: Exp;jboss-seam/examples/spring/resources/WEB-INF/navigation.xml
  
  Index: navigation.xml
  ===================================================================
  <?xml version="1.0" encoding="UTF-8"?>
  
  <!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-config>
      <navigation-rule>
          <navigation-case>
              <from-outcome>login</from-outcome>
              <to-view-id>/home.xhtml</to-view-id>
  
              <redirect />
          </navigation-case>
  
          <navigation-case>
              <from-outcome>register</from-outcome>
              <to-view-id>/register.xhtml</to-view-id>
  
              <redirect />
          </navigation-case>
  
          <navigation-case>
              <from-outcome>password</from-outcome>
              <to-view-id>/password.xhtml</to-view-id>
  
              <redirect />
          </navigation-case>
  
          <navigation-case>
              <from-outcome>main</from-outcome>
              <to-view-id>/main.xhtml</to-view-id>
  
              <redirect />
          </navigation-case>
  
          <navigation-case>
              <from-outcome>hotel</from-outcome>
              <to-view-id>/hotel.xhtml</to-view-id>
              <redirect />
          </navigation-case>
      </navigation-rule>
  
      <navigation-rule>
          <from-view-id>/hotel.xhtml</from-view-id>
          <navigation-case>
              <from-outcome>book</from-outcome>
              <to-view-id>/book.xhtml</to-view-id>
  
              <redirect />
          </navigation-case>
      </navigation-rule>
  
  
      <navigation-rule>
          <from-view-id>/book.xhtml</from-view-id>
  
          <navigation-case>
              <from-outcome>confirm</from-outcome>
              <to-view-id>/confirm.xhtml</to-view-id>
  
              <redirect />
          </navigation-case>
      </navigation-rule>
  
  
      <navigation-rule>
          <from-view-id>/confirm.xhtml</from-view-id>
          <navigation-case>
              <from-outcome>confirmed</from-outcome>
              <to-view-id>/main.xhtml</to-view-id>
  
              <redirect/>
          </navigation-case>
  
          <navigation-case>
              <from-outcome>back</from-outcome>
              <to-view-id>/book.xhtml</to-view-id>
  
              <redirect />
          </navigation-case>
      </navigation-rule>
  </faces-config>
  
  
  
  



More information about the jboss-cvs-commits mailing list