[jboss-cvs] jboss-seam/examples/booking/resources/WEB-INF ...
Gavin King
gavin.king at jboss.com
Sat Dec 16 20:04:51 EST 2006
User: gavin
Date: 06/12/16 20:04:51
Modified: examples/booking/resources/WEB-INF pages.xml web.xml
Log:
reworked the booking example to take advantage of ochestration from pages.xml
Revision Changes Path
1.7 +104 -5 jboss-seam/examples/booking/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/booking/resources/WEB-INF/pages.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- pages.xml 16 Dec 2006 14:38:42 -0000 1.6
+++ pages.xml 17 Dec 2006 01:04:51 -0000 1.7
@@ -3,7 +3,106 @@
"http://jboss.com/products/seam/pages-1.1.dtd">
<pages no-conversation-view-id="/main.xhtml">
- <page view-id="/hotel.xhtml" conversation-required="true">View hotel: #{hotel.name}</page>
- <page view-id="/book.xhtml" conversation-required="true">Book hotel: #{hotel.name}</page>
- <page view-id="/confirm.xhtml" conversation-required="true">Confirm: #{booking.description}</page>
+
+ <page view-id="/hotel.xhtml"
+ conversation-required="true">
+
+ <description>View hotel: #{hotel.name}</description>
+
+ <navigation action="#{hotelBooking.bookHotel}">
+ <default>
+ <redirect view-id="/book.xhtml"/>
+ </default>
+ </navigation>
+
+ </page>
+
+ <page view-id="/book.xhtml"
+ conversation-required="true">
+
+ <description>Book hotel: #{hotel.name}</description>
+
+ <navigation outcome="#{hotelBooking.bookingValid}">
+ <case outcome="true">
+ <redirect view-id="/confirm.xhtml"/>
+ </case>
+ </navigation>
+
+ </page>
+
+ <page view-id="/confirm.xhtml"
+ conversation-required="true">
+
+ <description>Confirm booking: #{booking.description}</description>
+
+ <navigation action="#{hotelBooking.confirm}">
+ <default>
+ <redirect view-id="/main.xhtml"/>
+ </default>
+ </navigation>
+
+ </page>
+
+ <page view-id="/password.xhtml">
+
+ <navigation outcome="#{changePassword.changed}">
+ <case outcome="true">
+ <redirect view-id="/main.xhtml"/>
+ </case>
+ </navigation>
+
+ </page>
+
+ <page view-id="/register.xhtml">
+
+ <navigation outcome="#{register.registered}">
+ <case outcome="true">
+ <redirect view-id="/home.xhtml"/>
+ </case>
+ </navigation>
+
+ </page>
+
+ <page view-id="/home.xhtml">
+
+ <navigation outcome="#{loggedIn==null}">
+ <case outcome="false">
+ <redirect view-id="/main.xhtml"/>
+ </case>
+ </navigation>
+
+ </page>
+
+ <page view-id="/main.xhtml">
+
+ <navigation action="#{hotelBooking.selectHotel(hot)}">
+ <default>
+ <redirect view-id="/hotel.xhtml"/>
+ </default>
+ </navigation>
+
+ </page>
+
+ <page view-id="*">
+
+ <navigation action="#{logout.logout}">
+ <default>
+ <redirect view-id="/home.xhtml"/>
+ </default>
+ </navigation>
+
+ <navigation action="#{hotelBooking.cancel}">
+ <default>
+ <redirect view-id="/main.xhtml"/>
+ </default>
+ </navigation>
+
+ <navigation>
+ <case outcome="login">
+ <redirect view-id="/home.xhtml"/>
+ </case>
+ </navigation>
+
+ </page>
+
</pages>
\ No newline at end of file
1.36 +0 -5 jboss-seam/examples/booking/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/booking/resources/WEB-INF/web.xml,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- web.xml 6 Dec 2006 05:18:31 -0000 1.35
+++ web.xml 17 Dec 2006 01:04:51 -0000 1.36
@@ -8,11 +8,6 @@
<session-timeout>3</session-timeout>
</session-config>
- <context-param>
- <param-name>javax.faces.CONFIG_FILES</param-name>
- <param-value>/WEB-INF/navigation.xml</param-value>
- </context-param>
-
<!-- Ajax4jsf (must come first!) -->
<filter>
More information about the jboss-cvs-commits
mailing list