Author: steveh
Date: Fri Apr  1 10:57:33 2005
New Revision: 159718

URL: http://svn.apache.org/viewcvs?view=rev&rev=159718
Log:
Integrating work from the beta branch.

Added:
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/development/
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/development/dev_mode.xml
   (with props)
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/validation.xml
   (with props)
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/tutorial/
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/tutorial/index.xml
   (with props)
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/tutorial/tut_dbdrivenwebapp.xml
   (with props)
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/wsm/sample_wsmAnnoSamples.xml
   (with props)
    
incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/categoryGrid1.gif
   (with props)
    
incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/categoryGrid2.gif
   (with props)
    
incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/categoryGrid3.gif
   (with props)
    
incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/categoryGrid4.gif
   (with props)
    
incubator/beehive/trunk/docs/forrest/src/documentation/resources/images/categoryGrid5.gif
   (with props)
Modified:
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/tutorial_controls.xml
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/docs/index.xml
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/downloads.xml
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/index.xml
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_databinding.xml
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_datagrid.xml
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_jsp.xml
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/samples/index.xml
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/site.xml
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/tabs.xml
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/wsm/sample_AddressBook.xml
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/wsm/sample_wsm-blank.xml
    
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/wsm/tutorial_wsm.xml
    incubator/beehive/trunk/docs/forrest/src/documentation/skinconf.xml
    incubator/beehive/trunk/docs/updating_livesite.txt

Modified: 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/tutorial_controls.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/tutorial_controls.xml?view=diff&r1=159717&r2=159718
==============================================================================
--- 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/tutorial_controls.xml
 (original)
+++ 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/controls/tutorial_controls.xml
 Fri Apr  1 10:57:33 2005
@@ -58,7 +58,7 @@
                        </section>
                        <section id="make_proj">
                                <title>To Make a Control Project Folder</title>
-                               <p>In this task you will make a web application 
project folder. 
+                               <p>In this task you will make a control project 
folder. 
                                        </p>
                                <p>On your C: drive, create a directory called 
                                        
<strong><code>beehive_projects</code></strong>.</p>
@@ -73,7 +73,9 @@
                                        structure exists:</p>
                                <source>C:
   beehive_projects
-    controls_tutorial</source>
+    controls_tutorial
+      src
+      build.xml</source>
                        </section>
             <section id="make_test_enviro">
                 <title>To Create a Web Application Test Environment</title>
@@ -94,30 +96,24 @@
       Controller.jpf
       error.jsp
       index.jsp</source>
-            </section>
-            <section id="copy_JARs">
-                <title>To Copy Runtime JARs to the Web Application</title>
-                <p>In this step you will assemble the runtime resources for 
your web application.  
-                                       The runtime JARs include the Page Flow 
runtime, the &lt;netui> tag library, etc. 
-                                       These resources are loaded into your 
project's <code>WEB-INF/lib</code> folder 
-                                       using the Ant command below.</p>
-                <p>At the command prompt, enter the following Ant command:</p>
-                <source>ant 
-  -f %BEEHIVE_HOME%\ant\webappRuntimeCore.xml
-  -Dwebapp.dir=C:\beehive_projects\controls_tutorial_test 
-  deploy.beehive.webapp.runtime
-  
-<strong>Copy and paste version:</strong>
-ant -f %BEEHIVE_HOME%\ant\webappRuntimeCore.xml 
-Dwebapp.dir=C:\beehive_projects\controls_tutorial_test 
deploy.beehive.webapp.runtime</source>
-                <p>Before proceeding, confirm that the following directory 
structure exists:</p>
-<source>C:
-  beehive_projects
-    controls_tutorial_test
-      WEB-INF
-        lib
-          [many JAR files]</source>
-         </section>
+                               <p>In this section you will edit the 
<code>build.properties</code> file--the file
+                                       that sets the build-related properties 
for your test environment.</p>
+                               <p>Open the file 
<code>C:/beehive_projects/controls_tutorial_test/WEB-INF/src/build.properties</code>
+                                       in a text editor.</p>
+                               <p>Edit the <code>beehive.home</code> property 
points to the 
+                                       top-level folder of your beehive 
installation.</p>  
+                               <p>Add the line 
<strong><code>contextPath=controls_tutorial_test</code></strong> (as shown 
below).</p>
+                               <p>For example, if your beehive installation
+                                       resides at 
<code>C:/apache/apache-beehive-1.0</code>, then your 
<code>build.properties</code> file
+                                       would appear as follows.</p>
+                               
<source>beehive.home=<strong>C:/apache/apache-beehive-1.0</strong>
+<strong>contextPath=controls_tutorial_test</strong>
 
+servlet-api.jar=${os.CATALINA_HOME}/common/lib/servlet-api.jar
+jsp-api.jar=${os.CATALINA_HOME}/common/lib/jsp-api.jar
+</source>
+         
+            </section>
                        <section id="start_tomcat">
                                <title>To Start the Tomcat Server</title>
                                <p>At the command prompt, enter:</p>
@@ -185,7 +181,8 @@
                        -->
                                <section id="examine"><title>To Examine the 
Template Control Files</title>
                        <p>Open the file 
<code>C:/beehive_projects/controls_tutorial/src/pkg/HelloImpl.jcs</code>.</p>
-                       <p>[todo: more here]</p>
+                       <p>The implementation file appears as follows. (There 
is no need to edit the file at 
+                               this point in the tutorial.)</p>
 <source>package pkg;
 
 import org.apache.beehive.controls.api.bean.*;
@@ -199,7 +196,8 @@
     }
 }</source>
 <p>Open the file 
<code>C:/beehive_projects/controls_tutorial/src/pkg/Hello.java</code>.</p>
-<p>[todo: more here]</p>
+                       <p>The interface file appears as follows. (There is no 
need to edit the file at 
+                               this point in the tutorial.)</p>
 <source>package pkg;
 
 import org.apache.beehive.controls.api.bean.*;
@@ -259,17 +257,18 @@
 <strong>Copy and Paste version:</strong>  
 copy C:\beehive_projects\controls_tutorial\build\mycontrols.jar 
C:\beehive_projects\controls_tutorial_test\WEB-INF\lib
 </source>
-       <p>To deploy the web application (with the control imbedded in it), 
click the following link. We 
-               recommend that you open the 
-               link in a new browser window.  Each time you want to redeploy 
the application,
-               simply refresh the browser.</p>  
-    <p class="quote">
-         <a class="fork" 
href="http://localhost:8080/manager/deploy?path=/controls_tutorial_test&amp;war=file:C:/beehive_projects/controls_tutorial_test&amp;update=true";>http://localhost:8080/manager/deploy?path=/controls_tutorial_test&amp;war=file:C:/beehive_projects/controls_tutorial_test&amp;update=true</a>
-       </p>
-       <p>If you are prompted for a username/password, enter: 
manager/manager</p>
-       <p>(For an explanation of this method of deploying an application to 
Tomcat, 
-               see the Tomcat 5 documentation: 
-               <a class="fork" 
href="http://jakarta.apache.org/tomcat/tomcat-5.0-doc/manager-howto.html#Deploy%20A%20New%20Application%20from%20a%20Local%20Path";>Deploy
 A New Application from a Local Path</a>)</p>
+                <p>You are now ready to compile the test environment and 
deploy it to Tomcat.</p>
+                <p>At the command prompt, enter:</p>
+<source>ant 
+  -f C:\beehive_projects\controls_tutorial_test\WEB-INF\src\build.xml
+  clean
+  build
+  war
+
+<strong>Copy and Paste version:</strong>
+ant -f C:\beehive_projects\controls_tutorial_test\WEB-INF\src\build.xml clean 
build war</source>
+<p>To deploy the application, copy the WAR file into Tomcat's 
<code>webapps</code> directory.</p>
+<source>copy C:\beehive_projects\controls_tutorial_test.war 
%CATALINA_HOME%\webapps</source>
             </section>
             <section id="test_2">
                 <title>To Test the Control</title>
@@ -361,17 +360,18 @@
 <strong>Copy and Paste version:</strong>  
 copy C:\beehive_projects\controls_tutorial\build\mycontrols.jar 
C:\beehive_projects\controls_tutorial_test\WEB-INF\lib
 </source>
-       <p>To deploy the web application (with the control imbedded in it), 
click the following link. We 
-               recommend that you open the 
-               link in a new browser window.  Each time you want to redeploy 
the application,
-               simply refresh the browser.</p>  
-    <p class="quote">
-         <a class="fork" 
href="http://localhost:8080/manager/deploy?path=/controls_tutorial_test&amp;war=file:C:/beehive_projects/controls_tutorial_test&amp;update=true";>http://localhost:8080/manager/deploy?path=/controls_tutorial_test&amp;war=file:C:/beehive_projects/controls_tutorial_test&amp;update=true</a>
-       </p>
-       <p>If you are prompted for a username/password, enter: 
manager/manager</p>
-       <p>(For an explanation of this method of deploying an application to 
Tomcat, 
-               see the Tomcat 5 documentation: 
-               <a class="fork" 
href="http://jakarta.apache.org/tomcat/tomcat-5.0-doc/manager-howto.html#Deploy%20A%20New%20Application%20from%20a%20Local%20Path";>Deploy
 A New Application from a Local Path</a>)</p>
+                <p>You are now ready to compile the test environment and 
deploy it to Tomcat.</p>
+                <p>At the command prompt, enter:</p>
+<source>ant 
+  -f C:\beehive_projects\controls_tutorial_test\WEB-INF\src\build.xml
+  clean
+  build
+  war
+
+<strong>Copy and Paste version:</strong>
+ant -f C:\beehive_projects\controls_tutorial_test\WEB-INF\src\build.xml clean 
build war</source>
+<p>To deploy the application, copy the WAR file into Tomcat's 
<code>webapps</code> directory.</p>
+<source>copy C:\beehive_projects\controls_tutorial_test.war 
%CATALINA_HOME%\webapps</source>
             </section>
             <section id="test_3">
                 <title>To Test the Control</title>

Added: 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/development/dev_mode.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/development/dev_mode.xml?view=auto&rev=159718
==============================================================================
--- 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/development/dev_mode.xml
 (added)
+++ 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/development/dev_mode.xml
 Fri Apr  1 10:57:33 2005
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" 
"http://forrest.apache.org/dtd/document-v20.dtd";>
+<document>
+       <header>
+               <title>Development and Production Modes</title>
+       </header>
+       <body>
+       <section>
+               <title>Development and Production Modes</title>
+               <p>Beehive applications can be run in either 
<strong>development</strong> or 
+                       <strong>production</strong> mode.</p>
+               <p>In <strong>development</strong> mode, if the tag 
<code>&lt;netui:exceptions showDevModeStackTrace="true"/></code>
+                       is present on a JSP page and an exception occurs, then 
the stack trace will be 
+                       displayed.</p>
+               <p>In <strong>production</strong> mode, the opposite is true: 
if the tag &lt;netui:exceptions showDevModeStackTrace="true"/>
+                       is present and an exception occurs, then the stack 
trace <em>won't</em> be 
+                       displayed.</p>
+               <p>By default, applications run in production mode, i.e., 
exception stack traces are not
+                       shown.</p>
+               <p>Similarly, assertions are 
+                       disabled by default.</p>
+               <note>If you want to display the stack trace for exceptions in 
all cases (whether your in production mode or development mode), you can 
+                       set the <code>&lt;netui:exceptions></code> tag's 
<code>showStackTrace</code> attribute
+                       to "<code>true</code>".
+                       <br/><br/>
+                       <code>&lt;netui:exceptions showStackTrace="true"></code>
+                       </note>
+               </section>
+               <section><title>Controlling the Visibility of Assertions and 
Exceptions</title>
+               <p>Beehive uses two switches to control the visibility of 
assertions and exceptions.</p>
+               <dl><dt><strong>-ea</strong></dt>
+                       <dd>Controls whether assertions enabled or not.  
Assertions are
+                               disabled by default.  If assertions are 
enabled, then Beehive 
+                               assumes development mode as well, i.e. 
exception stack traces are
+                               made visible.  (See below for
+                               enabling assertions but disabling exception 
stack traces.)</dd></dl>
+               <dl><dt><strong>-beehive.productionmode</strong></dt>
+                       <dd>Controls whether exception stack traces are 
displayed by the tag
+                               &lt;netui:exceptions 
showDevModeStackTrace="true"/>.
+                               By default, stack traces are not displayed. 
+                               </dd></dl>
+               <note>Note: until <a 
+                       
href="http://issues.apache.org/jira/browse/BEEHIVE-462";>BEEHIVE-462</a> 
+                       is resolved, you should substitute 
+                       <strong><code>beehive.produtionmode</code></strong> in 
the commands 
+                       below. (Notice the misspelling: 
<code>beehive.produtionmode</code> 
+                       instead of <code>beehive.productionmode</code>)</note>
+               <dl>
+                       <dt>
+                               <strong>
+                                       <code>export JAVA_OPTS=</code>
+                               </strong>
+                       </dt>
+                       <dd>Same as the 'default' setting. In Tomcat, this 
leaves assertions disabled and 
+                       results in Beehive assuming production mode. If you 
have 
+                       &lt;netui:exceptions showDevModeStackTrace="true"/> in 
a page and 
+                       an exception occurs, you won't see the stack trace. 
</dd>
+               </dl>
+               <dl>
+                       <dt>
+                               <strong>
+                                       <code>export JAVA_OPTS=-ea</code>
+                               </strong>
+                       </dt>
+                       <dd>Using this setting for Tomcat, assertions are 
enabled and Beehive 
+                               assumes 
+                               development mode. If you have 
&lt;netui:exceptions 
+                               showDevModeStackTrace="true"/> in one of your 
pages and an 
+                               exception occurs, then you will see the stack 
trace.</dd>
+               </dl>
+               <dl>
+                       <dt>
+                               <strong>
+                                       <code>export JAVA_OPTS="-ea 
-Dbeehive.productionmode=true"</code>
+                               </strong>
+                       </dt>
+                       <dd>This is a case 
+                       where the assumption made by Beehive is overriden: 
assertions are 
+                       enabled, but Beehive will run in production mode. If 
you have 
+                       &lt;netui:exceptions showDevModeStackTrace="true"/> in 
a page and 
+                       an exception occurs, you won't see the stack trace.</dd>
+               </dl>
+</section>
+       </body>
+       <footer>
+               <legal>Java, J2EE, and JCP are trademarks or registered 
trademarks of Sun Microsystems, Inc. in the United States and other 
countries.<br/>
+       &copy; 2004, Apache Software Foundation
+       </legal>
+       </footer>
+</document>

Propchange: 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/development/dev_mode.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/docs/index.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/docs/index.xml?view=diff&r1=159717&r2=159718
==============================================================================
--- 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/docs/index.xml
 (original)
+++ 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/docs/index.xml
 Fri Apr  1 10:57:33 2005
@@ -2,7 +2,7 @@
 <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" 
"http://forrest.apache.org/dtd/document-v20.dtd";>
 <document>
     <header>
-        <title>Beehive Documentation</title>
+        <title>Beehive 1.0 Beta Documentation</title>
     </header>
     <body>
         <p>Beehive documetation contains documentation for all three Beehive 
sub-projects: Controls, 

Modified: 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/downloads.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/downloads.xml?view=diff&r1=159717&r2=159718
==============================================================================
--- 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/downloads.xml
 (original)
+++ 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/downloads.xml
 Fri Apr  1 10:57:33 2005
@@ -7,9 +7,10 @@
        </header>
        <body>
                <section>
-            <title>Beehive 1.0 Beta RC1 Binary Distribution</title>
-            <p>The first Beehive 1.0 Beta Release Candidate #1 (RC1) binary 
distribution is available for 
-                download at <a 
href="http://cvs.apache.org/dist/incubator/beehive/nightlies/v1.0-beta-rc1/bin/";>http://cvs.apache.org/dist/incubator/beehive/nightlies/v1.0-beta-rc1/bin/</a>.
 
+            <title>Beehive 1.0 Beta RC2 Binary Distribution</title>
+            <p>The second Beehive 1.0 Beta Release Candidate #2 (RC2) 
+                               binary distribution is available for 
+                download at <a 
href="http://cvs.apache.org/dist/incubator/beehive/nightlies/v1.0-beta-rc2/bin/";>http://cvs.apache.org/dist/incubator/beehive/nightlies/v1.0-beta-rc2/bin/</a>.
 
                                This distribution is a <em>candidate</em> for 
the beta release and is 
                                <em>not</em> intended for creating 
production-level 
                 applications.  Please try it out and file "v1beta" bugs 
against it; we are in the final stages of

Modified: 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/index.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/index.xml?view=diff&r1=159717&r2=159718
==============================================================================
--- 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/index.xml 
(original)
+++ 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/index.xml 
Fri Apr  1 10:57:33 2005
@@ -47,7 +47,11 @@
                </section>
                <section>
                        <title>Documentation</title>
-                       <p><a href="docs/index.html">Documentation</a></p>
+                       <p><a href="docs/index.html">Beehive 1.0 Beta 
Documentation</a></p>
+                       <p><strong>Note:</strong> the documentation provided 
here is intended to
+                               be used with Beehive binary distributions; 
+                               it is <em>not</em> intended for use with
+                               the Beehive source.</p>
                </section>
                <section>
                        <title>Links</title>

Modified: 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_databinding.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_databinding.xml?view=diff&r1=159717&r2=159718
==============================================================================
--- 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_databinding.xml
 (original)
+++ 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_databinding.xml
 Fri Apr  1 10:57:33 2005
@@ -20,7 +20,7 @@
                                can pass data in the opposite direction from 
the presentation layer to the processing layer.
                                </p>
                        <p>The one-way, read-only contexts are: requestScope, 
url, sessionScope, container, pageContext, bundle, pageInput</p>
-                       <p>The two-way, read-write contexts are:  pageFlow, 
globalApp, actionForm</p>
+                       <p>The two-way, read-write contexts are:  pageFlow, 
sharedFlow, actionForm</p>
                </section>
                <section id="contexts">
                        <title>Summary of Binding Contexts</title>
@@ -145,14 +145,65 @@
                                </tr>
                        </table>
                </section>
-               <section>
+               <section id="individual_binding_contexts">
                        <title>Individual Binding Contexts</title>
                        <section id="actionForm">
                                <title>
                                        <code>actionForm</code>
                                </title>
+                               <p>To bind to data in a form bean, you use the 
<code>actionForm</code> 
+                                       context.
+                                       In the following example a JSP's form 
fields are pre-populated 
+                                       by binding to the fields of a form 
bean. 
+                    Assume that you navigate to the JSP page via the following 
action method.
+                                       Notice that the <code>Forward</code> 
object is constructed with
+                                       two parameters: the first parameter is 
the string "update", the second
+                                       parameter is a form bean 
(DatabaseForm).  By constructing the
+                                       Forward object in this way, the 
<code>actionForm</code> context
+                                       is automatically filled with the form 
bean values, values which can 
+                                       be retrieved by the navigated-to JSP 
page.
+                </p>
+                               <source>@Jpf.Action(
+    forwards={
+           @Jpf.Forward( name="update", path="updateItems.jsp" )
+       }
+)
+public Forward updateItems(DatabaseForm form)
+{
+    ...
+       // Read from the database
+       // and apply the values to the form bean. 
+    form.applyValuesToForm(getCurrentRow());
+       
+       // Construct a Forward object using the form bean.
+    return new Forward("update", form);
+}</source>
+                               <p>The action method above reads a record from 
a database using a 
+                                       Database control (the control code is 
omitted in the 
+                                       example) and populates the fields in 
the form bean with the 
+                                       record data before navigating to the 
JSP <code>updateItems.jsp</code>. 
+                    The values are retrieved by the JSP page, using the 
<code>actionForm</code>
+                                       context:</p>
+                               <source>&lt;netui:form action="submitUpdate">
+    &lt;netui:content value="{actionForm.itemnumber}"/>
+    &lt;netui:textBox dataSource="{actionForm.itemname}"/>
+    ...
+&lt;/netui:form></source>
+                               <p>When the &lt;netui:form> is submitted 
+                                       (<code>submitUpdate</code>), you can 
then write the updated 
+                                       values back to the database:</p>
+                               <source>@Jpf.Action(
+    forwards={
+           @Jpf.Forward( name="updated", path="getItems.jsp" )
+       }
+)
+public Forward submitUpdate(DatabaseForm aDatabaseForm)
+{
+    // code that calls the database control and updates the database
+    return new Forward("updated");
+}</source>
                        </section>
-                       <section id="application">
+                       <section id="applicationScope">
                                <title>
                                        <code>applicationScope</code>
                                </title>
@@ -166,11 +217,145 @@
                                <title>
                                        <code>container</code>
                                </title>
+                               <p>The <code>container</code> refers to the 
data set passed into a 
+                                       &lt;netui-data> or 
&lt;netui-data:repeater> tag.  The <code>container</code>
+                                       allows access to the individual rows 
and cells of the data set.</p>
+                               <p>The <code>container</code> context has the 
following properties.</p>
+                               <table>
+                                       <tr>
+                                               <td><strong>Property 
Name</strong></td>
+                                               
<td><strong>Description</strong></td>
+                                       </tr>
+                                       <tr>
+                                               
<td><code>container.item</code></td>
+                                               <td>Refers to the current row 
of the data set.</td>
+                                       </tr>
+                                       <tr>
+                                               
<td><code>container.item.[field_name]</code></td>
+                                               <td>Refers to an individual
+               field of the current row.</td>
+                                       </tr>
+                                       <tr>
+                                               
<td><code>container.index</code></td>
+                                               <td>Refers to the integer index 
of the current
+               row.</td>
+                                       </tr>
+                               </table>
+                       <p>The following example shows how to access the name, 
type breed, and weight properties
+                               in a data set passed to a data grid.</p>
+                               <p>The context <code>container</code> refers to 
the data set <code>pageInput.petList</code>.</p>
+<source>&lt;netui-data:dataGrid 
dataSource="<strong>pageInput.petList</strong>" name="petGrid">
+    &lt;netui-data:rows>
+        &lt;netui-data:spanCell 
value="${<strong>container.item.name</strong>}"/>
+        &lt;netui-data:spanCell 
value="${<strong>container.item.type</strong>}"/>
+        &lt;netui-data:spanCell 
value="${<strong>container.item.breed</strong>}"/>
+        &lt;netui-data:spanCell 
value="${<strong>container.item.weight</strong>}""/>
+    &lt;/netui-data:rows>
+&lt;/netui-data:dataGrid></source>
+                       </section>
+                       <section id="pageFlow">
+                               <title>
+                                       <code>pageFlow</code>
+                               </title>
+                               <p>When you define a variable in your 
controller class, you can access this 
+                                       variable from any JSP page that is part 
of that page flow. For example, 
+                                       if the JPF file contains this code:</p>
+
+<source>public class SimpleflowController extends PageFlowController
+{
+    public String labelName = "This is a label"
+    ...
+</source>
+<p>You can access this variable on a JSP, for instance by using a 
&lt;netui:label>:</p>
+
+<source>&lt;netui:label value="{pageFlow.labelName}" /></source>
+
+<p>The variable is read-write and can be changed, for instance in the 
controller's action 
+       method as is shown in the next example:</p>
+
+<source>
+
[EMAIL PROTECTED](
+    forwards={
+           @Jpf.Forward( name="success", path="nextPage.jsp" )
+       }
+)
+public Forward labelAction(NameActionForm form)
+{
+    ...
+    labelName = "Default Label";
+    return new Forward( "success");
+}
+</source>
+
+<p>It can also be changed in a JSP by using a form, as is shown next:</p>
+
+<source>  &lt;netui:form action="submitAction">
+      &lt;netui:textBox dataSource="{pageFlow.labelName}"/>
+      ...
+      &lt;netui:button value="submit"/>
+  &lt;/netui:form></source>
+
+<p>In this example, the text box will display the current value of the 
pageFlow's labelName 
+variable when the form is first loaded, and upon submit the variable will hold 
the new 
+value the user entered.</p>
+
+<p><strong>Accessing Page Flow Properties</strong></p>
+
+<p>In the example used above, the page flow property was defined as a public 
member variable 
+       in the page flow controller class. Alternatively you can define a 
private variable and 
+       provide access with a getter and setter method, as is shown in the 
following example:</p>
+
+<source>  private String firstName;
+    
+  public String getFirstName() { 
+      return firstName;
+  }
+
+  public void setFirstName(String aStr) { 
+      firstName = aStr; 
+  }</source>
+
+<p>You can access this variable on a JSP exactly like before. For instance, 
you can bind the 
+       value to a netui:label as is shown next:</p>
+
+<source>&lt;netui:label value="{pageFlow.firstName}" /></source>
+
+<p>In the example the method getFirstName is used to provide read access to 
the variable. </p>
+
+<p>You can also define and access variables that are part of an object created 
in the 
+       controller class. You can provide access by using getter and setter 
methods, or 
+       by referencing the object and property name. The latter option is shown 
next. 
+       For instance, if the JPF file contains the code:</p>
+
+<source>public class dataFlowController extends PageFlowController
+{
+    ...
+    public Names myNames = new Names();
+    ...
+    public class Names implements Serializable {
+        public String firstName;
+        public String lastName;
+    }
+    ...</source>
+
+<p>You can access the firstName property in a JSP like this:</p>
+
+<source>&lt;netui:label value="{pageFlow.myNames.firstName}" /></source>
+
+<p>The comments in this section regarding access of page flow properties also 
apply to 
+       properties defined to the <a 
href="#sharedFlow"><code>sharedFlow</code></a> context.</p>
                        </section>
                        <section id="pageInput">
                                <title>
                                        <code>pageInput</code>
                                </title>
+                               <p>The <code>pageInput</code> context is filled 
with data by an action output
+                                       in the Controller class.</p>
+                               <source>Forward f = new Forward("next_page");
+f.addActionOutput("message", sMessage);</source>
+                               <p>The data can be retrieved on the JSP page as 
follows:</p>
+                               <source>&lt;netui:span 
value="${pageInput.message}"/></source>
                        </section>
                        <section id="request">
                                <title>
@@ -181,12 +366,58 @@
                                <title>
                                        <code>sessionScope</code>
                                </title>
+<p>You can use the <code>sessionScope</code> context to read data from the 
+       session object (an implicit JSP object). Assuming that the session 
object contains
+       some data in its attribute map:</p>
+
+<source>getSession().setAttribute("myAttributeKey", myObject);</source>
+
+<p>then, you can read the data onto a JSP page as follows:</p>
+
+<source>&lt;netui:content 
value="{sessionScope.myAttributeKey.someProperty}">&lt;/netui:content></source>
+                               
                        </section>
                        <section id="sharedFlow">
                                <title>
                                        <code>sharedFlow</code>
                                </title>
-                               <p>SharedFlow properties can be accessed from a 
JSP using the scope sharedFlow, for example,</p>
+<p>If you need an attribute to be available across all the page flows in a web 
application's 
+       user (browser) session, such as a user's unique session key, you can 
use shared flow. 
+       By convention, shared flows are located in WEB-INF/src/shared.  (For 
details on creating 
+       a shared flow, see <a href="site:pageflow_sharedFlow">Shared Flow</a>.) 
 In addition to 
+       session-wide attributes, you can also use the shared flow to define 
fallback action methods 
+       and exception handlers. </p>
+
+<p>If you define a variable in the shared flow class:</p>
+
+<source>public class SharedFlow extends SharedFlowController
+{
+    public String defaultText = "Please Define";
+
+    ...
+}
+</source>
+
+<p>and your controller file references the shared flow:</p>
+       
+<source>@Jpf.Contoller(
+    sharedFlowsRefs = {
+        @Jpf.SharedFlowRef(name = "specificSharedFlow", type = 
"SharedFlow.class")
+    }
+)
+public class SomeController extends Controller
+{
+...
+}</source>     
+       
+<p>you can use the databinding context <code>shareFlow</code> in a JSP 
file:</p>
+
+<source>&lt;netui:textBox dataSource="{actionForm.firstName}" 
defaultValue="{sharedFlow.specificSharedFlow.defaultText}"/></source>
+
+<p>Notice that the &lt;netui:textBox> tag in the example binds to a form bean 
to post data and 
+       binds to sharedFlow's defaultText to receive its default value.</p>     
                
+                               
+<p>SharedFlow properties can be accessed from a JSP using the scope 
sharedFlow, for example,</p>
 
        <source>dataSource="sharedFlow.specificSharedFlow.someProperty"</source>
 
@@ -194,7 +425,8 @@
 
        <source>action="specificSharedFlow.someAction"</source>
 
-           <p>where specificSharedFlow was the name given to the sharedFlow in 
the JPF annotation</p>
+           <p>where specificSharedFlow was the name given to the sharedFlow in 
the JPF 
+                       annotation <code>Jpf.SharedFlowRef</code>.</p>
                        </section>
                        <section id="url">
                                <title>

Modified: 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_datagrid.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_datagrid.xml?view=diff&r1=159717&r2=159718
==============================================================================
--- 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_datagrid.xml
 (original)
+++ 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_datagrid.xml
 Fri Apr  1 10:57:33 2005
@@ -2,24 +2,900 @@
 <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" 
"http://forrest.apache.org/dtd/document-v20.dtd";>
 <document>
     <header>
-        <title>Displaying Results Sets with Data Grids</title>
+        <title>Displaying Data Sets with Data Grids</title>
     </header>
     <body>
         <section id="database_driven">
-            <title>Database Driven Web Applications</title>
+            <title>Database-Driven Web Applications</title>
+                       <p>A database-driven Beehive web application has the 
the follow components:
+                               </p>
+                               <ul>
+                                       <li>one or more page flows (= a 
controller file + JSP pages)</li>
+                                       <li>one or more database control 
files</li>
+                                       <li>one or more databases</li>
+                               </ul>
+                       <p>A basic schema for a database-driven application is 
shown below.</p>
                        <p><img src="images/pageflow_database_app_1.png" 
alt="pageflow_database"/></p>
+                       <p><strong>The Database</strong></p>
+                       <p>The role of the database is as a storehouse for the 
data.  The database persists
+                                the data from session to session and is the 
common object which users view and 
+                                operate upon.</p>
+                       <p><strong>The Database Control</strong></p>
+                       <p>The database control handles the data traffic with 
the database.  The database 
+                               control is a Java class that handles the 
database connection and handles the individual
+                               operations on the database.  Typically, the 
methods in the class have associated 
+                               SQL statements: when a method is called, the 
associated SQL statement is sent to the 
+                               database. Any data returned by the database is 
transformed by the method
+                               into an appropriate Java object so it is 
available to the rest of the web 
+                               application.</p>
+                       <p>For more database control implementations you can 
download and use in applications, 
+                               see <a href="site:db-sample">Database Control 
Sample</a>
+                               and <a href="http://jdbc.controlhaus.org/"; 
class="fork">Controlhaus's JDBC Control</a></p>
+                       
+                       <p><strong>The Page Flow</strong></p>
+                               <p>The Page Flow(s) form the front-end user 
interface of the application.  
+                                       Through
+                               the JSP pages, users can interact with the data 
in the database, by 
+                               adding, deleting, and updating the data.</p>
+                       <section 
class="rendering_complex_data_sets"><title>Rendering Complex Data Sets as 
HTML</title>
+                               <p>Beehive provides a specialized tag libarary 
for viewing and managing 
+                               the complex data sets associated with database 
applications: 
+                               <a 
href="../apidocs/taglib/taglib-overview-summary.html#netui-data"><code>&lt;netui-data:xxx></code></a>.
+                               The central HTML-rendering tags are</p> 
+                               <ul>
+                                       <li><a 
href="../apidocs/taglib/beehive.apache.org/netui/tags-databinding-1.0/dataGrid.html">&lt;netui-data:dataGrid></a></li>
+                                       <li><a 
href="../apidocs/taglib/beehive.apache.org/netui/tags-databinding-1.0/repeater.html">&lt;netui-data:repeater</a></li>
+                               </ul>
+                               <p>The &lt;netui-data:dataGrid> tag is 
specifically for rendering HTML tables.</p>
+                               <p>The &lt;netui-data:repeater> tag is for more 
general HTML rendering, including HTML tables, lists, and other shapes.</p> 
+                           <p>These tags are capable of rendering the 
following 
+                               Java objects into HTML: ArrayList, StringArray, 
RowSet, ResultSet, Vector, XMLBean, and others.</p>
+                               <p>The tags work by iterating over of the data 
set, and rendering HTML for each iteration.</p>
+                               <p>To render data, you pass the data set into 
the tag's <code>dataSource</code> attribute.</p>
+                               <source>&lt;netui-data:dataGrid name="myGrid" 
<strong>dataSource="someDatabindingContext.someDataSet"</strong>>
+    ...
+&lt;/netui-data:dataGrid></source>
+<p>The tag then analyzes and iterates over the data set, rendering HTML as it 
goes.</p>
+                       <p>The remainder of this topic concentrates on using 
the &lt;netui-data:xxx>
+                               tab library to handle data sets.</p>
+                               </section>
         </section>
-        <section id="pager">
-            <title>The &lt;netui-data:pager> Tag</title>
-        </section>
+               <section id="rendering_data_sets"><title>Rendering Data Sets as 
HTML Tables</title>
+               <section id="what_objects_rendered"><title>What Objects Can Be 
Rendered?</title>
+               <p>The data grid can render any of the following data 
structures as an HTML table.
+                       (The basic rule of thumb is: If you can iterate over 
the structure, the 
+                       data grid can render it.)</p>
+               <ul>
+                       <li>any subinterface or implementation of 
java.util.Collection, including List, Set,
+                               SortedSet, ArrayList, HashSet, Vector, etc.</li>
+                       <li>java.util.ResultSet</li>
+                       <li>java.util.RowSet</li>
+                       <li>Object[]</li>
+                       <li>any XMLBean structure</li>
+               </ul>
+               </section>
+               <section id="how_objects_rendered"><title>How are Objects 
Rendered?</title>
+               <p>The data sets above are rendered as multiple rows in the an 
HTML table; a single 
+                       object in the set is rendered as a single row.</p>
+               <p>The properties of an object can be rendered as the cells of 
a single row.</p>
+               <p>The HTML table has the following basic parts:</p>
+               <table>
+    <tr>
+      <td><strong>Region Name</strong>
+      </td>
+      <td><strong>JSP tag</strong>
+      </td>
+      <td><strong>Rendered HTML Element</strong>
+      </td>
+      <td><strong>Renders</strong>
+      </td>
+      <td><strong>Required</strong>
+      </td>
+    </tr>
+    <tr>
+      <td>Caption
+      </td>
+      <td>&lt;netui-data:caption&gt;
+      </td>
+      <td>&lt;caption&gt;
+      </td>
+      <td>exactly once
+      </td>
+      <td>no
+      </td>
+    </tr>
+    <tr>
+      <td>Header
+      </td>
+      <td>&lt;netui-data:header&gt;
+      </td>
+      <td>&lt;thead&gt;
+      </td>
+      <td>exactly once
+      </td>
+      <td>no
+      </td>
+    </tr>
+    <tr>
+      <td>Data
+      </td>
+      <td>&lt;netui-data:rows&gt;
+      </td>
+      <td>&lt;tbody&gt;
+      </td>
+      <td>once per row of data in the page
+      </td>
+      <td>no
+      </td>
+    </tr>
+    <tr>
+      <td>Footer
+      </td>
+      <td>&lt;netui-data:footer&gt;
+      </td>
+      <td>&lt;tfoot&gt;
+      </td>
+      <td>exactly once
+      </td>
+      <td>no
+      </td>
+    </tr>
+</table>
+        <p>The main body of the data grid (the section that renders inside the 
+                       &lt;netui-data:rows> tags) can contain the following 
different kinds
+                       of columns.</p>
+               <table>
+    <tr>
+      <td><strong>JSP Tag</strong>
+      </td>
+      <td><strong>Rendered HTML Cell type</strong>
+      </td>
+      <td><strong>Rendered HTML Content Type</strong>
+      </td>
+    </tr>
+    <tr>
+      <td>&lt;netui-data:headerCell&gt;
+      </td>
+      <td>&lt;th&gt;
+      </td>
+      <td>&lt;span&gt;
+      </td>
+    </tr>
+    <tr>
+      <td>&lt;netui-data:anchorCell&gt;
+      </td>
+      <td>&lt;td&gt;
+      </td>
+      <td>&lt;a&gt;
+      </td>
+    </tr>
+    <tr>
+      <td>&lt;netui-data:imageAnchorCell
+      </td>
+      <td>&lt;td&gt;
+      </td>
+      <td>&lt;a&gt;&lt;img/&gt;&lt;/a&gt;
+      </td>
+    </tr>
+    <tr>
+      <td>&lt;netui-data:imageCell&gt;
+      </td>
+      <td>&lt;td&gt;
+      </td>
+      <td>&lt;img/&gt;
+      </td>
+    </tr>
+    <tr>
+      <td>&lt;netui-data:spanCell&gt;
+      </td>
+      <td>&lt;td&gt;
+      </td>
+      <td>&lt;span&gt;
+      </td>
+    </tr>
+    <tr>
+      <td>&lt;netui-data:templateCell&gt;
+      </td>
+      <td>&lt;td&gt;
+      </td>
+      <td>None.&nbsp; Template cell
+contents are specified by the developer</td>
+    </tr>
+  </table>     
+               </section>
+               <section id="css"><title>CSS Styles for Data Grids</title>
+               <p>The data grid supports two modes for rendering CSS styles: 
"default" and "empty".</p>
+               <p>Under the default mode, a CSS style prefix is prepended to a 
standard set of CSS 
+                       style names (see table below).  There are different CSS 
style names for 
+                       different parts of the rendered HTML.  The CSS style 
used is controled by writing
+                       different prepending prefixes into the HTML.</p>
+               <p>The prefix is controlled by setting the 
<code>styleClassPrefix</code> attribute
+                       of the &lt;netui-data:dataGrid> tag.</p>
+               <source>&lt;netui-data:dataGrid 
styleClassPrefix="myStyle"/></source>
+               <p>If no prefix is specified, the default prefix is 
"<code>datagrid</code>".</p>
+               <p>Under the empty mode, no prefixes are written into the 
HTML.</p>
+               <p>The style mode used can be switched by setting the 
<code>styleClassPolicy</code>
+                       attribute on the &lt;netui-data:dataGrid> tag.</p>
+               <source>&lt;netui-data:dataGrid 
styleClassPolicy="empty"/></source>
+               <p>The following table shows the standard CSS style names 
written into the HTML under
+                       both the default and standard modes, where &lt;prefix> 
is the value of the 
+                       <code>styleClassPrefix</code> attribute.</p>
+        <table>
+    <tr>
+      <td><strong>Grid Component</strong>
+      </td>
+      <td><strong>Default Style Name</strong>
+      </td>
+      <td><strong>Empty Style Name</strong>
+
+      </td>
+    </tr>
+    <tr>
+      <td>Caption<br/>
+      </td>
+      <td>&lt;prefix></td>
+      <td>""<br/>
+
+      </td>
+    </tr>
+    <tr>
+      <td>Header Row<br/>
+      </td>
+      <td>&lt;prefix>-header<br/>
+      </td>
+
+      <td>header<br/>
+      </td>
+    </tr>
+    <tr>
+      <td>Header Cells<br/>
+      </td>
+      <td>&lt;prefix></td>
+
+      <td>""<br/>
+      </td>
+    </tr>
+    <tr>
+      <td>Header Cell Sortable<br/>
+      </td>
+      <td>&lt;prefix>-sortable</td>
+
+      <td>sortable<br/>
+      </td>
+    </tr>
+    <tr>
+      <td>Header Cell Sorted<br/>
+      </td>
+      <td>&lt;prefix>-sorted</td>
+
+      <td>sorted<br/>
+      </td>
+    </tr>
+    <tr>
+      <td>Data Row <br/>
+      </td>
+      <td>&lt;prefix>-even</td>
+
+      <td>even<br/>
+      </td>
+    </tr>
+    <tr>
+      <td>Data Row Alternating<br/>
+      </td>
+      <td>&lt;prefix>-odd</td>
+
+      <td>odd<br/>
+      </td>
+    </tr>
+    <tr>
+      <td>Data Cell<br/>
+      </td>
+      <td>&lt;prefix></td>
+
+      <td>""<br/>
+      </td>
+    </tr>
+    <tr>
+      <td>Data Cell Sorted<br/>
+      </td>
+      <td>&lt;prefix>-sorted</td>
+
+      <td>sorted<br/>
+      </td>
+    </tr>
+    <tr>
+      <td>Footer Row<br/>
+      </td>
+      <td>&lt;prefix>-footer</td>
+
+      <td>footer<br/>
+      </td>
+    </tr>
+    <tr>
+      <td>Table<br/>
+      </td>
+      <td>&lt;prefix><br/>
+      </td>
+      <td>""<br/>
+      </td>
+    </tr>
+</table>
+ <p>When writing a CSS file for the data grid, the style names should appear 
as follows:</p>
+ <source>tr.datagrid-header{ ... }</source>
+ <p>Of, if <code>datagrid</code> is replaced with <code>&lt;prefix></code>, 
then:</p>
+ <source>tr.&lt;prefix>-header{ ... }</source>
+       </section>
+       <section><title>Data Grid Properties File</title>
+               <p>The data grid tags are configurable through a 
<code>.properties</code> file. 
+                       The <code>.properties</code> file is referenced by 
+                       the "<code>resourceBundlePath</code>" attribute on the 
+                       <code>&lt;netui-data:dataGrid></code> tag.</p>
+                       
+                       <p>The <code>.properties</code> file is compiled (into 
a MessageResources object)
+                               and is referenced by its fully qualified class 
name.</p>
+                       
+                       <p>That is, if the file is located at:</p>
+                       
+                       
<source>WEB-INF/src/<strong>datagrid/grid</strong>.properties</source>
+                       
+                       <p>Then the <code>&lt;netui-data:dataGrid></code> tag 
references it as follows:</p>
+                       
+                       <source>&lt;netui-data:dataGrid 
resourceBundlePath="<strong>datagrid.grid</strong>"></source>
+                       
+                       <p>The referenced <code>.properties</code> file is used 
to obtain internationalized 
+                       strings, image names, and patterns that are used during 
data grid 
+                       rendering.</p>  
+                       <p>There are a set of default property values specified 
+                       in the <code>data-grid-default.properties</code> file 
in the 
+                       <code>beehive-netui-databinding.jar</code> 
+                       file. </p>
+                       
+                       <p>The contents of the 
<code>data-grid-default.properties</code> file appears below.</p>
+                       
+                       <source>datagrid.resource.path=resources/images
+datagrid.msg.nodata=No data to display
+
+sort.asc.img=/sortdown.gif
+sort.desc.img=/sortup.gif
+sort.none.img=/sortable.gif
+
+pager.msg.first=First
+pager.msg.previous=Previous
+pager.msg.next=Next
+pager.msg.last=Last
+pager.fmt.banner=Page {0} of {1}</source> 
+                       
+                       <p>These values can be overridden in one of two 
ways:</p>
+        <ul>
+                       <li>by setting the <code>resourceBundlePath</code> 
+                               on the &lt;netui-data:dataGrid> tag
+                               <source>&lt;netui-data:dataGrid 
resourceBundlePath="datagrid.grid"/></source></li>
+                       
+                       <li>by using the <code>&lt;netui:attribute></code> tag 
+                               with the <code>resource</code> facet to 
+                               override the properties defined in either the 
default resource 
+                               bundle or the user-provided 
+                               <code>.properties</code> file using the 
+                               <code>resourceBundlePath</code>.</li>
+        </ul>
+        <p>Developer specified attributes provided by an 
<code>&lt;netui:attribute></code> tag 
+                       will override the values set in both the default and 
user-defined 
+                       <code>.properties</code> files.  For example, to 
+                       override the text used for the "First" page in a pager, 
use:</p>
+
+  <source>&lt;netui:attribute facet="resource" name="pager.msg.first" 
value="My First Page"/></source>
+               </section>
+               </section>
+               <section id="setup_basic_grid"><title>Setting Up a Basic 
Grid</title>
+                                               <p>This section takes you 
through a step by step process of setting up a basic grid
+                               for 'tabular' data, data such as a ResultSet, 
RowSet, or any kind of data
+                               that can easily be set out like table with rows 
and columns.
+                               </p>
+                       <section id="setup_netui-blank"><title>Setup the Page 
Flow Web App Template</title>
+                               <p>To set up a grid you first need a source of 
some tabular data.
+                               Below we use an in-memory ArrayList as the 
source 
+                               of tabluar data.  In a real web application, 
this data source would 
+                               come from a database, but the in-memory source 
is sufficient for learning 
+                               how to render a data grid.</p> 
+                               <p>In these setup instructions, we assume that 
you are using Tomcat as your web
+                                       application container.</p>
+                               <p> Begin by copying the folder 
BEEHIVE_HOME/samples/netui-blank into 
+                                       CATALINA_HOME/webapps.  
+                               </p>
+                               <p>Rename the folder 
<strong>netui-blank</strong> to the name <strong>gridSample</strong>.</p>
+                               </section>
+                       <section id="setup_datasource"><title>Create an 
In-Memory Data Source</title>
+                               <p>Now that the Page Flow template is set up, 
we are ready to create a 
+                                       data object (i.e., an ArrayList) 
suitable for rendering as a data grid.</p>
+                       <p><strong>Edit the Controller class</strong></p>
+                               <p>Edit the 
+                               file <code>gridSample/Controller.jpf</code> as 
+                               follows.  Code to edit is shown in bold.</p>
+                               
<p><strong><code>gridSample/Controller.jpf</code></strong></p>
+<source>import javax.servlet.http.HttpSession;
+
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
[EMAIL PROTECTED](
+    simpleActions={
+        @Jpf.SimpleAction(name="begin", path="index.jsp")
+    },
+    sharedFlowRefs={
+        @Jpf.SharedFlowRef(name="shared", type=shared.SharedFlow.class)
+    }
+)
+public class Controller 
+    extends PageFlowController
+{
+    @Jpf.SharedFlowField(name="shared")
+    private shared.SharedFlow sharedFlow;
+
+    <strong>public java.util.ArrayList pets = new ArrayList();</strong>
+
+    /**
+     * Callback that is invoked when this controller instance is created.
+     */
+    protected void onCreate()
+    {<strong>
+      // build the pets ArrayList
+
+        PetType pet1 = new PetType(1, "American Tabby", "Cat", 20.00);
+        PetType pet2 = new PetType(2, "Short Haired", "Cat", 20.00);
+        PetType pet3 = new PetType(3, "Long Haired", "Cat", 20.00);
+        PetType pet4 = new PetType(4, "Blue Russian", "Cat", 80.00);
+        PetType pet5 = new PetType(5, "Pixy Bob", "Cat", 20.00);
+        PetType pet6 = new PetType(6, "Siamese", "Cat", 80.00);
+        PetType pet7 = new PetType(7, "Minx", "Cat", 20.00);
+        PetType pet8 = new PetType(8, "Bull Mastif", "Dog", 350.00);
+        PetType pet9 = new PetType(9, "Dalmatian", "Dog", 20.00);
+         
+        pets.add(pet1);
+        pets.add(pet2);
+        pets.add(pet3);
+        pets.add(pet4);
+        pets.add(pet5);
+        pets.add(pet6);
+        pets.add(pet7);
+        pets.add(pet8);
+        pets.add(pet9);</strong>
+    }
+
+    /**
+     * Callback that is invoked when this controller instance is destroyed.
+     */
+    protected void onDestroy(HttpSession session)
+    {
+    }
+
+    <strong>// PetType Bean
+    public class PetType 
+    {
+
+        private int petID;
+        private String name;
+        private String description;
+        private double price;
+
+        public PetType() {}
+
+        public PetType(int petID, String name, String description, double 
price) {
+            this.petID= petID;
+            this.name = name;
+            this.description = description;
+            this.price = price;
+        }
+
+        public int getPetID() {return petID;}
+        public String getName() {return name;}
+        public String getDescription() {return description;}
+        public double getPrice() {return price;}
+    }</strong> 
+}</source>
+                <p>You now have an in-memory data source of tabular data.  
+                                       In the next step you will 
+                                       point a data grid at this data to 
render it as HTML.  </p>
+                               <p><strong>Compile the Page Flow Web App 
Template</strong></p>
+                                       <p>Before proceeding, you should 
compile the web app.</p>
+                                         <p>The compile step is necessary
+                                       because you have modified the 
Controller.jpf file.  In the steps below,
+                                       where you only modify the JSP page 
<code>index.jsp</code>, 
+                                       you will *not* need to recompile the 
app to view your changes.</p>
+                <p>To compile, edit the properties (1) 
<code>beehive.home</code>
+                                       and (2) <code>contextPath</code> in the 
+                                       file 
<code>gridSample/WEB-INF/src/build.properties</code>, for example:</p>
+                                       
<source>beehive.home=C:/apache/apache-beehive-1.0
+contextPath=gridSample</source>
+                               <p>Then enter the following Ant command:</p>
+                               <source>ant -f 
%CATALINA_HOME%\webapps\gridSample\WEB-INF\src\build.xml clean build</source>
+                               </section>
+                       <section id="basic_grid"><title>Render a Basic Data 
Grid</title>
+                                       <p>Edit 
<code>gridSample/index.jsp</code> so it appears as follows.</p>
+                               
<p><strong><code>gridSample/index.jsp</code></strong></p>
+                       <source>&lt;%@ page language="java" 
contentType="text/html;charset=UTF-8"%>
+&lt;%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0"; 
prefix="netui-data"%>
+&lt;%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0"; 
prefix="netui"%>
+&lt;%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0"; 
prefix="netui-template"%>
+&lt;netui:html>
+  &lt;head>
+    &lt;title><strong>Data Grid</strong>&lt;/title>
+    &lt;netui:base/>
+  &lt;/head>
+  &lt;netui:body>
+<strong>    &lt;netui-data:dataGrid dataSource="pageFlow.pets" name="petGrid">
+        &lt;netui-data:rows>
+            &lt;netui-data:spanCell value="${container.item.petID}" />
+            &lt;netui-data:spanCell value="${container.item.name}" />
+            &lt;netui-data:spanCell value="${container.item.description}"/>
+            &lt;netui-data:spanCell value="${container.item.price}"/>
+        &lt;/netui-data:rows>
+    &lt;/netui-data:dataGrid></strong>
+  &lt;/netui:body>
+&lt;/netui:html></source>                              
+<p>When you visit the URL</p>
+<source>http://localhost:8080/gridSample/</source>
+<p>you should see the following page</p>
+<figure alt="categoryGrid1" src="images/categoryGrid1.gif"/>
+       <p>The tabular data is rendered as an HTML table, by the remaining tags 
+       (&lt;netui-data:rows> and &lt;netui-data:spanCell).  <!--[todo: more 
description here]--></p>
+<p>Here is the renderd HTML table.</p>
+<source>    Page 1 of 1&nbsp;&nbsp;&nbsp;
+&lt;table class="datagrid">
+&lt;tr class="datagrid-even">
+            &lt;td class="datagrid">&lt;span>1&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>American Tabby&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>Cat&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>20.0&lt;/span>&lt;/td>
+&lt;/tr>
+&lt;tr class="datagrid-odd">
+            &lt;td class="datagrid">&lt;span>2&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>Short Haired&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>Cat&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>20.0&lt;/span>&lt;/td>
+&lt;/tr>
+&lt;tr class="datagrid-even">
+            &lt;td class="datagrid">&lt;span>3&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>Long Haired&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>Cat&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>20.0&lt;/span>&lt;/td>
+&lt;/tr>
+&lt;tr class="datagrid-odd">
+            &lt;td class="datagrid">&lt;span>4&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>Blue Russian&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>Cat&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>80.0&lt;/span>&lt;/td>
+&lt;/tr>
+&lt;tr class="datagrid-even">
+            &lt;td class="datagrid">&lt;span>5&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>Pixy Bob&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>Cat&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>20.0&lt;/span>&lt;/td>
+&lt;/tr>
+&lt;tr class="datagrid-odd">
+            &lt;td class="datagrid">&lt;span>6&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>Siamese&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>Cat&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>80.0&lt;/span>&lt;/td>
+&lt;/tr>
+&lt;tr class="datagrid-even">
+            &lt;td class="datagrid">&lt;span>7&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>Minx&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>Cat&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>20.0&lt;/span>&lt;/td>
+&lt;/tr>
+&lt;tr class="datagrid-odd">
+            &lt;td class="datagrid">&lt;span>8&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>Bull Mastif&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>Dog&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>350.0&lt;/span>&lt;/td>
+&lt;/tr>
+&lt;tr class="datagrid-even">
+            &lt;td class="datagrid">&lt;span>9&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>Dalmatian&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>Dog&lt;/span>&lt;/td>
+            &lt;td class="datagrid">&lt;span>20.0&lt;/span>&lt;/td>
+&lt;/tr>
+    &lt;/table>
+</source>
+<p>The stages of the rendering are described below.</p>
+<p>First the data set is passed to the data grid tag 
+       through the <code>dataSource</code> attribute:</p>
+<source>&lt;netui-data:dataGrid name="productsGrid" 
<strong>dataSource="pageFlow.pets"</strong>></source>
+<p>The data grid tag then analyzes the data set and iterates over its parts.  
In this case, the 
+       data grid iterates over the elements in the ArrayList.  Typically, a 
single element
+       in the iteration is rendered as a single row in the HTML table.</p>
+       <p>During the iteration, that data becomes accessible through
+       the databinding contexts <strong><code>container</code></strong>, 
+               <strong><code>item</code></strong>, and 
<strong><code>index</code></strong>.
+       </p>
+       <ul>
+               <li><strong><code>container</code></strong> refers to the data 
set passed into the data grid.</li>
+               <li><strong><code>container.item</code></strong> refers to the 
current row 
+               of the data set.  <code>container.item</code> refers to each row
+               as the data grid iterates through the set.</li>
+               <li><strong><code>container.item.[field_name]</code></strong> 
refers to an individual
+               field of the current row.</li>
+               <li><strong><code>container.index</code></strong> refers to the 
integer index of the current
+               row.</li>
+       </ul>
+
+       <p>The &lt;netui-data:rows> tag controls the rendering of the &lt;tr> 
tags.  Through the 
+       &lt;netui-data:rows> tag, you can control the attributes of the 
rendered &lt;tr> tags, attribute
+       such as <code>align</code>, <code>valign</code>, and 
<code>style</code>.</p>
+
+<p>In a similar way, the &lt;netui-data:spanCell> tag controls the rendering 
of the &lt;td> tags.</p>
+                               
+                               </section>
+                       <section id="header"><title>Adding a Header</title>
+<p>To add a table header, use the &lt;netui-data:headerCell> tag.</p>
+<p>Edit <code>index.jsp</code> so it appears as follows.</p>
+<source>&lt;%@ page language="java" contentType="text/html;charset=UTF-8"%>
+&lt;%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0"; 
prefix="netui-data"%>
+&lt;%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0"; 
prefix="netui"%>
+&lt;%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0"; 
prefix="netui-template"%>
+&lt;netui:html>
+  &lt;head>
+    &lt;title>Grid Sample&lt;/title>
+    &lt;netui:base/>
+  &lt;/head>
+  &lt;netui:body>
+    &lt;netui-data:dataGrid dataSource="pageFlow.pets" name="petGrid">
+        <strong>&lt;netui-data:header>
+            &lt;netui-data:headerCell headerText="Pet ID Number" />
+            &lt;netui-data:headerCell headerText="Name"/>
+            &lt;netui-data:headerCell headerText="Description"/>
+            &lt;netui-data:headerCell headerText="Price"/>
+        &lt;/netui-data:header></strong>
+        &lt;netui-data:rows>
+            &lt;netui-data:spanCell value="${container.item.petID}" />
+            &lt;netui-data:spanCell value="${container.item.name}" />
+            &lt;netui-data:spanCell value="${container.item.description}"/>
+            &lt;netui-data:spanCell value="${container.item.price}"/>
+        &lt;/netui-data:rows>
+    &lt;/netui-data:dataGrid>
+  &lt;/netui:body>
+&lt;/netui:html></source>
+<p>Refresh the browser.  You should see the following page.</p>
+<figure alt="categoryGrid2" src="images/categoryGrid2.gif"></figure>
+<p>The &lt;netui-data:headerCell> renders the following HTML 
<code>&lt;tr>&lt;th></code> row.</p>
+<source>&lt;tr class="datagrid-header">
+    &lt;th class="datagrid">Pet ID Number&lt;/th>
+    &lt;th class="datagrid">Name&lt;/th>
+    &lt;th class="datagrid">Description&lt;/th>
+    &lt;th class="datagrid">Price&lt;/th>
+&lt;/tr></source>
+                               </section>
+                       <section id="CSS"><title>Controlling the CSS 
Style</title>
+<p>Notice the various <code>class</code> attributes in the rendered HTML.</p>
+<ul><li><code>class="datagrid"</code></li>
+       <li><code>class="datagrid-header"</code></li>
+       <li><code>class="datagrid-even"</code></li>
+       <li><code>class="datagrid-odd"</code></li></ul>
+       <p>You control the data grid's style by changing the <em>prefix</em> 
rendered in the 
+               <code>class</code> attributes. If no prefix value is explicitly 
specified,
+               the default prefix value is <em>datagrid</em>.</p>
+<p>To put this into practice, first create the following CSS file.</p>
+<p><strong>gridSample/resources/css/style.css</strong></p>
+<source>/* Data grid styles */
+.gridStyle
+{
+color: #111111;
+font-size: 14px;
+text-align: left;
+vertical-align: middle;
+padding: 5px 5px 5px 5px;
+}
+.gridStyle-header
+{
+background-color: #aaddaa;
+color: #FFF;
+vertical-align: baseline;
+line-height: 18px;
+}
+.gridStyle-even
+{
+background-color: #FFFFFF;
+color: #111111;
+font-size: 14px;
+text-align: left;
+border-color: #999999;
+border-style: solid;
+border-width: 1px;
+padding-left: 12px;
+}
+.gridStyle-odd
+{
+background-color: #dddddd;
+color: #111111;
+font-size: 14px;
+text-align: left;
+border-color: #999999;
+border-style: solid;
+border-width: 1px;
+padding-left: 12px;
+}</source>
+<p>To reference this CSS file, edit <code>index.jsp</code> as shown below.</p>
+<p><strong>gridSample/index.jsp</strong></p>
+<source>&lt;%@ page language="java" contentType="text/html;charset=UTF-8"%>
+&lt;%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0"; 
prefix="netui-data"%>
+&lt;%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0"; 
prefix="netui"%>
+&lt;%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0"; 
prefix="netui-template"%>
+<strong>&lt;link 
href="&lt;%=request.getContextPath()%>/resources/css/style.css" type="text/css" 
rel="stylesheet"/></strong>
+&lt;netui:html>
+  &lt;head>
+    &lt;title>Grid Sample&lt;/title>
+    &lt;netui:base/>
+  &lt;/head>
+  &lt;netui:body>
+    &lt;netui-data:dataGrid dataSource="pageFlow.pets" name="petGrid" 
<strong>styleClassPrefix="gridStyle"</strong>>
+        &lt;netui-data:header>
+            &lt;netui-data:headerCell headerText="Pet ID Number" />
+            &lt;netui-data:headerCell headerText="Name"/>
+            &lt;netui-data:headerCell headerText="Description"/>
+            &lt;netui-data:headerCell headerText="Price"/>
+        &lt;/netui-data:header>
+        &lt;netui-data:rows>
+            &lt;netui-data:spanCell value="${container.item.petID}" />
+            &lt;netui-data:spanCell value="${container.item.name}" />
+            &lt;netui-data:spanCell value="${container.item.description}"/>
+            &lt;netui-data:spanCell value="${container.item.price}"/>
+        &lt;/netui-data:rows>
+    &lt;/netui-data:dataGrid>
+  &lt;/netui:body>
+&lt;/netui:html></source>
+<p>The resulting HTML page is shown below.  (You will need to recompile to see 
these changes
+       in the browser.)</p>
+<figure alt="categoryGrid3" src="images/categoryGrid3.gif"/>
+                       </section>
+                       <section id="config_pager">
+                               <title>Configuring the Pager</title>
+                               <p>The "pager" controls how many rows are 
included on a single page of data.</p>
+                               <p>The pager can be configured to appear above 
and/or below the data grid.</p>
+                               
+                               <p>To add a pager, edit <code>index.jsp</code> 
so it appears as
+                                       follows.</p>
+                               
<p><strong><code>gridSample/index.jsp</code></strong></p>
+                               <source>&lt;%@ page language="java" 
contentType="text/html;charset=UTF-8"%>
+&lt;%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0"; 
prefix="netui-data"%>
+&lt;%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0"; 
prefix="netui"%>
+&lt;%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0"; 
prefix="netui-template"%>
+&lt;link href="&lt;%=request.getContextPath()%>/resources/css/style.css" 
type="text/css" rel="stylesheet"/>
+&lt;netui:html>
+  &lt;head>
+    &lt;title>Grid Sample&lt;/title>
+    &lt;netui:base/>
+  &lt;/head>
+  &lt;netui:body>
+    &lt;netui-data:dataGrid dataSource="pageFlow.pets" name="petGrid" 
styleClassPrefix="gridStyle">
+        <strong>&lt;netui-data:configurePager pageSize="3" 
pagerFormat="prevNext" pageAction="begin.do"/></strong>
+        &lt;netui-data:header>
+            &lt;netui-data:headerCell headerText="Pet ID Number" />
+            &lt;netui-data:headerCell headerText="Name"/>
+            &lt;netui-data:headerCell headerText="Description"/>
+            &lt;netui-data:headerCell headerText="Price"/>
+        &lt;/netui-data:header>
+        &lt;netui-data:rows>
+            &lt;netui-data:spanCell value="${container.item.petID}" />
+            &lt;netui-data:spanCell value="${container.item.name}" />
+            &lt;netui-data:spanCell value="${container.item.description}"/>
+            &lt;netui-data:spanCell value="${container.item.price}"/>
+        &lt;/netui-data:rows>
+    &lt;/netui-data:dataGrid>
+  &lt;/netui:body>
+&lt;/netui:html></source>
+                               <p>Refresh the browser. You will see the 
following page.</p>
+                                       <figure alt="categoryGrid4" 
src="images/categoryGrid4.gif"/>
+                               
+
+                       </section>
+               <!--<section id="link_columns"><title>Adding Linking 
Columns</title>
+                       <p>Linking columns allow you to link to details pages 
for individual 
+                               items in the data 
+                               set.</p>
+                       <p>The &lt;netui-data:anchorCell tag adds a linking 
column to the 
+                               data grid.</p>
+                       <p>The child &lt;parameter> tag adds the string 
<code>productId=[some_value]</code>
+                               to the URL.</p>
+                       <source>&lt;%@ page language="java" 
contentType="text/html;charset=UTF-8"%>
+&lt;%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0"; 
prefix="netui-data"%>
+&lt;%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0"; 
prefix="netui"%>
+&lt;link href="&lt;%=request.getContextPath()%>/resources/css/style.css" 
type="text/css" rel="stylesheet"/>
+
+&lt;netui-data:declarePageInput name="products" 
type="org.apache.beehive.samples.petstore.model.Product[]" required="false"/>
+
+&lt;netui-data:dataGrid name="productsGrid" dataSource="pageInput.products" 
styleClassPrefix="gridStyle">
+    &lt;netui-data:configurePager pageSize="3" pagerFormat="prevNext" 
pageAction="viewCategory.do"/>
+    &lt;netui-data:header>
+        &lt;netui-data:headerCell headerText="PetID"/>
+        &lt;netui-data:headerCell headerText="Name"/>
+        &lt;netui-data:headerCell headerText="Description"/>
+    &lt;/netui-data:header>
+    &lt;netui-data:rows>
+        <strong>&lt;netui-data:anchorCell action="viewProduct" 
value="${container.item.productId}">
+            &lt;netui:parameter name="productId" 
value="${container.item.productId}"/>
+        &lt;/netui-data:anchorCell></strong>
+        &lt;netui-data:spanCell value="${container.item.name}" />
+        &lt;netui-data:spanCell value="${container.item.description}"/>
+    &lt;/netui-data:rows>
+&lt;/netui-data:dataGrid></source>
+<p>Notice that the PetId column now appears as linking text. </p>
+<p><img alt="categoryGrid5" src="images/categoryGrid5.gif"/></p>
+                       </section>-->
         <section id="filtering">
             <title>Filtering a Data Grid</title>
+       <p>[todo]</p>
+               <!--<p>A filter is specified using three bits of information - 
the filter expression, 
+               the filter operation, and the filter value.  The filter 
expression is specified 
+               as an attribute on a grid's header cell and is used to loosely 
couple the filetr 
+               information for the header from the data displayed in the 
header.  </p>
+       <source>netui_filter=&lt;grid name>~&lt;filter expression>~&lt;filter 
operation>~&lt;filter value></source>
+       <p>For example, the filter</p> 
+       <source>netui_filter=portfolio~symbol~eq~beas</source> 
+       <p>converts into the SQL filter</p>  
+       <source>WHERE symbol = beas</source>
+       <p>Filters are added to the URL using JavaScript to convert an HTML 
form from the 
+               input fields into query parameters in the above format. </p>-->
         </section>
         <section id="sorting">
             <title>Sorting a Data Grid</title>
+                       <p>[todo]</p>
+<!--<p>A sort is specified using two bits of information - the sort expression 
and the sort 
+       direction.  The sort expression is specified as an attribute on a 
grid's header cell 
+       and is used to loosely couple the sort information for the header from 
the data displayed 
+       in the header.  A sort appears in the URL as:</p>
+
+<source>netui_sort=&lt;grid name>~&lt;direction>&lt;sort 
expression>[,&lt;direction>&lt;sort expression>]</source>
+       
+<p>The sort parameter is scoped to a data grid using the &lt;grid name>.  The 
&lt;direction> 
+       defaults to ascending and is set to descending when &lt;direction> is 
"-"
+There can be two sorts specified in the query param; if two are present, they 
are 
+separated by a comma.</p>
+
+<p>A sort link is added to a &lt;headerCell> when the disableFilterRendering 
attribute is false.  
+       If set to true, no sort link is rendered.  The sort link for a header 
cell consists of all 
+       of the parameters on the previous URL with the direction of the current 
column's sort 
+       switched using the following state transitions:</p>
+
+<ul>
+       <li>no sort > ascending</li>
+       <li>ascending > descending</li>
+       <li>descending > no sort</li>
+</ul>-->
         </section>
-               <section>
+        <section><title>Nesting Data Grids</title></section>
+                       </section>
+<!--           <section id="sample_code">
                        <title>Sample Code</title>
+                       
+                       <p><strong>carDB.java</strong></p>
+                       <source>package controls.data;
+
+import java.sql.SQLException;
+import java.sql.ResultSet;
+import org.controlhaus.jdbc.JdbcControl;
+
+/** 
+ * This control contains access to the car inventory
+ */ 
+
[EMAIL PROTECTED]
[EMAIL PROTECTED](databaseDriverClass="org.apache.derby.jdbc.EmbeddedDriver", 
databaseURL="jdbc:derby:C:/beehive_projects/Westside/Westside/data/testdb")
+
+public interface carDB extends JdbcControl {
+    
+    // countCars() - this is more of a test to see if everything is working
+    @SQL(statement="SELECT COUNT(*) FROM CARS")
+    public int countCars() throws SQLException;
+    
+    // getInventoryRS() - get all the cars from the inventory view
+    @SQL(statement="SELECT * FROM CARINVENTORY")
+    public ResultSet getInventoryRS() throws SQLException;
+
+    // getItem() - get an individual car from the inventory view
+    @SQL(statement="SELECT * FROM CARINVENTORY WHERE SKU = {nSKU}")
+    public ResultSet getItem(int nSKU) throws SQLException;
+}</source>
                        <p><strong>Controller.jpf</strong></p>
                        <source>import java.sql.ResultSet;
 import javax.servlet.http.HttpSession;
@@ -127,6 +1003,6 @@
         &lt;/blockquote>
     &lt;/netui-template:section>
 &lt;/netui-template:template></source>
-               </section>
+               </section>-->
 </body>
 </document>

Modified: 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_jsp.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_jsp.xml?view=diff&r1=159717&r2=159718
==============================================================================
--- 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_jsp.xml
 (original)
+++ 
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/pageflow_jsp.xml
 Fri Apr  1 10:57:33 2005
@@ -8,7 +8,6 @@
 
   <section id="introduction">
     <title>Introduction</title>
-
     <p>
     Continuing with the same model used in previous pages of this 
documentation set,
     examples will reference this:
@@ -20,9 +19,20 @@
 
     <p>
     Java Page Flow adds a handful of tag libraries to normal JSP usage to 
assist with the
-    binding of the JSP pages to the controller class.  Of primary importance 
is the
-    <code>netui/tags-html</code> taglib.  Other taglibs provide additional 
functionality
+    binding of the JSP pages to the controller class.  Of primary importance 
in this topic is the
+    <a 
href="../apidocs/taglib/taglib-overview-summary.html#netui"><code>&lt;netui:xxx></code></a>
 
+       tag library.</p>  
+       <p>Other tag libraries provide additional functionality.  The  
+       <a 
href="../apidocs/taglib/taglib-overview-summary.html#netui-data"><code>&lt;netui-data:xxx></code></a>
+       tag library binds to complex data sets (especially result sets) and 
renders them as HTML.
+       The <a 
href="../apidocs/taglib/taglib-overview-summary.html#netui-template"><code>&lt;netui-template:xxx></code></a>
+       tag library lets you templatize common parts of the presentation layer, 
so that you can re-use
+       common elements (such as headers, footers, etc.) across the different 
JSP pages in the web app. 
     </p>
+       
+       <p>Page Flows also make extensive use of <strong><em>databinding 
expressions</em></strong>
+       to bind the JSP pages to data in the controller class.  For a detailed 
explanation
+       of databinding expressions see <a 
href="site:pageflow_databinding">Databinding: Passing Data Between Controller 
Classes and JSP Pages</a> </p>  
 
   </section>
 

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&r1=159717&r2=159718
==============================================================================
--- 
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 Apr  1 10:57:33 2005
@@ -38,6 +38,27 @@
                                                
<li><code>JAVA_HOME/bin</code></li>
                                        </ul>
                        </section>
+            <section id="make_proj">
+                <title>Make a Project Folder</title>
+                <p>On your C: drive, create a directory named 
<code>beehive_projects</code>.</p>
+                <p>Copy the folder 
<code>&lt;BeehiveRoot>/samples/netui-blank</code> into 
+                                       <code>C:/beehive_projects</code>. 
(<code>&lt;BeehiveRoot</code> is the top level 
+                                       folder of your Beehive installation; a 
typical value might be 
+                                       
<code>C:/apache/apache-beehive-1.0</code>.)</p>
+                               <p>Rename the folder 
+                                       
<code>C:/beehive_projects/</code><strong><code>netui-blank</code></strong> to 
the name 
+                                       
<code>C:/beehive_projects/</code><strong><code>pageflow_tutorial</code></strong></p>
+                               <p>Before proceeding, confirm that the 
following directory structure exists:</p>
+                <source>C:
+  beehive_projects
+    pageflow_tutorial
+      resources
+      WEB-INF
+      Controller.jpf
+      error.jsp
+      index.jsp</source>
+            </section>
+                       
                        <section id="edit_properties_file"><title>Edit the 
<code>build.properties</code> File</title>
                                <p>In this section you will edit the 
<code>build.properties</code> file--the file
                                        that sets the build-related properties 
for your web application.</p>
@@ -45,17 +66,16 @@
                                        in a text editor.</p>
                                <p>Edit the <code>beehive.home</code> property 
points to the 
                                        top-level folder of your beehive 
installation.</p>  
-                               <p>Edit the <code>context.path</code> property 
so it has the value <code>pageflow_tutorial</code>.
-                                       (See the example below.)</p>
-                               <p>For example, if you beehive installation
+                               <p>Add the line 
<strong><code>contextPath=pageflow_tutorial</code></strong> (as shown 
below).</p>
+                               <p>For example, if your beehive installation
                                        resides at 
<code>C:/apache/apache-beehive-1.0</code>, then your 
<code>build.properties</code> file
                                        would appear as follows.</p>
                                
<source>beehive.home=<strong>C:/apache/apache-beehive-1.0</strong>
+<strong>contextPath=pageflow_tutorial</strong>
 
 servlet-api.jar=${os.CATALINA_HOME}/common/lib/servlet-api.jar
 jsp-api.jar=${os.CATALINA_HOME}/common/lib/jsp-api.jar
-
-context.path=<strong>pageflow_tutorial</strong></source>
+</source>
                                        </section>
             <section id="start_tomcat">
                 <title>To Start the Tomcat Server</title>
@@ -93,24 +113,6 @@
                                step, you will create a more complex Action 
method.
                                </p>
             </section>
-            <section id="make_proj">
-                <title>Make a Project Folder</title>
-                <p>On your C: drive, create a directory named 
<code>beehive_projects</code>.</p>
-                <p>Copy the folder 
<code>BEEHIVE_HOME/samples/netui-blank</code> into 
-                                       <code>C:/beehive_projects</code>.</p>
-                               <p>Rename the folder 
-                                       
<code>C:/beehive_projects/</code><strong><code>netui-blank</code></strong> to 
the name 
-                                       
<code>C:/beehive_projects/</code><strong><code>pageflow_tutorial</code></strong></p>
-                               <p>Before proceeding, confirm that the 
following directory structure exists:</p>
-                <source>C:
-  beehive_projects
-    pageflow_tutorial
-      resources
-      WEB-INF
-      Controller.jpf
-      error.jsp
-      index.jsp</source>
-            </section>
 <!--            <section id="copy_JARs">
                 <title>To Copy Runtime JARs to the Project Folder</title>
                 <p>In this step you will assemble the runtime resources for 
your Page Flow application.  
@@ -209,23 +211,6 @@
 ant -f C:\beehive_projects\pageflow_tutorial\WEB-INF\src\build.xml clean build 
war</source>
 <p>To deploy the application, copy the WAR file into Tomcat's 
<code>webapps</code> directory.</p>
 <source>copy C:\beehive_projects\pageflow_tutorial.war 
%CATALINA_HOME%\webapps</source>
-       <!--    <p>To deploy the web application, click the following link.  We 
recommend that you open the 
-               link in a new browser window.  Each time you want to redeploy 
the application,
-               simply refresh the browser.</p>  
-    <p class="quote">
-         <a class="fork" 
href="http://localhost:8080/manager/deploy?path=/pageflow_tutorial&amp;war=file:C:/beehive_projects/pageflow_tutorial&amp;update=true";>http://localhost:8080/manager/deploy?path=/pageflow_tutorial&amp;war=file:C:/beehive_projects/pageflow_tutorial&amp;update=true</a>
-       </p>
-       <p>If you are prompted for a username/password, enter: 
<code>manager/manager</code></p>
-       <p>(For an explanation of this method of deploying an application to 
Tomcat, 
-               see the Tomcat 5 documentation: 
-               <a class="fork" 
href="http://jakarta.apache.org/tomcat/tomcat-5.0-doc/manager-howto.html#Deploy%20A%20New%20Application%20from%20a%20Local%20Path";>Deploy
 A New Application from a Local Path</a>)</p>    
-    <p>And alternative build/deploy cycle is shown below.</p>
-       <p>cd to the directory 
<code>C:/beehive_projects/pageflow_tutorial/WEB-INF/src</code></p>
-    <p>To build an application WAR file, run the following Ant command.</p>
-    <source>ant build war -DcontextPath=pageflow_tutorial</source>     
-       <p>To deploy the WAR file to Tomcat, move it into Tomcat's 
<code>webapps</code> directory.</p>
-       <source>copy ..\..\..\pageflow_tutorial.war 
%CATALINA_HOME%\webapps</source>
--->
                        </section>
             <section id="test_2">
                 <title>To Test the Page Flow Web Application</title>
@@ -326,23 +311,6 @@
 <source>copy C:\beehive_projects\pageflow_tutorial.war 
%CATALINA_HOME%\webapps</source>
 <p>If you are asked to overwrite the old WAR file, enter 'Yes'.</p>
 <p>Wait a few seconds for Tomcat to redeploy the WAR file, then move on to the 
next step.</p>
-       <!--    <p>To deploy the web application, click the following link.  We 
recommend that you open the 
-               link in a new browser window.  Each time you want to redeploy 
the application,
-               simply refresh the browser.</p>  
-    <p class="quote">
-         <a class="fork" 
href="http://localhost:8080/manager/deploy?path=/pageflow_tutorial&amp;war=file:C:/beehive_projects/pageflow_tutorial&amp;update=true";>http://localhost:8080/manager/deploy?path=/pageflow_tutorial&amp;war=file:C:/beehive_projects/pageflow_tutorial&amp;update=true</a>
-       </p>
-       <p>If you are prompted for a username/password, enter: 
<code>manager/manager</code></p>
-       <p>(For an explanation of this method of deploying an application to 
Tomcat, 
-               see the Tomcat 5 documentation: 
-               <a class="fork" 
href="http://jakarta.apache.org/tomcat/tomcat-5.0-doc/manager-howto.html#Deploy%20A%20New%20Application%20from%20a%20Local%20Path";>Deploy
 A New Application from a Local Path</a>)</p>    
-    <p>And alternative build/deploy cycle is shown below.</p>
-       <p>cd to the directory 
<code>C:/beehive_projects/pageflow_tutorial/WEB-INF/src</code></p>
-    <p>To build an application WAR file, run the following Ant command.</p>
-    <source>ant build war -DcontextPath=pageflow_tutorial</source>     
-       <p>To deploy the WAR file to Tomcat, move it into Tomcat's 
<code>webapps</code> directory.</p>
-       <source>copy ..\..\..\pageflow_tutorial.war 
%CATALINA_HOME%\webapps</source>
--->
                        </section>
             <section id="test_3">
                 <title>To Test the Page Flow Web Application</title>
@@ -480,18 +448,21 @@
             </section>
             <section id="compile_redeploy">
                 <title>To Compile and Redeploy the Page Flow</title>
+                <p>You are now ready to compile the Page Flow and deploy it to 
Tomcat.</p>
                 <p>At the command prompt, enter:</p>
 <source>ant 
   -f C:\beehive_projects\pageflow_tutorial\WEB-INF\src\build.xml
+  clean
   build
+  war
 
 <strong>Copy and Paste version:</strong>
-ant -f C:\beehive_projects\pageflow_tutorial\WEB-INF\src\build.xml 
build</source>
-       <p>To deploy the web application, click the following link. (Or, if you 
have the link below
-               open in a dedicated browser window, refresh that browser 
window.)</p>  
-    <p class="quote">
-         <a class="fork" 
href="http://localhost:8080/manager/deploy?path=/pageflow_tutorial&amp;war=file:C:/beehive_projects/pageflow_tutorial&amp;update=true";>http://localhost:8080/manager/deploy?path=/pageflow_tutorial&amp;war=file:C:/beehive_projects/control_tutorial&amp;update=true</a>
-       </p></section>
+ant -f C:\beehive_projects\pageflow_tutorial\WEB-INF\src\build.xml clean build 
war</source>
+<p>To deploy the application, copy the WAR file into Tomcat's 
<code>webapps</code> directory.</p>
+<source>copy C:\beehive_projects\pageflow_tutorial.war 
%CATALINA_HOME%\webapps</source>
+<p>If you are asked to overwrite the old WAR file, enter 'Yes'.</p>
+<p>Wait a few seconds for Tomcat to redeploy the WAR file, then move on to the 
next step.</p>
+</section>
            <section id="test">
                 <title>To Test the Page Flow Web Application</title>
                 <p>Visit the following link: 
@@ -558,18 +529,21 @@
             </section>
             <section id="compile_5">
                 <title>To Compile and Redeploy the Page Flow</title>
+                <p>You are now ready to compile the Page Flow and deploy it to 
Tomcat.</p>
                 <p>At the command prompt, enter:</p>
 <source>ant 
   -f C:\beehive_projects\pageflow_tutorial\WEB-INF\src\build.xml
+  clean
   build
+  war
 
 <strong>Copy and Paste version:</strong>
-ant -f C:\beehive_projects\pageflow_tutorial\WEB-INF\src\build.xml 
build</source>
-       <p>To deploy the web application, click the following link. (Or, if you 
have the link below
-               open in a dedicated browser window, refresh that browser 
window.)</p>  
-    <p class="quote">
-         <a class="fork" 
href="http://localhost:8080/manager/deploy?path=/pageflow_tutorial&amp;war=file:C:/beehive_projects/pageflow_tutorial&amp;update=true";>http://localhost:8080/manager/deploy?path=/pageflow_tutorial&amp;war=file:C:/beehive_projects/control_tutorial&amp;update=true</a>
-       </p></section>
+ant -f C:\beehive_projects\pageflow_tutorial\WEB-INF\src\build.xml clean build 
war</source>
+<p>To deploy the application, copy the WAR file into Tomcat's 
<code>webapps</code> directory.</p>
+<source>copy C:\beehive_projects\pageflow_tutorial.war 
%CATALINA_HOME%\webapps</source>
+<p>If you are asked to overwrite the old WAR file, enter 'Yes'.</p>
+<p>Wait a few seconds for Tomcat to redeploy the WAR file, then move on to the 
next step.</p>
+</section>
             <section>
                 <title>To Test the Page Flow Web Application</title>
                 <p>Visit the following link: 


Reply via email to