Author: steveh
Date: Mon Jan 10 14:58:19 2005
New Revision: 124836

URL: http://svn.apache.org/viewcvs?view=rev&rev=124836
Log:
Latest content on page flow conceptual doc.  
Re-casting the method-focused doc as action-focused doc.
Modified:
   
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/config/netui-config.xml
   
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_controllers.xml
   
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_overview.xml
   
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml
   
incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-conditional-forward.dia
   
incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-conditional-forward.png
   
incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1.dia
   
incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1.png

Modified: 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/config/netui-config.xml
Url: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/config/netui-config.xml?view=diff&rev=124836&p1=incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/config/netui-config.xml&r1=124835&p2=incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/config/netui-config.xml&r2=124836
==============================================================================
--- 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/config/netui-config.xml
       (original)
+++ 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/config/netui-config.xml
       Mon Jan 10 14:58:19 2005
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" 
"http://forrest.apache.org/dtd/document-v20.dtd";>
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" 
"http://forrest.apache.org/dtd/document-v20.dtd";>
 <document>
     <header>
         <title>Reference Documentation: netui-config.xml File</title>
@@ -157,7 +157,7 @@
         </global>
     </pageflow-action-interceptors>]]></source>
  <p><strong>Also see:</strong></p>
- <p><link 
href="../../apidocs/classref_pageflows/org/apache/beehive/netui/pageflow/interceptor/ActionInterceptor.html">Interface
 org.apache.beehive.netui.pageflow.interceptor.ActionInterceptor</link></p>
+ <p><a 
href="../../apidocs/classref_pageflows/org/apache/beehive/netui/pageflow/interceptor/ActionInterceptor.html">Interface
 org.apache.beehive.netui.pageflow.interceptor.ActionInterceptor</a></p>
             </section>
             <section>
                 <title>&lt;pageflow-config&gt;</title>
@@ -255,8 +255,8 @@
         </section>
         <section>
                <title>Related Topics</title>
-<p><link 
href="../../apidocs/classref_pageflows/org/apache/beehive/netui/util/config/ConfigUtil.html">Class
 org.apache.beehive.netui.util.config.ConfigUtil</link></p>
-<p><link 
href="../../apidocs/classref_pageflows/org/apache/beehive/netui/pageflow/interceptor/ActionInterceptor.html">Interface
 org.apache.beehive.netui.pageflow.interceptor.ActionInterceptor</link></p>
+<p><a 
href="../../apidocs/classref_pageflows/org/apache/beehive/netui/util/config/ConfigUtil.html">Class
 org.apache.beehive.netui.util.config.ConfigUtil</a></p>
+<p><a 
href="../../apidocs/classref_pageflows/org/apache/beehive/netui/pageflow/interceptor/ActionInterceptor.html">Interface
 org.apache.beehive.netui.pageflow.interceptor.ActionInterceptor</a></p>
         </section>
         
     </body>

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?view=diff&rev=124836&p1=incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_controllers.xml&r1=124835&p2=incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_controllers.xml&r2=124836
==============================================================================
--- 
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
      Mon Jan 10 14:58:19 2005
@@ -10,21 +10,22 @@
     <title>Introduction</title>
 
     <p>
-    As introduced in the <a href="pageflow_overview.html">Page Flow 
Overview</a>, the
+    This topic explains the basics behind implementing 
<strong>controller</strong> files and 
+       <strong>actions</strong>.
+       As introduced in the previous topic (<a 
href="pageflow_overview.html">Page Flow Overview</a>) the
     following model will be used.
     </p>
 
     <p>
       <img src="images/impl-flow-1.png" alt="implementation page flow"/>
     </p>
-
+    
   </section>
 
   <section id="starting_the_controller">
-    <title>Starting the Controller</title>
-
+    <title>Starting the Controller File</title>
     <p>
-    The first step to writing a controller is to simply create a new basic 
class
+    The first step to writing a controller file is to create a new basic class
     named <code>Controller.jpf</code>.  The <code>jpf</code> extension alerts 
the
     build that this class is a special JPF controller class, instead of a 
typical
     Java class. 
@@ -66,7 +67,38 @@
 {
 }
 </source>
+<p></p>
+<!--
+<p>
+       Finally, each controller class must contain a method that is
+</p>
+<ol>
+       <li>named <code>begin</code></li>
+       <li>returns a <code>org.apache.beehive.netui.pageflow.Forward</code> 
object</li>
+       <li>is decorated with the <code>@Jpf.Action</code> annotation</li>
+</ol>
+<source>
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+<strong>import org.apache.beehive.netui.pageflow.Forward;</strong>
 
[EMAIL PROTECTED]
+public class Controller 
+    extends PageFlowController
+{
+<strong>    @Jpf.Action
+    Forward begin()
+    {
+        return new Forward();
+    }</strong>
+}
+</source>
+       <p>
+       The <code>@Jpf.Action</code> annotation marks the <code>begin()</code> 
method as an <em>action</em> method.
+       Action s  
+       </p>
+-->    
+       
     <p>
     Now we have the beginnings of a controller implementation.
     </p>
@@ -78,72 +110,153 @@
 
     <p>
     Now that the boilerplate <code>Controller.jpf</code> is in place, we can 
begin
-    to define the methods that intercept navigation and perform the necessary 
logic
-    to determine which JSP page should actually be displayed.  In the above
-    model, these are:
+    to implement the actions that determine which JSP page should actually be 
displayed.  In the above
+    model, there are 5 actions:
     </p>
 
     <ul>
-      <li><code>signUp()</code></li>
-      <li><code>login()</code></li>
-      <li><code>myPage()</code></li>
+      <li><code>login</code></li>
+      <li><code>myPage</code></li>
+      <li><code>signUp</code></li>
+      <li><code>processLogin</code></li>
+      <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
+       (2) <strong><em>action method</em></strong>.</p>
+       
+    <p><strong>Simple Actions</strong> are class-level annotations, that is, 
annotations that decorate the 
+       controller class.  (You can also think of simple actions as 
<em>configurations</em>
+       of the controller class.)  Syntactically they appear as follows:</p>
+       
+       <source>@Jpf.Controller(
+    <strong>simpleActions={
+        @Jpf.SimpleAction( name="someName", path="somePage.jsp", <em>[...other 
properties...]</em> )
+    }</strong>
+)
+public class Controller
+{
+...
+}</source>
+       
+       <p>Simple actions can handle navigation, form submission, and form 
validation.  
+               If that's is all your action needs to accomplish, you should 
implement the action as 
+               a simple action.  What simple actions <em>can't</em> do is 
handle decision logic.  If your action
+               needs to make a decision and conditionally execute code based 
on that decision, you should 
+               implement the action as an <em>action method</em>.</p>
+               
+       <p><strong>Action Methods</strong> are Java methods that have been 
endowed with all of the magic of 
+               actions: that is, they can navigate users around the Page Flow, 
handle form submissions, validate form 
+               data, handle decision logic, etc.  (You can also think of the 
action methods as 
+               <em>configurations</em> of individual methods, in contrast to 
simple actions, which configure the
+               entire class.)  Syntactically speaking, an action method is a 
Java method that 
+               (1) returns the type 
<code>org.apache.beehive.netui.pageflow.Forward</code> and (2) is 
+               decorated with the <code>@Jpf.Action/@Jpf.Forward</code> 
annotations:</p>
+               
+       <source>    <strong>@Jpf.Action</strong>(
+        forwards = {
+            <strong>@Jpf.Forward( name="someName", path="somePath.jsp", 
<em>[...other properties...]</em> )</strong>
+        }
+    )
+    public <strong>Forward</strong> someMethod()
+    {
+        ...
+    }</source>
+
+<section>
+       <title>Simple Actions</title>
     <p>
-    For the time being, we are going to ignore the methods that process form 
input.
+    For the time being, we are going to imagine that our five actions are 
purely navigational, and, as such,
+       implementable as simple actions.
+       Of course, some of these actions will have to do more, like contain 
decision
+       logic, and so they will have to re-implemented&#8212;but we'll get to 
that later.
     </p>
 
-    <p>
-    When a controller method completes, it must return an indication of what 
page to
-    display to the user.  This is accomplished by returning a 
<code>org.apache.beehive.netui.pageflow.Forward</code>
-    object.  
+               <p>The 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>
+<source>
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
[EMAIL PROTECTED](
+    <strong>simpleActions={
+        @Jpf.SimpleAction(name="login", path="login.jsp"),
+        @Jpf.SimpleAction(name="mypage", path="mypage.jsp"),
+        @Jpf.SimpleAction(name="signUp", path="signup.jsp"),
+        @Jpf.SimpleAction(name="processLogin", path="mypage.jsp"),
+        @Jpf.SimpleAction(name="processSignUp", path="thanks.jsp")
+    }
+)</strong>
+public class Controller 
+    extends PageFlowController
+{
+}
+</source>
+       
+</section>
+
+
+    <section id="action_methods">
+      <title>Actions Methods</title>
+
+      <p>
+         Now it is time to re-implement some of our simple actions as action 
methods.
+      </p>
+      <p>
+         The <code>myPage</code> action, unlike <code>signUp</code> and 
<code>login</code>
+      must determine if the user has already authenicated himself or not.  If 
the user
+         has aleady been authenticated, then the page <code>myPage.jsp</code> 
will be displayed;
+         if the user has not been authenticated yet, then the page 
<code>login.jsp</code> will
+         be displayed.
+      </p>
+
+         <p>We will implement this behavior in two steps: (1) first will 
implement a rudimentary <strong>action
+               method</strong>, (2) second we will add the <strong>conditional 
navigational behavior</strong> to the method.</p>
+ 
+         <section>
+               <title>Constant Forwards</title>
+ 
+      <p>A rudimentary action method must have two syntactical features: (1) 
it must return the type 
+               <code>org.apache.beehive.netui.pageflow.Forward</code> and (2) 
it must be decorated with 
+               the appropriate metadata annotations.</p>
+         
+             <p>By returning a 
+               <code>org.apache.beehive.netui.pageflow.Forward</code>
+    object, the method indicates which page to
+    display to the user.  
     </p>
 
 <source>
-import org.apache.beehive.netui.pageflow.Forward;
+<strong>import org.apache.beehive.netui.pageflow.Forward;</strong>
 import org.apache.beehive.netui.pageflow.PageFlowController;
 import org.apache.beehive.netui.pageflow.annotations.Jpf;
 
[EMAIL PROTECTED]
[EMAIL PROTECTED](
+   ...
+)
 public class Controller 
     extends PageFlowController
 {
     <strong>
-    public Forward signUp()
-    {
-        ...
-    }
-
     public Forward login()
     {
         ...
     }
-
-    public Forward myPage()
-    {
-        ...
-    }
     </strong>
 }
 </source>
 
-    <section id="constant_forwards">
-      <title>Constant Forwards</title>
-
-      <p>
-      For the two simple methods of <code>signUp()</code> and 
<code>login()</code>,
-      there is no special logic to be applied.  They should simply return a 
constant
-      indication to arrive at <code>signup.jsp</code> and 
<code>login.jsp</code>
-      respectively.
-      </p>
-
       <p>
       To help with configuration and to avoid having JSP page
       names within the body of a controller method, Beehive once
       again uses annotations.  The <code>Jpf.Action</code> and
-      <code>Jpf.Forward</code> annotations are used on each method to
-      build an <strong>name to JSP page paths</strong> mapping.  The method
-      then works only in terms of the <strong>id</strong>, and doesn't
+      <code>Jpf.Forward</code> annotations are used on each action method to
+      build a <strong>forward name to JSP page</strong> mapping.  The method
+      then works only in terms of the forward name, and doesn't
       directly refer to the JSP page path.
       </p>
 
@@ -163,8 +276,7 @@
 </source>
 
       <p>
-      For simple methods that forward to a constant path, only a single 
<code>Jpf.Forward</code>
-      is needed.  By convention, names such as <strong>success</strong> and 
<strong>failure</strong>
+         By convention, names such as <strong>success</strong> and 
<strong>failure</strong>
       are used, but by no means are required.  It is good practice, though, to 
avoid naming the
       forward based upon the JSP page name since doing so would remove some of 
the decoupling that
       Beehive applications attempt to achieve.
@@ -175,21 +287,12 @@
 import org.apache.beehive.netui.pageflow.PageFlowController;
 import org.apache.beehive.netui.pageflow.annotations.Jpf;
 
[EMAIL PROTECTED]
[EMAIL PROTECTED](
+   ...
+)
 public class Controller 
     extends PageFlowController
 {
-
-    <strong>@Jpf.Action(
-        forwards = {
-            @Jpf.Forward( name="success", path="signup.jsp")
-        }
-    )</strong>
-    public Forward signUp()
-    {
-        ...
-    }
-
     <strong>@Jpf.Action(
         forwards = {
             @Jpf.Forward( name="success", path="login.jsp" )
@@ -203,7 +306,7 @@
 </source>
 
       <p>
-      All that is left for these simple constant forward methods is a 
<code>return</code>
+      All that is left is a <code>return</code>
       statement to return the appropriate <code>Forward</code> object.  This 
is accomplished
       simply by constructing a new <code>Forward</code> with the appropriate 
name.
       </p>
@@ -213,21 +316,12 @@
 import org.apache.beehive.netui.pageflow.PageFlowController;
 import org.apache.beehive.netui.pageflow.annotations.Jpf;
 
[EMAIL PROTECTED]
[EMAIL PROTECTED](
+   ...
+)
 public class Controller 
     extends PageFlowController
 {
-
-    <strong>@Jpf.Action(
-        forwards = {
-            @Jpf.Forward( name="success", path="signup.jsp" )
-        }
-    )</strong>
-    public Forward signUp()
-    {
-        <strong>return new Forward( "success" );</strong>
-    }
-
     <strong>@Jpf.Action(
         forwards = {
             @Jpf.Forward( name="success", path="login.jsp" )
@@ -239,37 +333,24 @@
     }
 }
 </source>
-<p>The code above can be made even cleaner by defining "simple actions" at the 
class-level.  Using the <code>@Jpf.SimpleAction</code> annotation at the 
class-level you can remove the controller methods and their annotations 
altogether.  The code above can be replaced with the class-level annotations 
shown below:</p>
-<source>
-    @Jpf.Controller(
-        <strong>simpleActions={
-            @Jpf.SimpleAction(name="signUp", path="signup.jsp"),
-            @Jpf.SimpleAction(name="login", path="login.jsp")
-        }</strong>
-    )
-public class Controller 
-    extends PageFlowController
-{
-}
-</source>
-    </section>
-
-    <section id="conditional_forwards">
-      <title>Conditional Forwards</title>
-
-      <p>
-      The <code>myPage()</code> controller method, unlike 
<code>signUp()</code> and <code>login()</code>
-      contains logic to determine if the user has already authenicated 
himself.  Unlike the previous two
-      methods, there will be two different <code>Jpf.Forward</code> 
annotations, and the job of the
-      <code>myPage()</code> method is to figure out which one is appropriate 
to return.  
-      </p>
-
+<p>Now we have re-implemented one of our simple actions as an action method.  
However, our new action method 
+doesn't do anything more than the original simple action.  The new aciton 
method remains a purely navigational
+action: it is not yet capable of any decision logic and conditional execution. 
 In the next section we will
+endow the action method with conditional navigational behavior.
+</p>
+
+         </section>
+         
+<section>
+       <title>Conditional Forwards</title>
+       
+</section>
       <p>
       We define two forwards named <strong>authenticated</strong> and 
<strong>not_authenticated</strong>,
       which are linked to <code>mypage.jsp</code> and <code>login.jsp</code> 
respectively.
-      In this case, the determination of authentication is performed by 
checking a <strong>session attribute</strong>
+      In this case, the determination of authentication is performed by 
checking a 
+         <strong>session attribute</strong>
       to see if the <code>authenticated_user</code> attribute has been set.
-      Only the the <code>myPage()</code> method is displayed below in order to 
highlight condition forwards.
       </p>
 
 <source>
@@ -280,45 +361,44 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;
 
[EMAIL PROTECTED]
[EMAIL PROTECTED](
+    ...
+)
 public class Controller 
     extends PageFlowController
 {
-
-    ...
-    ...
-
-    <strong>@Jpf.Action(
+    @Jpf.Action(
         forwards = {
-            @Jpf.Forward( name="authenticated",     path="mypage.jsp" ),
-            @Jpf.Forward( name="not_authenticated", path="login.jsp" )
+            <strong>@Jpf.Forward( name="authenticated",     path="mypage.jsp" 
),
+            @Jpf.Forward( name="not_authenticated", path="login.jsp" )</strong>
         }
-    )</strong>
+    )
     public Forward myPage()
     {
         HttpServletRequest request = getRequest();
         HttpSession session = request.getSession();
 
-        if ( session.getAttribute( "authenticated_user" ) != null )
+        <strong>if ( session.getAttribute( "authenticated_user" ) != null )
         {
             return new Forward( "authenticated" );
-        }
+        }</strong>
 
         return new Forward( "not_authenticated" );
     }
 }
 </source>
          <p>
-         Now that we have a method (<code>myPage()</code>) with two possible 
navigation outcomes, the flow diagram 
+         Now that we have a method with two possible navigation outcomes, the 
flow diagram 
          appears as follows.  Notice the two named arrows exiting the 
<code>myPage()</code> method.
          </p>
          <p><img src="images/impl-flow-1-conditional-forward.png" 
alt="conditional forwards"/></p>
       <p>
       You may notice that the body of <code>myPage()</code> has no particular 
logic regarding
-      the user's "My Page" itself.  It simply operates in terms of 
authentication and generically
+      the JSP page "myPage.jsp" itself.  It simply operates in terms of 
authentication and generically
       named <code>Forward</code> objects.  This presents a possibility of 
sharing this logic
       with other controller methods that are concerned with authentication.  
For more ideas
-      along these lines, please see <!--<link 
href="controller_patterns.html">-->Controller Patterns [todo: forthcoming 
document]<!--</link>-->.
+      along these lines, please see 
+               <!--<link href="controller_patterns.html">-->Controller 
Patterns [todo: forthcoming document]<!--</link>-->.
       </p>
     </section>
     <section id="handling_forms">

Modified: 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_overview.xml
Url: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_overview.xml?view=diff&rev=124836&p1=incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_overview.xml&r1=124835&p2=incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_overview.xml&r2=124836
==============================================================================
--- 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_overview.xml
 (original)
+++ 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_overview.xml
 Mon Jan 10 14:58:19 2005
@@ -76,24 +76,25 @@
        the desired method in the Page Flow.  
                <!--[todo: detailed doc based on R. Feit's: 
http://dev2dev.bea.com/products/wlworkshop81/articles/Feit.jsp]--></p>
 <p>You can also use the Struts merge feature to read configuration data from a 
pure Struts app into your 
-       Page Flow apps configuration files.  Ordinarily, your Page Flow's 
configuration files are generated 
+       Page Flow app's configuration files.  Ordinarily, your Page Flow's 
configuration files are generated 
        entirely from your application's
-       JAVA source files (specifically from the <em>metadata annotations</em> 
that decorate your JAVA source code).  
+       JAVA source files (specifically from the <em>metadata annotations</em> 
that decorate the controller files).  
        But, in cases where you want to integrate a Struts module into your 
application,
-       you can specify that the configuration files be generated from both the 
JAVA source files <em>and</em> the 
+       you can specify that the configuration files be generated from 
<em>both</em> the JAVA source files <em>and</em> the 
        Struts module's configuration files, allowing you to change or add 
<em>any tag</em> in the generated 
-       configuration file.  For example, suppose you want to override the 
default request-scoping for an 
-       action form to session-scoping.  To do this, you simply create a Struts 
configuration file 
+       configuration file.  For example, suppose you want to override an 
action form's default scoping from
+       request-scoping to session-scoping.  To do this, you simply create a 
Struts configuration file 
        that overrides the appropriate parts of the Page Flow's configuration 
file, and then refer to this 
-       override file from within the Page Flow's JAVA source file using a 
special annotation.  In particular,
-       you would specify the override file to state that such-and-such and 
action form should have session-scope
+       override file from within the Page Flow's JAVA source file (= the 
controller file) 
+       using a special annotation.  In particular,
+       you would specify the override file to state that such-and-such an 
action form should have session-scope
        rather then request-scope (so that the action form can now be shared 
with the Struts app).  </p>
 </section>
   <section id="logical_flow">
     <title>The Logical Flow</title>
 
     <p>
-    Writing traditional web applications without JPFs requires a fair amount 
of 
+    Writing traditional web applications without a JPF controller class 
requires a fair amount of 
     logic to be applied within the application's pages.  For example, a site
     that provides a "My Page" functionality for logged in users would have 
     to include logic on the home page to determine if the "My Page" link
@@ -102,7 +103,7 @@
     </p>
 
     <p>
-    Using JPF, the home page of the application would not link directly to
+    Using a JPF, the home page of the application would not link directly to
     either the login page <strong>or</strong> the user's "My Page" location, 
but rather
     would point back into Java code that makes the decision.
     </p>
@@ -187,13 +188,22 @@
     </p>
 
     <p>
-    Each of the interception points is simply a <strong>method</strong> of the
-    particular <strong>controller</strong> class.  The method may perform any 
required
-    complex logic.  The return-value of the method dictates which page is then
-    displayed.  If a user clicks on the "My Page" link, the method may check if
-    the user is logged in, and if so, return an indication that the 
<code>mypage.jsp</code>
-    should be displayed, otherwise it will return an indication that
-    <code>login.jsp</code> should be presented to the user.
+    Each of the interception points is an <strong>action</strong> of the
+    particular <strong>controller</strong> class.  <strong>Actions</strong>
+       perform common application tasks.  Here are some of the things that an 
action can do: 
+       </p>
+       <ul>
+               <li>navigate the user to a specified JSP page</li>
+               <li>perform conditional logic</li>
+               <li>handle submitted data</li>
+               <li>validate submitted data</li>
+               <li>handle exceptions that arise in the application</li>
+       </ul>
+    <p>Actions may perform any required
+    complex logic.  For example, if a user clicks on the "My Page" link, the 
action may check if
+    the user is logged in, and if so, navigate the user to the 
<code>mypage.jsp</code>
+    page, otherwise it will navigate the user to the
+    <code>login.jsp</code> page.
     </p>
 
     <p>
@@ -205,15 +215,15 @@
     </ul>
 
     <p>
-    When using JPFs, pages and controller methods are interweaved, 
transparently.
+    When using JPFs, pages and actions are interweaved, transparently.
     </p>
 
     <ul>
-      <li><strong>page &gt; method &gt; page &gt; method &gt; page &gt; method 
&gt; page</strong></li>
+      <li><strong>page &gt; action &gt; page &gt; action &gt; page &gt; action 
&gt; page</strong></li>
     </ul>
 
     <p>
-    The above <strong>logical page flow</strong> can be redrawn with JPF 
controller methods
+    The above <strong>logical page flow</strong> can be redrawn with JPF 
controller actions
     in mind, as:
     </p>
 
@@ -223,13 +233,13 @@
 
     <p>
     Now it is apparent that to navigate from <code>index.jsp</code> to 
<code>mypage.jsp</code>,
-    the user traverses across the <code>myPage()</code> method.  This method 
performs the necessary
+    the user traverses across the <code>myPage</code> action.  This action 
performs the necessary
     check to determine if the user has already been authenticated.  If the 
user has logged in already,
     it will direct the user straight to <code>mypage.jsp</code>.
     </p>
     <p>
        But what if the user hasn't logged in already?  A natural design choice 
would be to have the 
-       <code>myPage()</code> method throw an exception and handle the 
exception in someway. 
+       <code>myPage</code> action throw an exception and handle the exception 
in someway. 
        The following diagram shows how you can interweave exception handling 
into the page flow to 
        further refine the paths through the flow.
     </p>
@@ -241,14 +251,20 @@
     <title>Next...</title>
   
     <p>
-    Next, learn about writing a <strong>controller</strong> class with methods.
+    Next, learn about writing a <strong>controller</strong> class with actions.
     </p>
 
     <ul>
       <li><a class="jump" href="pageflow_controllers.html">Page Flow 
Controller</a></li>
     </ul>
   </section>
-
+<!--
+Notes:
+Actionsâimplement (1) navigation logic, 
+(2) provide access to resources via controls, (3) handle form data, 
+and (4) and contain decision logic. 
+Actions are implemented as (1) annotations or (2) Controller methods.
+-->
       
 
   </body>

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?view=diff&rev=124836&p1=incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml&r1=124835&p2=incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml&r2=124836
==============================================================================
--- 
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
 Mon Jan 10 14:58:19 2005
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" 
"http://forrest.apache.org/dtd/document-v12.dtd";>
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" 
"http://forrest.apache.org/dtd/document-v20.dtd";>
 <document>
     <header>
         <title>Beehive Page Flow Tutorial</title>
@@ -27,7 +27,7 @@
             <title>Step 1: Begin the Page Flow Tutorial</title>
             <section>
                 <title>To Set up the Development Environment</title>
-                <p>Follow the setup directions at <fork 
href="../setup.html">Beehive Installation and Setup</fork></p>
+                <p>Follow the setup directions at <a class="fork" 
href="../setup.html">Beehive Installation and Setup</a></p>
                 <p>After completing the instructions, leave the command shell 
open to use throughout this tutorial.</p>
             </section>
             <section>
@@ -173,18 +173,22 @@
   -Dcontext.path=pageflow_tutorial
   build.webapp
   deploy</source>
-<p>Note: if you get an error stating that the <code>/pageflow_tutorial</code> 
context path already exists, then use the following Ant command to first 
undeploy the application from Tomcat.  (You might be getting this error if this 
is your second time running through the tutorial.)</p>
+<p>Note: if you get an error stating that the <code>/pageflow_tutorial</code>
+        context path already exists, then use the following Ant command to 
+        undeploy, build, and deploy the application on Tomcat.  (You might be 
getting 
+        this error if this is your second time running through the 
tutorial.)</p>
 <source>ant 
   -f %BEEHIVE_HOME%\ant\buildWebapp.xml  
   -Dwebapp.dir=C:\beehive_projects\pageflow_tutorial
   -Dcontext.path=pageflow_tutorial
-  undeploy</source>
-  <p>When the undeploy is complete, then compile and deploy again.</p>
+  undeploy
+  build.webapp
+  deploy</source>
             </section>
             <section>
                 <title>To Test the Page Flow Web Application</title>
                 <p>Visit the following address:</p> 
-                <p><fork 
href="http://localhost:8080/pageflow_tutorial";>http://localhost:8080/pageflow_tutorial</fork></p>
+                <p><a class="fork" 
href="http://localhost:8080/pageflow_tutorial";>http://localhost:8080/pageflow_tutorial</a></p>
                 <p>You will be directed to the <code>index.jsp</code> page.</p>
             </section>
         </section>
@@ -279,7 +283,7 @@
                 <title>To Test the Page Flow Web Application</title>
                 <p>Visit the following link: 
                 </p>
-                <p><fork 
href="http://localhost:8080/pageflow_tutorial";>http://localhost:8080/pageflow_tutorial</fork></p>
+                <p><a class="fork" 
href="http://localhost:8080/pageflow_tutorial";>http://localhost:8080/pageflow_tutorial</a></p>
                 <p>You will be directed to the index.jsp page.</p>
                 <p>Click the link.</p>
                 <p>You will be directed to page2.jsp.</p>
@@ -411,7 +415,7 @@
                 <title>To Test the Page Flow Web Application</title>
                 <p>Visit the following link: 
                 </p>
-                <p><fork 
href="http://localhost:8080/pageflow_tutorial";>http://localhost:8080/pageflow_tutorial</fork></p>
+                <p><a class="fork" 
href="http://localhost:8080/pageflow_tutorial";>http://localhost:8080/pageflow_tutorial</a></p>
                 <p>You will be directed to the index.jsp page.</p>
                 <p>Click the link.</p>
                 <p>You will be directed to page2.jsp.</p>
@@ -468,7 +472,7 @@
                 <title>To Test the Page Flow Web Application</title>
                 <p>Visit the following link: 
                 </p>
-                <p><fork 
href="http://localhost:8080/pageflow_tutorial";>http://localhost:8080/pageflow_tutorial</fork></p>
+                <p><a class="fork" 
href="http://localhost:8080/pageflow_tutorial";>http://localhost:8080/pageflow_tutorial</a></p>
                 <p>You will be directed to the index.jsp page.</p>
                 <p>Click the link.</p>
                 <p>You will be directed to page2.jsp.</p>

Modified: 
incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-conditional-forward.dia
Url: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-conditional-forward.dia?view=diff&rev=124836&p1=incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-conditional-forward.dia&r1=124835&p2=incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-conditional-forward.dia&r2=124836
==============================================================================
Binary files. No diff available.

Modified: 
incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-conditional-forward.png
Url: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-conditional-forward.png?view=diff&rev=124836&p1=incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-conditional-forward.png&r1=124835&p2=incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1-conditional-forward.png&r2=124836
==============================================================================
Binary files. No diff available.

Modified: 
incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1.dia
Url: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1.dia?view=diff&rev=124836&p1=incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1.dia&r1=124835&p2=incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1.dia&r2=124836
==============================================================================
Binary files. No diff available.

Modified: 
incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1.png
Url: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1.png?view=diff&rev=124836&p1=incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1.png&r1=124835&p2=incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/impl-flow-1.png&r2=124836
==============================================================================
Binary files. No diff available.

Reply via email to