Author: steveh
Date: Fri May 13 10:56:57 2005
New Revision: 170063

URL: http://svn.apache.org/viewcvs?rev=170063&view=rev
Log:
Fix for BEEHIVE-665: page flow tutorial needs to define a begin action

Modified:
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_controllers.xml
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/site.xml

Modified: 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_controllers.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_controllers.xml?rev=170063&r1=170062&r2=170063&view=diff
==============================================================================
--- 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_controllers.xml
 (original)
+++ 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_controllers.xml
 Fri May 13 10:56:57 2005
@@ -79,11 +79,14 @@
 
     <p>
     Now that the boilerplate <code>Controller.jpf</code> is in place, we can 
begin
-    to implement the actions that determine which JSP page should actually be 
displayed.  In the above
-    model, there are 5 actions:
+    to implement the actions that determine which JSP page should actually be 
displayed.  
+       In the above
+    model, there are 5 actions, plus one more action required by all 
Controller classes, the 
+       <code>begin</code> method.  (Details about the <code>begin</code> 
method appear below.)  
     </p>
 
     <ul>
+      <li><code>begin</code></li>
       <li><code>login</code></li>
       <li><code>myPage</code></li>
       <li><code>signUp</code></li>
@@ -91,6 +94,7 @@
       <li><code>processSignUp</code></li>
     </ul>
 
+
     <p>There are two basic ways to implement actions: you can implement an 
action either as a 
                (1) <strong><em>simple action</em></strong> 
                or as an
@@ -137,26 +141,31 @@
     {
         ...
     }</source>
-
 <section>
        <title>Simple Actions</title>
     <p>
-    Two of our five actions are purely navigational, and, as such,
+    Three of our five actions are purely navigational, and, as such,
        implementable as simple actions.
-       Those actions are <code>login</code> and <code>signUp</code>.  The 
remaining actions involve conditional
-       navigational behavior, so they will be implemented as action methods. 
+       Those actions are <code>begin</code>, <code>login</code>, and 
<code>signUp</code>.  
+       The remaining actions require object oriented programming, 
+       so they will be implemented as action methods. 
        </p>
 
                <p>The simple action implementations appear below. The 
following 
                        <code>@Jpf.SimpleAction</code> annotations define a set 
of mappings between action names
                        and JSP page destinations.  When a particular action is 
invoked,
                        the user is carried to the corresponding JSP page.</p>
+       <note>Each Controller class requires a simple action or action method 
named 
+               <code>begin</code>--without it the class will not compile.  The 
begin action
+               functions as the entry-point into the Page Flow.  In this case 
the begin action
+               simply navigates the user to the index.jsp page.</note>
        <source>
 import org.apache.beehive.netui.pageflow.PageFlowController;
 import org.apache.beehive.netui.pageflow.annotations.Jpf;
 
 @Jpf.Controller(
     <strong>simpleActions={
+        @Jpf.SimpleAction(name="begin", path="index.jsp"),
         @Jpf.SimpleAction(name="login", path="login.jsp"),
         @Jpf.SimpleAction(name="signUp", path="signup.jsp"),
     }
@@ -211,6 +220,7 @@
 
 @Jpf.Controller(
     simpleActions={
+        @Jpf.SimpleAction(name="begin", path="index.jsp"),
         @Jpf.SimpleAction(name="login", path="login.jsp"),
         @Jpf.SimpleAction(name="signUp", path="signup.jsp"),
         @Jpf.SimpleAction(name="processLogin", path="mypage.jsp"),
@@ -658,7 +668,7 @@
 </section>
   </section>
 <section><title>Form Validation</title>
-    <p>[tbd]</p>
+    <p>For details on form validation see the topic <a 
href="site:pageflow_valid">Data Validation</a></p>
        
        </section>
   <section id="next">

Modified: 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml?rev=170063&r1=170062&r2=170063&view=diff
==============================================================================
--- 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml
 (original)
+++ 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml
 Fri May 13 10:56:57 2005
@@ -131,17 +131,30 @@
                                <p>Open the file 
<code>C:/beehive_projects/pageflow_tutorial/Controller.jpf</code>. 
                                        </p>
                                <p>The Controller file is an ordinary Java 
class with methods and annotations.</p>
-                               <p>Notice that a Page Flow controller class 
must extend 
+                               <p>A Page Flow controller class must extend 
                                        
<code>org.apache.beehive.netui.pageflow.PageFlowController</code> and be 
decorated by the
                                        annotation 
<code>@Jpf.Controller</code>.</p>
                                <p>The <code>onCreate()</code> method is 
executed whenever the Controller class is first 
                                        instantiated.  The 
<code>onDestroy()</code> method is executed when the Controller 
                                        class is destroyed.</p>
+                               <p>After the <code>onCreate()</code> method is 
run, the Page Flow runtime
+                                       searches for (and runs) a method or 
action named <code>begin</code>.
+                                       In this case, there is an action named 
<code>begin</code>:
+                                       </p>
+                               <source>@Jpf.SimpleAction(name="begin", 
path="index.jsp")</source>
+                               <p>The begin action <em>could</em> have been 
expressed using method syntax: </p>
+                               <source>@Jpf.Action(
+    forwards = { 
+        @Jpf.Forward(name="success", path="index.jsp")
+    }
+)
+public Forward begin()
+{
+    return new Forward("success");
+}</source>
+<p>But we have used the action syntax for the sake of syntactical 
simplicty.</p>
                                <p>The Controller class is instantiated when a 
user calls it via the URL:</p>
                                
<source>http://localhost:8080/tutorial_pageflow/Controller.jpf</source>
-                           <p>When a Controller class is instantiated, first 
the <code>onCreate()</code> method is run,
-                                       and then the action <code>begin</code> 
is run.  In this case, the <code>begin</code>
-                                       action forwards the user to the 
<code>index.jsp</code> page.</p>
                                
<p><strong><code>Controller.jpf</code></strong></p>
                 <source>import javax.servlet.http.HttpSession;
 

Modified: 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/site.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/site.xml?rev=170063&r1=170062&r2=170063&view=diff
==============================================================================
--- 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/site.xml 
(original)
+++ 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/site.xml 
Fri May 13 10:56:57 2005
@@ -37,7 +37,7 @@
             <pageflow_sharedFlow label="Shared Flow" 
href="pageflow/sharedFlow.html"/>
             <pageflow_popups label="Popup Windows" 
href="pageflow/popupWindows.html"/>
             <pageflow_valid label="Validation" 
href="pageflow/validation.html"/>
-            <pageflow_valid label="Java Server Faces" 
href="pageflow/jsf.html"/>
+            <pageflow_jsf label="Java Server Faces" href="pageflow/jsf.html"/>
             <pageflow_servlet_adapter label="Servlet Container Adapters" 
href="pageflow/servlet_container_adapters.html"/>
             <devmode label="Development Mode" 
href="development/dev_mode.html"/>
             <!--<pageflow_programming label="Page Flow Programming" 
href="pageflow/guide.html"/>-->


Reply via email to