You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sk...@apache.org on 2008/02/11 23:08:16 UTC

svn commit: r620632 - in /myfaces/orchestra/trunk/examples/src/main/webapp: WEB-INF/applicationContext.xml WEB-INF/faces-config.xml default.css start.jsp

Author: skitching
Date: Mon Feb 11 14:08:15 2008
New Revision: 620632

URL: http://svn.apache.org/viewvc?rev=620632&view=rev
Log:
Add simple master/detail example without persistence.

Modified:
    myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/applicationContext.xml
    myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/faces-config.xml
    myfaces/orchestra/trunk/examples/src/main/webapp/default.css
    myfaces/orchestra/trunk/examples/src/main/webapp/start.jsp

Modified: myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/applicationContext.xml
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/applicationContext.xml?rev=620632&r1=620631&r2=620632&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/applicationContext.xml (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/applicationContext.xml Mon Feb 11 14:08:15 2008
@@ -190,7 +190,19 @@
 		class="org.apache.myfaces.examples.configurator.model.Initialization">
 	</bean>
 
-	<!-- the beans -->
+
+    <!-- the beans -->
+
+    <!-- reservationBook example -->
+    <bean name="reservationBookView"
+        class="org.apache.myfaces.examples.simple.backings.ReservationBookView"
+        scope="conversation.manual"/>
+
+    <bean name="reservationView"
+        class="org.apache.myfaces.examples.simple.backings.ReservationView"
+        scope="conversation.access"/>
+        
+    <!-- PC Configurator Example -->
 	<bean
 		name="configuratorData"
 		class="org.apache.myfaces.examples.configurator.backings.ConfiguratorData"

Modified: myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/faces-config.xml?rev=620632&r1=620631&r2=620632&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/faces-config.xml (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/WEB-INF/faces-config.xml Mon Feb 11 14:08:15 2008
@@ -27,7 +27,42 @@
 		<view-handler>org.apache.myfaces.orchestra.urlParamNav.UrlParameterViewHandler</view-handler>
 	</application>
 
-	<navigation-rule>
+    <navigation-rule>
+        <description>rules leading from the reservationBook view</description>
+        <from-view-id>/simple/reservationBook.jsp</from-view-id>
+        <navigation-case>
+            <from-outcome>edit</from-outcome>
+            <to-view-id>/simple/reservation.jsp</to-view-id>
+            <redirect/>
+        </navigation-case>
+        <navigation-case>
+            <from-outcome>new</from-outcome>
+            <to-view-id>/simple/reservation.jsp</to-view-id>
+            <redirect/>
+        </navigation-case>
+    </navigation-rule>
+
+    <navigation-rule>
+        <description>rules leading from the reservation view</description>
+        <from-view-id>/simple/reservation.jsp</from-view-id>
+        <navigation-case>
+            <from-outcome>cancel</from-outcome>
+            <to-view-id>/simple/reservationBook.jsp</to-view-id>
+            <redirect/>
+        </navigation-case>
+        <navigation-case>
+            <from-outcome>save</from-outcome>
+            <to-view-id>/simple/reservationBook.jsp</to-view-id>
+            <redirect/>
+        </navigation-case>
+        <navigation-case>
+            <from-outcome>delete</from-outcome>
+            <to-view-id>/simple/reservationBook.jsp</to-view-id>
+            <redirect/>
+        </navigation-case>
+    </navigation-rule>
+    
+    <navigation-rule>
 		<description>orderHead complete / checkout</description>
 		<navigation-case>
 			<from-action>#{configuratorData.checkoutAction}</from-action>

Modified: myfaces/orchestra/trunk/examples/src/main/webapp/default.css
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/default.css?rev=620632&r1=620631&r2=620632&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/default.css (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/default.css Mon Feb 11 14:08:15 2008
@@ -126,24 +126,29 @@
 	text-align: right;
 }
 
-.section *
+div.section *
 {
 	margin-left: 20px;
 }
 
-.section h3
+div.section h3
 {
 	font-weight: bold;
 	margin-left: 0px;
 }
 
-.example *
+div.example *
 {
 	margin-left: 20px;
 }
 
-.example A
+div.example A
 {
 	font-style: italic;
 	margin-left: 0px;
 }
+
+div.pagedoc
+{
+	border-bottom: 2px solid black;
+}	

Modified: myfaces/orchestra/trunk/examples/src/main/webapp/start.jsp
URL: http://svn.apache.org/viewvc/myfaces/orchestra/trunk/examples/src/main/webapp/start.jsp?rev=620632&r1=620631&r2=620632&view=diff
==============================================================================
--- myfaces/orchestra/trunk/examples/src/main/webapp/start.jsp (original)
+++ myfaces/orchestra/trunk/examples/src/main/webapp/start.jsp Mon Feb 11 14:08:15 2008
@@ -24,7 +24,7 @@
 <%@ taglib uri="http://myfaces.apache.org/sandbox" prefix="s"%>
 
 <f:view>
-  <%@ include file="header.jspf"%>
+  <%@ include file="/header.jspf"%>
 
   <div class="section" id="about">
     <h3>About This Web Application</h3>
@@ -42,18 +42,24 @@
       use these examples as "good practice" for anything other than the use
       of Orchestra itself.
     </p>
+    <p>
+      Note: Some of the examples demonstrate the use of Annotations. This
+      webapp therefore requires java 1.5 to run. However Orchestra Core
+      only requires java 1.4.
+    </p>
   </div>
 
   <div class="section" id="examples.simple">
     <h3>Simple Examples</h3>
     <div class="example">
-      <h:outputLink value="simple/parent.jsp">
-        <h:outputText value="Parent/Detail"/>
+      <h:outputLink value="simple/reservationBook.faces">
+        <h:outputText value="A Hotel Reservations Book"/>
       </h:outputLink>
       <p>
-        This demonstrates the use of the "access" lifetime, where a bean
-        instance remains in memory as long as a view that accesses it is being
-         displayed, and is discarded when some other view is accessed.
+        This very simple two-page webapp demonstrates the use of the "access"
+        lifetime, where a bean instance remains in memory as long as a view
+        that accesses it is being displayed, and is discarded when some other
+        view is accessed.
       </p>
     </div>
   </div>
@@ -114,5 +120,5 @@
   
   </div>
 
-  <%@ include file="footer.jspf"%>
+  <%@ include file="/footer.jspf"%>
 </f:view>