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/04/20 01:00:44 UTC
svn commit: r161989 - in
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs:
pageflow/netui-samples.xml pageflow/popupWindows.xml site.xml
Author: steveh
Date: Tue Apr 19 16:00:43 2005
New Revision: 161989
URL: http://svn.apache.org/viewcvs?view=rev&rev=161989
Log:
Adding instructions on running the netui-samples sample.
Improving the popup windows topic.
Added:
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/netui-samples.xml (with props)
Modified:
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/popupWindows.xml
incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/site.xml
Added: incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/netui-samples.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/netui-samples.xml?view=auto&rev=161989
==============================================================================
--- incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/netui-samples.xml (added)
+++ incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/netui-samples.xml Tue Apr 19 16:00:43 2005
@@ -0,0 +1,102 @@
+<?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>Beehive Sample: Page Flow Samples</title>
+ </header>
+ <body>
+ <section id="intro">
+ <title>Introduction</title>
+ <p>These samples show individual features on Page Flows, including:</p>
+ <ul><li>Data validation</li>
+ <li>Data grids</li>
+ <li>Link trees</li>
+ <li>Popup windows</li></ul>
+ </section>
+ <section id="running">
+ <title>Running the Samples on Tomcat 5</title>
+ <p>The following explains how to run the samples on Tomcat 5. The sample
+ will run on other web containers, but we have chosen Tomcat 5 for convenience.</p>
+ <section id="set_up">
+ <title>To Set up the Environment</title>
+ <p>Before proceeding, complete all of the necessary and optional steps in the
+ following topic:
+ <a class="fork" href="setup.html">Beehive Installation and Setup</a></p>
+ <p>Open a command shell and confirm that you have set following variables:</p>
+ <ul>
+ <li><code>ANT_HOME</code></li>
+ <li><code>JAVA_HOME</code></li>
+ <li><code>CATALINA_HOME</code></li>
+ </ul>
+ <p>Also ensure that the following elements are on your <code>PATH</code>:</p>
+ <ul>
+ <li><code>ANT_HOME/bin</code></li>
+ <li><code>JAVA_HOME/bin</code></li>
+ </ul>
+ </section>
+ <section id="copy_app">
+ <title>To Copy the Application to a Project
+ Folder</title>
+ <p>To keep your Beehive distribution directory
+ pristine, you should copy the
+ <code>netui-samples</code> folder to another location before
+ proceeding. The following instructions assume that you have
+ copied the folder <code>netui-samples</code> into the
+ directory <code>C:/beehive_projects</code>,
+ resulting in the following directory structure.</p>
+ <source>C:
+ beehive_projects
+ netui-samples</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>
+ <p>Open the file <code>C:/beehive_projects/petstoreWeb/WEB-INF/src/build.properties</code>
+ in a text editor.</p>
+ <p>Edit the file so that the <code>beehive.home</code> property points to the
+ top-level folder of your beehive installation. 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>
+
+servlet-api.jar=${os.CATALINA_HOME}/common/lib/servlet-api.jar
+jsp-api.jar=${os.CATALINA_HOME}/common/lib/jsp-api.jar
+
+context.path=netui-samples</source>
+ </section>
+ <section id="compile">
+ <title>To Compile the Petstore Application</title>
+ <p>To compile the Petstore app, enter the following Ant
+ command:</p>
+<source>ant
+ -f C:\beehive_projects\netui-samples\WEB-INF\src\build.xml
+ clean
+ build
+
+<strong>Copy and Paste version:</strong>
+ant -f C:\beehive_projects\netui-samples\WEB-INF\src\build.xml clean build war</source>
+
+ </section>
+ <section id="start_tomcat">
+ <title>To Start Tomcat</title>
+ <p>To start Tomcat, run the following command:</p>
+ <source>%CATALINA_HOME%\bin\startup.bat</source>
+ </section>
+ <section id="deploy">
+ <title>To Deploy to Tomcat</title>
+ <p>To deploy the samples, copy the WAR file to Tomcat's <code>webapps</code> directory.</p>
+ <source>copy C:\beehive_projects\netui-samples.war %CATALINA_HOME%\webapps</source>
+ </section>
+ <section id="test">
+ <title>Running</title>
+ <p><a class="fork" href="http://localhost:8080/netui-samples">http://localhost:8080/netui-samples</a></p>
+ </section>
+ </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/> © 2004, Apache Software Foundation </legal>
+ </footer>
+</document>
\ No newline at end of file
Propchange: incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/netui-samples.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/popupWindows.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/popupWindows.xml?view=diff&r1=161988&r2=161989
==============================================================================
--- incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/popupWindows.xml (original)
+++ incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/pageflow/popupWindows.xml Tue Apr 19 16:00:43 2005
@@ -190,7 +190,7 @@
return new Forward( "done", form.getColor() );
}
- public static class ColorForm extends FormData
+ public static class ColorForm
{
private String _color;
@@ -238,24 +238,24 @@
<section id="retrievePopupOutputTag"><title>The <netui:retrievePopupOutput</title>
<p>To access values returned by the nested page flow use the <a href="../apidocs/taglib/beehive.apache.org/netui/tags-html-1.0/retrievePopupOutput.html"><netui:retrievePopupOutput></a> tag,
for example,</p>
- <source><netui:retrievePopupOutput dataSource="outputFormBean.zipCode" tagIdRef="zipCodeField"/></source>
+ <source><netui:retrievePopupOutput dataSource="outputFormBean.color" tagIdRef="colorField"/></source>
<p>Include multiple instances of the tag to set multiple fields.</p>
<p><strong>Note</strong> - the <netui:retrievePopupOutput> tag must be nested inside
the <netui:configurePopup> tag even if the <netui:configurePopup> tag has no attributes</p>
<p>The <netui:configurePopup> tag has two attributes, <code>dataSource</code>
and <code>tagIdRef</code>, both of which are required. Both accept expressions that
can be evaluated at runtime.</p>
- <p><strong>Note</strong> - '<code>outputFormBean</code>' is a special binding context
+ <p><strong>Note</strong> - '<code>outputFormBean</code>' is a special databinding context
that applies in this situation. It is the "return value" of the nested page
flow: It receives the value generated by the 'outputFormBean'
(or 'outputFormBeanType') in the returnAction forward from the nested page flow.
- This binding context is only legal when used in the <netui:retrievePopupOutput> tag.</p>
+ This databinding context is only legal when used in the <netui:retrievePopupOutput> tag.</p>
</section>
<section id="_auto"><title>The <code>_auto</code> Global Forward</title>
<p>If you are returning data from the nested flow it is passed as a bean to
the action in the nesting page flow, for example</p>
<source> @Jpf.Action()
- public Forward nestedPageFlowGotZip(ZipForm zipForm)
+ public Forward nestedPageFlowGotColor(GetColor.ColorForm colorForm)
{
return new Forward("_auto");
}</source>
@@ -263,16 +263,14 @@
<source> @Jpf.Action(
forwards={
@Jpf.Forward(name="success",
- returnAction="nestedPageFlowGotZip",
- outputFormBeanType=ZipForm.class
+ returnAction="nestedPageFlowGotColor",
+ outputFormBeanType=ColorForm.class
)
}
)
- public Forward done()
+ public Forward done( ColorForm returnForm )
{
- ZipForm returnForm = new ZipCodeForm();
- returnForm.setZipCode("12345"); // pretend we got this through user input
- return new Forward("success", new ZipForm( "12345" ));
+ return new Forward("success", returnForm);
}</source>
<p>
The bean returned to the nesting flow is accessed in the page using the special data binding
Modified: incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/site.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/site.xml?view=diff&r1=161988&r2=161989
==============================================================================
--- incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/site.xml (original)
+++ incubator/beehive/trunk/docs/forrest/src/documentation/content/xdocs/site.xml Tue Apr 19 16:00:43 2005
@@ -46,6 +46,7 @@
<samples label="Samples">
<sam_index label="Samples" href="samples/index.html"/>
<jpetstore label="Petstore" href="jpetstore.html"/>
+ <jpetstore label="Page Flow Samples" href="pageflow/netui-samples.html"/>
<!--<dash label="Petstore Dashboard" href="wsm/sample_Dashboard.html"/>-->
<db-sample label="Database Control" href="controls/sample_controls-db.html"/>
<address label="AddressBook" href="wsm/sample_AddressBook.html"/>