Modified: beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml URL: http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml?rev=263967&r1=263966&r2=263967&view=diff ============================================================================== --- beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml (original) +++ beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tutorial_pageflow.xml Sun Aug 28 16:49:01 2005 @@ -2,25 +2,25 @@ <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd"> <document> <header> - <title>Beehive Page Flow Tutorial</title> + <title>Beehive NetUI Tutorial</title> </header> <body> <section id="intro"> <title>Introduction</title> - <p>The Page Flow tutorial is provided as a way to become familiar with NetUI's Page Flow Controllers and JSP tags. The tutorial - walks through creating, building, and deploying a sample project Page Flow that uses JavaBeans to submit data from a browser + <p>The NetUI tutorial is provided as a way to become familiar with NetUI's Page Flow controllers and JSP tags. The tutorial + walks through creating, building, and deploying a sample project page flow that uses JavaBeans to submit data from a browser to the server.</p> <section id="goals"> <title>Tutorial Goals</title> <ul> - <li>How to create a basic Page Flow web application.</li> + <li>How to create a basic NetUI web application.</li> <li>How to coordinate user navigation with Forward methods.</li> <li>How to handle data submission and processing with data binding and Form Beans.</li> <li>How to create a user interface with the <netui> JSP tag library.</li> - <li>How Page Flows help to separate data processing and data presentation.</li> + <li>How page flows help to separate data processing and data presentation.</li> <li>How to use declarative validation with data submission.</li> - <li>How to collect data from a nested Page Flow and 'return' it to the nesting Page Flow.</li> - <li>How to make an action available to multiple Page Flows.</li> + <li>How to collect data from a nested page flow and 'return' it to the nesting page flow.</li> + <li>How to make an action available to multiple page flows.</li> </ul> </section> </section> @@ -34,7 +34,7 @@ <title>Create a Beehive-enabled Web Project</title> <p> In order to follow the steps in this tutorial, it's necessary to create a Beehive-enabled web application. Beehive-enabled web applications - are described <a href="index.html">here</a>. A skeleton Beehive-enabled web project is provided in the samples/ directory as + are described <a href="site:setup">here</a>. A skeleton Beehive-enabled web project is provided in the samples/ directory as <a href="site:netui-blank">netui-blank</a>. This contains a basic Ant build file and an example Page Flow controller. To create the tutorial's project, we'll copy and then rename the <a href="site:netui-blank">netui-blank</a> project using these steps: </p> @@ -110,7 +110,7 @@ <section id="setup_urls"> <title>Using URLs in the Examples</title> <p> - In the Beehive tutorials, you will often encounter URLs like <code>http://localhost:8080/pageflow_tutorial/begin.do</code>. + In the Beehive tutorials, you will often encounter URLs like <code>http://localhost:8080/pageflow_tutorial/Controller.jpf</code>. When you see these URLs, they are meant to be accessed via your web browser to demonstrate functionality built in the tutorial. These URLs are setup to run on Tomcat, so if you are unable to run these URLs, be sure that they are appropriate for your application server. Specifically, check the port numbers to make sure that your server is running on the @@ -123,32 +123,32 @@ <section id="create_overview"> <title>Overview</title> <p> - In this step you will create a Controller file and a JSP page. These are the basic files in - a Beehive Page Flow web application. Each Page Flow contains one Controller file and any - number of JSP pages. A Controller file is a Java class that + In this step you will create a controller class and a JSP. These are the basic files in + a Beehive NetUI web application. Each page flow contains one controller class and any + number of JSPs. A controller class is a Java class that controls how your web application functions and what it does. The methods in the Controller file determine all of the major features of a web application: how users navigate from page to page, how user requests are handled, and how the web application accesses back-end - resources. The JSP pages determine what a visitor to the web sees in the browser. + resources. The JSPs determine what a visitor to the web sees in the browser. </p> <p> In terms of the Model-View-Controller paradigm for web applications, the Controller.java - file is the Controller (naturally) and the JSP pages are the View. The web application's + file is the Controller (naturally) and the JSPs are the View. The web application's Model in this tutorial is very simple: it consists of three fields that represent the user's name, age and selected sport activity. <!--[tbd: more, explain]--> </p> <p> - Controller files contain Action methods. An Action method may do something simple, such - as forward a user from one JSP page to another; or it may do a complex set of tasks, such - as receive user input from a JSP page, calculate and/or retrieve other data based on the - user input, and forward the user to a JSP page where the results are displayed. + controller classs contain Action methods. An Action method may do something simple, such + as forward a user from one JSP to another; or it may do a complex set of tasks, such + as receive user input from a JSP, calculate and/or retrieve other data based on the + user input, and forward the user to a JSP where the results are displayed. <!--[tbd: diagram, etc.]--> </p> <p> - The Controller file in this step contains one simple Action method. This - simple navigational Action method forwards users to the index.jsp page. In the next + The controller class in this step contains one simple Action method. This + simple navigational Action method forwards users to the <code>index.jsp</code> page. In the next step, you will create a more complex Action method. </p> </section> @@ -158,16 +158,16 @@ to learn about the code you are about to run.</p> <p>Open the file <code>pageflow_tutorial/Controller.java</code>. </p> - <p>The Controller file is an ordinary Java class with methods and annotations.</p> + <p>The controller class is an ordinary Java class with methods and annotations.</p> <p>A Page Flow controller class must extend <code>org.apache.beehive.netui.pageflow.PageFlowController</code> and be decorated by the annotation <code>@Jpf.Controller</code>.</p> <p>The <code>onCreate()</code> method is executed whenever the Controller class is first instantiated. The <code>onDestroy()</code> method is executed when the Controller class is destroyed.</p> - <p>After the <code>onCreate()</code> method is run, the Page Flow runtime + <p>After the <code>onCreate()</code> method is run, the NetUI runtime searches for (and runs) a method or action named <code>begin</code>. - In this Controller file, there is a simple action named <code>begin</code>: + In this controller class, there is a simple action named <code>begin</code>: </p> <source>@Jpf.SimpleAction(name="begin", path="index.jsp")</source> <p>The begin action <em>could</em> have been expressed using method syntax: </p> @@ -183,7 +183,7 @@ </source> <p>We have used the Simple Action syntax for the sake of syntactical simplicity. The Simple Action will forward the user to the JSP, index.jsp.</p> <p>The Controller class is instantiated when a user calls it via the URL:</p> - <source>http://localhost:8080/pageflow_tutorial/begin.do</source> + <source>http://localhost:8080/pageflow_tutorial/Controller.jpf</source> <p>The URL above means this: "Run the <code>begin</code> action of the <code>Controller.java</code> class in the directory <code>pageflow_tutorial</code>."</p> <p><strong><code>Controller.java</code></strong></p> @@ -236,7 +236,7 @@ </section> <section id="create_build_deploy"> <title>Compile and Deploy the Web Application</title> - <p>You are now ready to compile the Page Flow and deploy it to Tomcat.</p> + <p>You are now ready to compile the page flow and deploy it to Tomcat.</p> <p>The following Ant command assumes that you are in the <code>pageflow_tutorial/WEB-INF/src</code> directory. At the command prompt, enter:</p> <source> @@ -259,16 +259,16 @@ <p>If you are not using Tomcat, follow your server's web application deployment instructions to deploy the webapp.</p> </section> <section id="create_test"> - <title>Test the Page Flow Web Application</title> + <title>Test the NetUI Web Application</title> <p>Visit the following address:</p> - <p><a class="fork" href="http://localhost:8080/pageflow_tutorial/begin.do">http://localhost:8080/pageflow_tutorial/begin.do</a></p> + <p><a class="fork" href="http://localhost:8080/pageflow_tutorial/Controller.jpf">http://localhost:8080/pageflow_tutorial/Controller.jpf</a></p> <p>You will be directed to the <code>index.jsp</code> page.</p> </section> </section> <section id="navigate"> <title>Step 3: Navigation</title> <section id="navigate_create_page"> - <title>Create a Destination JSP Page</title> + <title>Create a Destination JSP</title> <p>In the directory <code>pageflow_tutorial</code>, create a file named <code>page2.jsp</code>.</p> <p>Edit page2.jsp so it appears as follows.</p> <p><strong><code>page2.jsp</code></strong></p> @@ -291,7 +291,7 @@ </section> <section id="navigate_create_link"> <title>Create a Link to the Destination Page</title> - <p>In this step you will create a link from the JSP, <code>index.jsp</code> to a new Simple Action that you will add to the Controller file.</p> + <p>In this step you will create a link from the JSP, <code>index.jsp</code> to a new Simple Action that you will add to the controller class.</p> <p>Open the file <code>pageflow_tutorial/index.jsp</code>.</p> <p>Edit <code>index.jsp</code> so it appears as follows. The code to add appears in bold type.</p> <p><strong><code>index.jsp</code></strong></p> @@ -349,16 +349,16 @@ </section> <section id="navigate_build_deploy"> <title>Compile and Redeploy the Web Application</title> -<p>Compile and deploy the Page Flow using the same Ant and copy commands used in <a href="#create_build_deploy">step 2</a>.</p> +<p>Compile and deploy the page flow using the same Ant and copy commands used in <a href="#create_build_deploy">step 2</a>.</p> <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="navigate_run"> - <title>Test the Page Flow Web Application</title> + <title>Test the NetUI Web Application</title> <p>Visit the following link: </p> - <p><a class="fork" href="http://localhost:8080/pageflow_tutorial/begin.do">http://localhost:8080/pageflow_tutorial/begin.do</a></p> - <p>You will be directed to the index.jsp page.</p> + <p><a class="fork" href="http://localhost:8080/pageflow_tutorial/Controller.jpf">http://localhost:8080/pageflow_tutorial/Controller.jpf</a></p> + <p>You will be directed to the <code>index.jsp</code> page.</p> <p>Click the link.</p> <p>You will be directed to page2.jsp.</p> </section> @@ -368,7 +368,7 @@ <section id="forms_create"> <title>Create a Submission Form</title> <p>This step illustrates the use of custom tags to render an HTML form tag and link it to an Action. - In a later step, the new Action will be added to the Controller file to handle the data submission.</p> + In a later step, the new Action will be added to the controller class to handle the data submission.</p> <p>Edit the file <code>pageflow_tutorial/page2.jsp</code> so it appears as follows.</p> <p><strong><code>page2.jsp</code></strong></p> <source><