Author: steveh
Date: Wed Feb  2 13:44:09 2005
New Revision: 151067

URL: http://svn.apache.org/viewcvs?view=rev&rev=151067
Log:
Fix for BEEHIVE-82: Page Flow Overview - hitting a page flow URL

Modified:
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_overview.xml

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&r1=151066&r2=151067
==============================================================================
--- 
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
 Wed Feb  2 13:44:09 2005
@@ -9,7 +9,7 @@
     <title>Introduction</title>
 
     <p>
-    A Java Page Flow (JPF) is a group of Java Server Pages (JSP) and a Java 
class that
+    A Java Page Flow (<strong>JPF</strong>) is a group of Java Server Pages 
(<strong>JSP</strong>) and a Java class that
     controls the user experience flow through an application.  In addition to 
allowing
     complex logic to dictate which pages are displayed, JPF technology helps 
decouple
     page authoring from application logic by preventing one JSP from directly 
referencing
@@ -42,7 +42,7 @@
                page filling out a user profile.  The controller class stores 
the user data as the user progresses 
                through the registration and has access to the profile data as 
session state.  When the user leaves 
                the Page Flow, the state is automatically cleaned up. </p>
-<p><strong>Page Flows are Modular</strong></p>
+               <p><strong>Page Flows are Modular</strong></p>
 <p>A single web application can have multiple Page Flows within it, allowing 
you to break up the application 
        into separate, self-contained chunks of functionality.  For an example, 
see the 
                <a class="fork" href="../jpetstore.html">Petstore Sample</a>, 
which has different Page Flows 
@@ -160,7 +160,7 @@
   </section>
 
   <section id="implementation_of_flow">
-    <title>The Implementation of the Flow</title>
+    <title>The Implementation of the Flow: Controllers and Actions</title>
 
     <p>
     In the above <strong>logical flow</strong> there are several <em>if</em> 
statements
@@ -185,23 +185,39 @@
     is the <strong>controller</strong> portion of the 
<strong>Model-View-Controller</strong>
     (MVC) pattern.  This allows a page to be written, for example, that appears
     to link directly from the home page of the application to the user's "My 
Page".
-    The <strong>controller</strong> is given the opportunity to intercept the 
navigation
+    The controller is given the opportunity to intercept the navigation
     between the two and redirect the user to the login page, if required.
     </p>
 
     <p>
     Each of the interception points is an <strong>action</strong> of the
-    particular <strong>controller</strong> class.  <strong>Actions</strong>
+    particular controller class.  Actions
        perform common application tasks.  Here are some of the things that an 
action can do: 
        </p>
-       <ul>
+       
+               <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
+       
+       <p>Note that controller classes, and the actions they contain, are 
<strong>URL addressable</strong>.
+               Hitting the following URL creates an instance of the controller 
class <code>foo.MyControllerClass</code>
+               and runs its <code>begin</code> action. (When no other action 
is specified, the <code>begin</code>
+               method is run by default.) </p>
+               
+    <source>http://some.domain.com/foo/MyControllerClass.jpf </source>
+
+    <p>Hitting the following URL creates an instance of 
<code>foo.MyControllerClass</code> (if it doesn't already
+               exist) and invokes the <code>someAction</code> action. Note 
that the controller class isn't mentioned
+               by name: it's assumed that only one controller class exists in 
the directory, so there is only one 
+               candidate controller class to instantiate.</p>
+               
+               <source>http://some.domain.com/foo/someAction.do</source>
+
+       <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


Reply via email to