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

Gavin King gavin.king at jboss.com
Thu Feb 22 01:03:41 EST 2007


  User: gavin   
  Date: 07/02/22 01:03:41

  Modified:    examples/dvdstore/resources/WEB-INF   navigation.xml
                        pages.xml
  Log:
  fixed broken dvdstore, and now use pages.xml
  
  Revision  Changes    Path
  1.3       +0 -56     jboss-seam/examples/dvdstore/resources/WEB-INF/navigation.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: navigation.xml
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/examples/dvdstore/resources/WEB-INF/navigation.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- navigation.xml	17 Dec 2006 07:20:05 -0000	1.2
  +++ navigation.xml	22 Feb 2007 06:03:41 -0000	1.3
  @@ -5,62 +5,6 @@
   
   <faces-config>
   
  -    <navigation-rule>
  -        <navigation-case>
  -            <from-outcome>home</from-outcome>
  -            <to-view-id>/home.xhtml</to-view-id>
  -            <redirect/>
  -        </navigation-case>
  -
  -        <navigation-case>
  -            <from-outcome>browse</from-outcome>
  -            <to-view-id>/browse.xhtml</to-view-id>
  -            <redirect/>
  -        </navigation-case>
  -
  -        <navigation-case>
  -            <from-outcome>checkout</from-outcome>
  -            <to-view-id>/checkout.xhtml</to-view-id>
  -            <redirect/>
  -        </navigation-case>
  -
  -        <navigation-case>
  -            <from-outcome>showorders</from-outcome>
  -            <to-view-id>/showorders.xhtml</to-view-id>
  -            <redirect/>
  -        </navigation-case>
  -
  -        <navigation-case>
  -            <from-outcome>newcustomer</from-outcome>
  -            <to-view-id>/newuser/account.xhtml</to-view-id>
  -            <redirect/>
  -        </navigation-case>
  -        
  -        <navigation-case>
  -            <from-outcome>logout</from-outcome>
  -            <to-view-id>/home.xhtml</to-view-id>
  -            <redirect/>
  -        </navigation-case>
  -
  -        <navigation-case>
  -            <from-outcome>ship</from-outcome>
  -            <to-view-id>/admin/ship.xhtml</to-view-id>
  -            <redirect/>
  -        </navigation-case>
  -
  -        <navigation-case>
  -            <from-outcome>accept</from-outcome>
  -            <to-view-id>/admin/accept.xhtml</to-view-id>
  -            <redirect/>
  -        </navigation-case>
  -
  -        <navigation-case>  
  -            <from-outcome>admin</from-outcome> 
  -            <to-view-id>/admin/admin.xhtml</to-view-id>
  -            <redirect />
  -        </navigation-case> 
  -    </navigation-rule>
  -
       <!-- temp workaround for facelets/myfaces bug -->
       <navigation-rule>
       	<navigation-case>
  
  
  
  1.10      +61 -1     jboss-seam/examples/dvdstore/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/dvdstore/resources/WEB-INF/pages.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -b -r1.9 -r1.10
  --- pages.xml	15 Feb 2007 03:11:16 -0000	1.9
  +++ pages.xml	22 Feb 2007 06:03:41 -0000	1.10
  @@ -7,12 +7,72 @@
   
       <page view-id="/admin/ship.xhtml"
               no-conversation-view-id="/admin/admin.xhtml"/>
  +            
       <page view-id="/admin/accept.xhtml"
               no-conversation-view-id="/admin/admin.xhtml"/>
   
  +    <page view-id="/admin/admin.xhtml">
  +    
  +        <navigation>
  +            <rule if-outcome="ship">
  +                <redirect view-id="/admin/ship.xhtml"/>
  +            </rule>
  +            <rule if-outcome="accept">
  +                <redirect view-id="/admin/accept.xhtml"/>
  +            </rule>
  +        </navigation>
  +        
  +    </page>
  +    
  +    <page view-id="/home.xhtml">
  +        <navigation>
  +            <rule if-outcome="newcustomer">
  +                <redirect view-id="/newuser/account.xhtml"/>
  +            </rule>
  +        </navigation>
  +    </page>
  +    
       <!-- this action ensures that only admin users can access anything under /admin" -->
       <page view-id="/admin/*">
         <restrict>#{s:hasRole('admin')}</restrict>
       </page>
       
  +    <page view-id="*">
  +    
  +        <navigation from-action="#{identity.logout}">
  +            <redirect view-id="/home.xhtml"/>
  +        </navigation>
  +
  +        <navigation from-action="#{identity.login}">
  +            <rule if="#{currentUser.admin}">
  +                <redirect view-id="/admin/admin.xhtml"/>
  +            </rule>
  +        </navigation>
  +
  +        <navigation>
  +        
  +            <rule if-outcome="home">
  +                <redirect view-id="/home.xhtml"/>
  +            </rule>
  +            
  +            <rule if-outcome="browse">
  +                <redirect view-id="/browse.xhtml"/>
  +            </rule>
  +
  +            <rule if-outcome="checkout">
  +                <redirect view-id="/checkout.xhtml"/>
  +            </rule>
  +
  +            <rule if-outcome="showorders">
  +                <redirect view-id="/showorders.xhtml"/>
  +            </rule>
  +
  +            <rule if-outcome="admin">
  +                <redirect view-id="/admin/admin.xhtml"/>
  +            </rule>
  +            
  +        </navigation>
  +
  +    </page>
  +    
   </pages>
  
  
  



More information about the jboss-cvs-commits mailing list