Author: steveh
Date: Thu Nov 11 11:32:41 2004
New Revision: 57460

Modified:
   incubator/beehive/site/build/site/pageflow/pageflow_building.html
   incubator/beehive/site/build/site/pageflow/pageflow_controllers.html
   incubator/beehive/site/build/site/pageflow/pageflow_overview.html
   
incubator/beehive/site/src/documentation/content/xdocs/pageflow/pageflow_building.xml
   
incubator/beehive/site/src/documentation/content/xdocs/pageflow/pageflow_controllers.xml
   
incubator/beehive/site/src/documentation/content/xdocs/pageflow/pageflow_overview.xml
Log:
A fix for JIRA 80: Page Flow Overview - simple actions versus complex actions

Modified: incubator/beehive/site/build/site/pageflow/pageflow_building.html
==============================================================================
--- incubator/beehive/site/build/site/pageflow/pageflow_building.html   
(original)
+++ incubator/beehive/site/build/site/pageflow/pageflow_building.html   Thu Nov 
11 11:32:41 2004
@@ -2,7 +2,7 @@
 <html>
 <head>
 <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>Building a Page Flow Web-App</title>
+<title>Building a Page Flow Web App</title>
 <link type="text/css" href="../skin/page.css" rel="stylesheet">
 </head>
 <body text="#000000" bgcolor="#FFFFFF">
@@ -282,7 +282,7 @@
 <table class="title" summary="">
 <tr>
 <td valign="middle">
-<h1>Building a Page Flow Web-App</h1>
+<h1>Building a Page Flow Web App</h1>
 </td>
 </tr>
 </table>

Modified: incubator/beehive/site/build/site/pageflow/pageflow_controllers.html
==============================================================================
--- incubator/beehive/site/build/site/pageflow/pageflow_controllers.html        
(original)
+++ incubator/beehive/site/build/site/pageflow/pageflow_controllers.html        
Thu Nov 11 11:32:41 2004
@@ -471,7 +471,7 @@
 <p>
       For simple methods that forward to a constant path, only a single <span 
class="codefrag">Jpf.Forward</span>
       is needed.  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 
not simply name the
+      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.
       </p>
@@ -542,8 +542,21 @@
     }
 }
 </pre>
+<p>The code above can be made even cleaner by defining "simple actions" at the 
class-level.  Using the <span class="codefrag">@Jpf.SimpleAction</span> 
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>
+<pre class="code">
+    @Jpf.Controller(
+        <strong>simpleActions={
+            @Jpf.SimpleAction(name="signUp", path="signup.jsp"),
+            @Jpf.SimpleAction(name="login", path="login.jsp")
+        }</strong>
+    )
+public class Controller 
+    extends PageFlowController
+{
+}
+</pre>
 </div>
-<a name="N10100"></a><a name="conditional_forwards"></a>
+<a name="N1010E"></a><a name="conditional_forwards"></a>
 <h4>Conditional Forwards</h4>
 <div style="margin-left: 0 ; border: 2px">
 <p>
@@ -603,13 +616,12 @@
       along these lines, please see <!--<link 
href="controller_patterns.html">-->Controller Patterns [todo: forthcoming 
document]<!--</link>-->.
       </p>
 </div>
-<a name="N10146"></a><a name="handling_forms"></a>
+<a name="N10154"></a><a name="handling_forms"></a>
 <h4>Handling Forms</h4>
 <div style="margin-left: 0 ; border: 2px">
 <p>
       Handling form data works similar to other controller methods.  By 
providing a parameter
-      to the controller method, a populated subclass of <span 
class="codefrag">org.apache.beehive.netui.pageflow.FormData</span>
-      available.  In the above model, controller methods that process forms 
have been named
+      to the controller method, a populated subclass of <span 
class="codefrag">org.apache.beehive.netui.pageflow.FormData</span>, the form 
data is made available to the controller method.  In the above model, 
controller methods that process forms have been named
       with the <span class="codefrag">processXXX(..)</span> convention.
       </p>
 <ul>
@@ -624,9 +636,8 @@
       
 </ul>
 <p>
-      First, define a subclass of <span class="codefrag">FormData</span>.  It 
may be defined as a <span class="codefrag">static</span>
-      class of the controller itself.  <span class="codefrag">FormData</span> 
classes follow normal JavaBean conventions
-      and require no special annotations.  
+      First, define a subclass of <span class="codefrag">FormData</span>.  It 
may be defined (1) as a <span class="codefrag">static</span>
+      inner class of the controller itself (see example below) or (2) as a 
stand-alone Java class in a separate file.  <span 
class="codefrag">FormData</span> classes follow normal JavaBean conventions and 
require no special annotations.  
       </p>
 <pre class="code">
 import org.apache.beehive.netui.pageflow.Forward;
@@ -763,7 +774,7 @@
 </div>
 
   
-<a name="N101AD"></a><a name="next"></a>
+<a name="N101BB"></a><a name="next"></a>
 <h3>Next...</h3>
 <div style="margin-left: 0 ; border: 2px">
 <p>

Modified: incubator/beehive/site/build/site/pageflow/pageflow_overview.html
==============================================================================
--- incubator/beehive/site/build/site/pageflow/pageflow_overview.html   
(original)
+++ incubator/beehive/site/build/site/pageflow/pageflow_overview.html   Thu Nov 
11 11:32:41 2004
@@ -297,6 +297,9 @@
 <a href="#implementation_of_flow">The Implementation of the Flow</a>
 </li>
 <li>
+<a href="#URL+Addressable+%5Btodo%2C+JIRA+82%5D">URL Addressable [todo, JIRA 
82]</a>
+</li>
+<li>
 <a href="#next">Next...</a>
 </li>
 </ul>
@@ -466,7 +469,7 @@
     </p>
 <p>
       
-<img alt="implementation page flow" src="images/impl-flow-1.png">
+<img alt="implementation page flow" height="342" src="images/impl-flow-1.png" 
width="621">
     </p>
 <p>
     Now it is apparent that to navigation from <span 
class="codefrag">index.jsp</span> to <span class="codefrag">mypage.jsp</span>,
@@ -475,9 +478,12 @@
     it will direct the user straight to <span 
class="codefrag">mypage.jsp</span>, otherwise, it displays <span 
class="codefrag">login.jsp</span>.
     </p>
 </div>
-
   
-<a name="N100E2"></a><a name="next"></a>
+<a name="N100E4"></a><a name="URL+Addressable+%5Btodo%2C+JIRA+82%5D"></a>
+<h3>URL Addressable [todo, JIRA 82]</h3>
+<div style="margin-left: 0 ; border: 2px"></div>
+  
+<a name="N100EB"></a><a name="next"></a>
 <h3>Next...</h3>
 <div style="margin-left: 0 ; border: 2px">
 <p>

Modified: 
incubator/beehive/site/src/documentation/content/xdocs/pageflow/pageflow_building.xml
==============================================================================
--- 
incubator/beehive/site/src/documentation/content/xdocs/pageflow/pageflow_building.xml
       (original)
+++ 
incubator/beehive/site/src/documentation/content/xdocs/pageflow/pageflow_building.xml
       Thu Nov 11 11:32:41 2004
@@ -2,7 +2,7 @@
 <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" 
"http://forrest.apache.org/dtd/document-v12.dtd";>
 <document>
   <header>
-    <title>Building a Page Flow Web-App</title>
+    <title>Building a Page Flow Web App</title>
   </header>
   <body>
 

Modified: 
incubator/beehive/site/src/documentation/content/xdocs/pageflow/pageflow_controllers.xml
==============================================================================
--- 
incubator/beehive/site/src/documentation/content/xdocs/pageflow/pageflow_controllers.xml
    (original)
+++ 
incubator/beehive/site/src/documentation/content/xdocs/pageflow/pageflow_controllers.xml
    Thu Nov 11 11:32:41 2004
@@ -165,7 +165,7 @@
       <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>
-      are used, but by no means are required.  It is good practice, though, to 
not simply name the
+      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.
       </p>
@@ -239,7 +239,19 @@
     }
 }
 </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">
@@ -312,8 +324,7 @@
 
       <p>
       Handling form data works similar to other controller methods.  By 
providing a parameter
-      to the controller method, a populated subclass of 
<code>org.apache.beehive.netui.pageflow.FormData</code>
-      available.  In the above model, controller methods that process forms 
have been named
+      to the controller method, a populated subclass of 
<code>org.apache.beehive.netui.pageflow.FormData</code>, the form data is made 
available to the controller method.  In the above model, controller methods 
that process forms have been named
       with the <code>processXXX(..)</code> convention.
       </p>
 
@@ -323,9 +334,8 @@
       </ul>
 
       <p>
-      First, define a subclass of <code>FormData</code>.  It may be defined as 
a <code>static</code>
-      class of the controller itself.  <code>FormData</code> classes follow 
normal JavaBean conventions
-      and require no special annotations.  
+      First, define a subclass of <code>FormData</code>.  It may be defined 
(1) as a <code>static</code>
+      inner class of the controller itself (see example below) or (2) as a 
stand-alone Java class in a separate file.  <code>FormData</code> classes 
follow normal JavaBean conventions and require no special annotations.  
       </p>
 
 <source>

Modified: 
incubator/beehive/site/src/documentation/content/xdocs/pageflow/pageflow_overview.xml
==============================================================================
--- 
incubator/beehive/site/src/documentation/content/xdocs/pageflow/pageflow_overview.xml
       (original)
+++ 
incubator/beehive/site/src/documentation/content/xdocs/pageflow/pageflow_overview.xml
       Thu Nov 11 11:32:41 2004
@@ -43,7 +43,7 @@
     </p>
 
     <p>
-      <img src="images/logical-flow-1.png" alt="logical page flow"/>
+      <img src="images/logical-flow-1.png" alt="logical page flow" />
     </p>
 
     <p>
@@ -148,7 +148,7 @@
     </p>
 
     <p>
-      <img src="images/impl-flow-1.png" alt="implementation page flow"/>
+      <img src="images/impl-flow-1.png" alt="implementation page flow" 
width="621" height="342"/>
     </p>
 
     <p>
@@ -159,7 +159,9 @@
     </p>
 
   </section>
-
+  <section>
+    <title>URL Addressable [todo, JIRA 82]</title>
+</section>
   <section id="next">
     <title>Next...</title>
   

Reply via email to