You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by st...@apache.org on 2005/09/09 22:24:19 UTC
svn commit: r279867 -
/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tutorial_pageflow.xml
Author: steveh
Date: Fri Sep 9 13:24:17 2005
New Revision: 279867
URL: http://svn.apache.org/viewcvs?rev=279867&view=rev
Log:
Fix for BEEHIVE-908: missing "onCreate()" and "onDestroy()" methods in pageflow_tutorial Controller.java
Modified:
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tutorial_pageflow.xml
Modified: beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tutorial_pageflow.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tutorial_pageflow.xml?rev=279867&r1=279866&r2=279867&view=diff
==============================================================================
--- beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tutorial_pageflow.xml (original)
+++ beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tutorial_pageflow.xml Fri Sep 9 13:24:17 2005
@@ -78,7 +78,7 @@
index.jsp
resources/
WEB-INF/
- </source>
+</source>
<p>
Note, this directory structure is just an example; you are free to put the <code>pageflow_tutorial</code>
directory anywhere on disk. In the remainder of this tutorial, the directory <code>beehive_projects/pageflow_tutorial</code>
@@ -116,8 +116,7 @@
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>
+context.path=<strong>pageflow_tutorial</strong></source>
<note>Properties files should use the '/' character to separate drive, directory, and file names.</note>
<p>
If you are using an application container other than Tomcat, be sure to set the <code>servlet-api.jar</code> and <code>jsp-api.jar</code> properties
@@ -218,8 +217,6 @@
<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;
@@ -235,6 +232,22 @@
public class Controller
extends PageFlowController
{
+ @Jpf.SharedFlowField(name="shared")
+ private shared.SharedFlow sharedFlow;
+
+ /**
+ * Callback that is invoked when this controller instance is created.
+ */
+ protected void onCreate()
+ {
+ }
+
+ /**
+ * Callback that is invoked when this controller instance is destroyed.
+ */
+ protected void onDestroy(HttpSession session)
+ {
+ }
}</source>
<p>Open the file <code>pageflow_tutorial/index.jsp</code>.
</p>
@@ -265,20 +278,20 @@
<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>
- ant clean build war
- </source>
+ant clean build war
+</source>
<p>
This will build the webapp by running the Beehive annotation processors and will produce class files in <code>WEB-INF/classes</code>.
Now, the application is ready to deploy to your server. On Tomcat, copy the WAR file into Tomcat's <code>$CATALINA_HOME/webapps</code>
directory.</p>
<p>On Windows:</p>
<source>
- copy pageflow_tutorial.war %CATALINA_HOME%\webapps /Y
- </source>
+copy pageflow_tutorial.war %CATALINA_HOME%\webapps /Y
+</source>
<p>Everywhere else:</p>
<source>
- cp pageflow_tutorial.war $CATALINA_HOME/webapps
- </source>
+cp pageflow_tutorial.war $CATALINA_HOME/webapps
+</source>
<p>If you are asked to overwrite the old WAR file, enter 'yes'. Note, when doing redeployment, you may have to wait a few seconds
for Tomcat to redeploy the WAR file. Once deployment or redeployment has completed, the webapp can be accessed through a browser.</p>
<p>If you are not using Tomcat, follow your server's web application deployment instructions to deploy the webapp.</p>
@@ -495,6 +508,9 @@
System.out.println("Age: " + form.getAge());
return new Forward("success");
}</strong>
+
+ ...
+
}
</source>
<p>Save <code>Controller.java</code>.</p>
@@ -846,6 +862,9 @@
getRequest().setAttribute("data", form);
return new Forward("success");
}
+
+ ...
+
}
</source>
<p>Save <code>Controller.java</code>.</p>