Author: dolander
Date: Wed Aug 24 11:21:44 2005
New Revision: 239726
URL: http://svn.apache.org/viewcvs?rev=239726&view=rev
Log:
Fixup the content in the Jsp Overview
Added:
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tagsFormControls.xml
(with props)
Modified:
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/jspOverview.xml
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tagsHtmlMapping.xml
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tagsOverview.xml
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/site.xml
Modified:
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/jspOverview.xml
URL:
http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/jspOverview.xml?rev=239726&r1=239725&r2=239726&view=diff
==============================================================================
---
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/jspOverview.xml
(original)
+++
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/jspOverview.xml
Wed Aug 24 11:21:44 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>Page Flow JSP Overview</title>
+ <title>NetUI JSP Overview</title>
</header>
<body>
<section id="introduction">
@@ -18,7 +18,8 @@
</p>
<ul>
<li><a
href="../apidocs/taglib/taglib-overview-summary.html#netui"><code><netui:xxx></code></a>
--
- This is the primary tag library supporting HTML. It also
contains the Tree support.</li>
+ This is the primary tag library supporting HTML, including the
form controls. In addition,
+ it contains the Tree support.</li>
<li><a
href="../apidocs/taglib/taglib-overview-summary.html#netui-data"><code><netui-data:xxx></code></a>
--
This tag library provides binding to relational data,
providing the Data Grid.</li>
<li><a
href="../apidocs/taglib/taglib-overview-summary.html#netui-template"><code><netui-template:xxx></code></a>
--
@@ -31,54 +32,47 @@
<a href="site:pageflow_databinding">Databinding: Passing Data
Between Controller Classes and JSP Pages</a>
</p>
</section>
- <section id="starting_a_jpf_jsp">
- <title>Starting a JPF JSP</title>
-
- <p>
- As with <a href="site:pageflow_controllers">Page Flow Controllers</a>, a
certain amount
- of common boilerplate text is required in each page. The first two lines
should set
- the content-type, the encoding, and import the base netui tag library.
The <code>taglib</code>
- binds the netui tags to the <code>netui</code> prefix.
- </p>
-
-<source>
-<strong><%@ page language="java" contentType="text/html;charset=UTF-8"%>
-<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0"
prefix="netui"%></strong>
-</source>
-
- <p>
- After the common prolog, the JSP page can be written like most any other
JSP page,
- with some tag substitutions occurring:
- </p>
-
- <table>
- <tr>
- <th>original tag</th><th>replace with</th>
- </tr>
- <tr>
- <td>html</td><td>netui:html</td>
- </tr>
- <tr>
- <td>body</td><td>netui:body</td>
- </tr>
- <tr>
- <td>a</td><td>netui:anchor</td>
- </tr>
- <tr>
- <td>form</td><td>netui:form</td>
- </tr>
- <tr>
- <td><em>various form elements</em></td><td><em>various netui:
elements</em> (see <a href="#handling_forms">Handling Forms</a>, below)</td>
- </tr>
- </table>
-
- <p>
- In addition to the prolog and general tag substitutions,
<code><netui:base></code>
- should be present within the <code><head></code> element. The
resulting general
- form of a JPF-based JSP page is as follows:
- </p>
-
-<source>
+ <section id="StartingJSP">
+ <title>Starting a NetUI JSP</title>
+ <p> NetUI JSP pages that act as stand alone HTML pages, can use the
following template as the basis
+ for a new page. Using this template will insure that the
structure of the HTML page is valid
+ and that all of the features in the tag library are enabled.
+ </p>
+ <source><![CDATA[
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib prefix="netui" uri="http://beehive.apache.org/netui/tags-html-1.0"%>
+<netui:html>
+ <head>
+ <title>Page Title</title>
+ <netui:base/>
+ </head>
+ <netui:body>
+ </netui:body>
+</netui:html>
+ ]]></source>
+
+ <p>
+ As with <a href="site:pageflow_controllers">Page Flow Controllers</a>,
a certain amount
+ of common boilerplate text is required in each page. The first two
lines should set
+ the content-type, the encoding, and import the base NetUI tag library.
The <code>taglib</code>
+ binds the NetUI tags to the <code>netui</code> prefix.
+ </p>
+ <source>
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib prefix="netui"
uri="http://beehive.apache.org/netui/tags-html-1.0"%>
+ </source>
+
+ <p> After the common prolog, the JSP page can be written like most any
other JSP pages. The NetUI HTML tags can
+ be configured to support both the HTML 4.01 spec and XHTML. See
the <a href="site:pageflow_tag_html_mapping">
+ HTML to NetUI Tag</a> topic to see how the NetUI tags relate to
HTML. In addition to the prolog and
+ using the HTML tags to represent the HTML structure,
<code><netui:base></code>
+ should be present within the <code><head></code> element.
This will ensure that relative URIs are
+ resolved correctly.
+ </p>
+ <p> The resulting general
+ form of a NetUI JSP page is as follows:
+ </p>
+ <source>
<strong><%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0"
prefix="netui"%>
<netui:html></strong>
@@ -92,164 +86,105 @@
..
<strong></netui:body>
</netui:html></strong>
-</source>
-
- </section>
-
- <section id="simple_linking">
- <title>Simple Linking</title>
-
- <p>
- Initially, we will examine simple linking through a controller to another
JSP page.
- The <code><netui:anchor></code> tag replaces the normal
<code><a></code>
- HTML anchor tag. A plain <code><a></code> links directly from one
URL to
- another, without providing the controller an opportunity to perform any
conditional
- logic. But the <code><netui:anchor></code> tag is rendered as HTML
and Javascript
- code, code which causes the link to venture through the controller
class.
- </p>
-
- <p>
- While it may seem silly to use JPF/netui functionality for simple
- <em>constant forward methods</em>, the advantage is that if a page
- gets renamed or you wish to change the flow through an application,
- the destination only needs to be changed once, within the controller.
- Otherwise, you may have to edit a handful of JSP pages manually
- changing the URLs inside normal <code><a></code> tags.
- </p>
-
- <p>
- For example, if your application changes and you desire to show a
- terms-of-service before allowing login, you can simply alter the
<code>login()</code>
- controller method to send a user to <code>terms_of_service.jsp</code>
before
- further sending him to the actual login screen.
- </p>
-
- <p>
- The <code><netui:anchor></code> tag parallels the
<code><a></code>
- tag but is able to use an <code>action</code> attribute instead of an
<code>href</code>.
- Instead of specifying the URL to another page, the name of the method
- on the controller class is used, without parenthesis.
- </p>
-
- <p>
- Instead of using <code><a></code>
- </p>
+ </source>
+ </section>
-<source>
+ <section id="SimpleLinking">
+ <title>Simple Linking</title>
+ <p>
+ The <code><netui:anchor></code> tag replaces the normal
<code><a></code>
+ HTML anchor tag. A plain HTML <code><a></code> links
directly from one URL to
+ another and doesn't provid the controller an opportunity to
perform any conditional
+ logic. Using the <code><netui:anchor></code> tag you can
specify an action in a
+ Page Flow controller which will run when the link is pressed.
+ </p>
+ <p> While it may seem silly to use NetUI tags for simple
+ <em>constant forward methods</em>, the advantage is that if a page
+ gets renamed or you wish to change the flow through an application,
+ the destination only needs to be changed once, within the
controller.
+ Otherwise, you may have to edit a handful of JSP pages manually
+ changing the URLs inside normal <code><a></code> tags.
+ </p>
+ <p> In addition, the <netui:anchor> tag supports many additional
features such as submitting
+ forms and popup windows.
+ </p>
+ <section id="LinkingExample">
+ <title>Linking Example</title>
+ <p> Initially, we will examine simple linking through a controller
to another JSP page using the
+ Page Flow introduced earlier.
+ </p>
+ <p><img src="images/impl-flow-1.png" alt="implementation page
flow"/>
+ </p>
+ <p> If your application changes and you desire to show a
+ terms-of-service before allowing login, you can simply alter
the <code>login()</code>
+ controller method to send a user to
<code>terms_of_service.jsp</code> before
+ further sending him to the actual login screen. Instead of
specifying the URL to another
+ page using the HTML <a> tag, we use the <netui:anchor>
and specify the name of the action
+ on the controller to call.
+ </p>
+ <p> Instead of using <code><a></code>
+ </p>
+ <source>
<<strong>a href="login.jsp"</strong>>Login!</a>
-</source>
-
- <p>
- Use <code><netui:anchor></code>
- </p>
-
-<source>
+ </source>
+ <p> Use <code><netui:anchor></code>
+ </p>
+ <source>
<<strong>netui:anchor action="login"</strong>>Login!</netui:anchor>
-</source>
-
- <p>
- When the link is displayed on-screen, clicking it will cause control to
- go through the <code>Controller</code>'s <code>login()</code> method,
- which will return the correct forward to select the actual next page to
- display.
- </p>
-
- </section>
-
- <section id="handling_forms">
- <title>Handling Forms</title>
-
- <p>
- To connect an on-screen form to the underlying controller's form-handling
- method, the <code><netui:form></code> container tag, along with
- specialized tags that replace the normal form elements are used within
- a JSP page. Similar to how <code><netui:anchor></code> replaces
- normal HTML <code><a></code> tags, the
<code><netui:form></code>
- tag replaces the typical HTML <code><form></code> tag. Once again,
- the tag will render the appropriate page so that submission of the form
- will venture through the named form-handling method of the controller
class.
- </p>
+ </source>
+ <p> When the link is displayed on-screen, clicking it will cause
control to
+ go through the <code>Controller</code>'s <code>login()</code>
method,
+ which will return the correct forward to select the actual
next page to
+ display.
+ </p>
+ <p> If you want to add the term-of-service page, you can simply
modify the action in the
+ Page Flow Controller to go to the newly created JSP page. The
advantage is that the
+ flow of control is stored in the Page Flow Controller and not
in the pages themselves.
+ </p>
+ </section>
+ </section>
- <p>
- Instead of using <code><form></code>
- </p>
+ <section id="HandlingForms">
+ <title>Handling Forms</title>
+ <p> To post data from forms to Page Flow controller's action handling
the form post,
+ the <code><netui:form></code> container tag, along with
+ specialized NetUI form control tags that replace the normal form
elements are used within
+ a JSP page. Similar to how <code><netui:anchor></code>
replaces
+ normal HTML <code><a></code> tags, the
<code><netui:form></code>
+ tag replaces the typical HTML <code><form></code> tag. In
addition,
+ the NetUI form control tags replace the typical HTML form controls.
+ </p>
-<source>
+ <section id="FormExample">
+ <title>Form Example</title>
+ <p> Instead of using <code><form></code>
+ </p>
+ <source>
<<strong>form action="LoginServlet"</strong> method="POST">
-</source>
-
- <p>
- Use <code><netui:form></code>
- </p>
-
-
-<source>
+ </source>
+ <p> Use <code><netui:form></code>
+ </p>
+ <source>
<<strong>netui:form action="processLogin"</strong> method="POST">
-</source>
-
- <p>
- The other tags typically used with a <code><form></code> also have
- replacements from the netui tag library.
- </p>
-
- <table>
- <tr>
- <th>original tag</th><th>replace with</th><th><code>FormData</code>
datatype</th>
- </tr>
- <tr>
- <td>button</td><td>netui:button</td><td><em>optionally changing the
controller form processing method</em></td>
- </tr>
- <tr>
- <td>input
type="checkbox"</td><td>netui:checkBox</td><td><code>boolean</code> or
<code>java.lang.Boolean</code></td>
- </tr>
- <tr>
- <td>input
type="checkbox"</td><td>netui:checkBoxGroup</td><td><code>java.lang.String[]</code></td>
- </tr>
- <tr>
- <td>input type="checkbox"</td><td>netui:checkBoxOption</td><td><em>see
<code>netui:checkBoxGroup</code></em></td>
- </tr>
- <tr>
-
<td>hidden</td><td>netui:hidden</td><td><code>java.lang.String</code></td>
- </tr>
- <tr>
- <td>input
type="radio"</td><td>netui:radioButtonGroup</td><td><code>java.lang.String[]</code></td>
- </tr>
- <tr>
- <td>input type="radio"</td><td>netui:radioButtonOption</td><td><em>see
<code>netui:radioButtonGroup</code></em></td>
- </tr>
- <tr>
- <td>input
type="radio"</td><td>netui:select</td><td><code>java.lang.String[]</code></td>
- </tr>
- <tr>
- <td>option</td><td>netui:option</td><td>see
<code>netui:option</code></td>
- </tr>
- <tr>
-
<td>textarea</td><td>netui:textArea</td><td><code>java.lang.String</code></td>
- </tr>
- <tr>
- <td>input
(type="text")</td><td>netui:textBox</td><td><code>java.lang.String</code></td>
- </tr>
- </table>
-
- <p>
- For the <code>processLogin(...)</code> form-processing method, the
matching JSP form would be:
- </p>
-
-<source>
-<strong><netui:form action="processLogin" method="POST">
- <netui:textBox dataSource="actionForm.username" size="20"/>
- <netui:textBox dataSource="actionForm.password" size="20"
password="true"/>
- <netui:button type="submit" value="Login"/>
-</netui:form></strong>
-</source>
-
- <p>
- When the user submits the form by clicking upon the <code>Login</code>
button, an instance of
- the <code>LoginForm</code> subclass of <code>FormData</code> is created
and passed to the
- <code>processLogin(LoginForm form)</code> method of the controller class.
- </p>
-
- </section>
+ </source>
+ <p> The other tags typically used with a <code><form></code>
also have
+ replacements from the NetUI tag library.
+ </p>
+ <p> For the <code>processLogin(...)</code> form-processing method,
the matching JSP form would be:
+ </p>
+ <source>
+<netui:form action="processLogin" method="POST">
+ <netui:textBox dataSource="actionForm.username" size="20"/>
+ <netui:textBox dataSource="actionForm.password" size="20"
password="true"/>
+ <netui:button type="submit" value="Login"/>
+</netui:form>
+ </source>
+ <p> When the user submits the form by clicking upon the
<code>Login</code> button, an instance of
+ the <code>LoginForm</code> subclass of <code>FormData</code>
is created and passed to the
+ <code>processLogin(LoginForm form)</code> method of the
controller class.
+ </p>
+ </section>
+ </section>
<section id="next">
<title>Next...</title>
Added:
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tagsFormControls.xml
URL:
http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tagsFormControls.xml?rev=239726&view=auto
==============================================================================
---
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tagsFormControls.xml
(added)
+++
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tagsFormControls.xml
Wed Aug 24 11:21:44 2005
@@ -0,0 +1,52 @@
+<?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>NetUI Form Control Tags</title>
+ </header>
+ <body>
+ <section id="Intro">
+ <title>NetUI Form Control Tags</title>
+ <p></p>
+ <table>
+ <tr>
+ <th>original tag</th><th>replace
with</th><th><code>FormData</code> datatype</th>
+ </tr>
+ <tr>
+ <td>button</td><td>netui:button</td><td><em>optionally
changing the controller form processing method</em></td>
+ </tr>
+ <tr>
+ <td>input
type="checkbox"</td><td>netui:checkBox</td><td><code>boolean</code> or
<code>java.lang.Boolean</code></td>
+ </tr>
+ <tr>
+ <td>input
type="checkbox"</td><td>netui:checkBoxGroup</td><td><code>java.lang.String[]</code></td>
+ </tr>
+ <tr>
+ <td>input
type="checkbox"</td><td>netui:checkBoxOption</td><td><em>see
<code>netui:checkBoxGroup</code></em></td>
+ </tr>
+ <tr>
+
<td>hidden</td><td>netui:hidden</td><td><code>java.lang.String</code></td>
+ </tr>
+ <tr>
+ <td>input
type="radio"</td><td>netui:radioButtonGroup</td><td><code>java.lang.String[]</code></td>
+ </tr>
+ <tr>
+ <td>input
type="radio"</td><td>netui:radioButtonOption</td><td><em>see
<code>netui:radioButtonGroup</code></em></td>
+ </tr>
+ <tr>
+ <td>input
type="radio"</td><td>netui:select</td><td><code>java.lang.String[]</code></td>
+ </tr>
+ <tr>
+ <td>option</td><td>netui:option</td><td>see
<code>netui:option</code></td>
+ </tr>
+ <tr>
+
<td>textarea</td><td>netui:textArea</td><td><code>java.lang.String</code></td>
+ </tr>
+ <tr>
+ <td>input
(type="text")</td><td>netui:textBox</td><td><code>java.lang.String</code></td>
+ </tr>
+ </table>
+ </section>
+ </body>
+</document>
\ No newline at end of file
Propchange:
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tagsFormControls.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified:
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tagsHtmlMapping.xml
URL:
http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tagsHtmlMapping.xml?rev=239726&r1=239725&r2=239726&view=diff
==============================================================================
---
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tagsHtmlMapping.xml
(original)
+++
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tagsHtmlMapping.xml
Wed Aug 24 11:21:44 2005
@@ -15,7 +15,7 @@
<table>
<tr><th>Html Tag</th><th>NetUI
Tag</th><th>Description</th><th>Links</th></tr>
<tr>
- <td><a></td><td>netui:anchor</td><td>Create an
anchor</td><td></td>
+ <td><a></td><td>netui:anchor</td><td>Create an
anchor</td><td><a href="site:pageflow_jspOverview_SimpleLinking">Simple
Linking</a></td>
</tr>
<tr>
<td><area></td><td>netui:area</td><td>Specify a
geometric region of an image map and the link associated with it</td><td></td>
Modified:
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tagsOverview.xml
URL:
http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tagsOverview.xml?rev=239726&r1=239725&r2=239726&view=diff
==============================================================================
---
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tagsOverview.xml
(original)
+++
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/pageflow/tagsOverview.xml
Wed Aug 24 11:21:44 2005
@@ -8,6 +8,20 @@
<body>
<section id="Overview">
<title>NetUI Tag Library Overview</title>
+ <p> This topic provides an overview of the NetUI JSP tag
libraries. NetUI provides three tag
+ libraries, the core HTML tags, the data grid and a simple set
of template tags.
+ </p>
+ <table>
+ <tr><th width="375pt">Tag Library URI</th><th
width="100pt">Prefix</th><th>Description</th></tr>
+
<tr><td>http://beehive.apache.org/netui/tags-html-1.0</td><td>netui</td><td>
+ This is the primary tag library supporting HTML, including
the form controls. In addition,
+ it contains the Tree support.</td></tr>
+
<tr><td>http://beehive.apache.org/netui/tags-databinding-1.0</td><td>netui-data</td><td>
+ This tag library provides binding to relational data,
providing the Data Grid.</td></tr>
+
<tr><td>http://beehive.apache.org/netui/tags-template-1.0</td><td>netui-template</td><td>
+ This tag library provides a very simple templating
facility, allowing common elements such
+ as headers, footers, etc.</td></tr>
+ </table>
</section>
</body>
</document>
Modified:
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/site.xml
URL:
http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/site.xml?rev=239726&r1=239725&r2=239726&view=diff
==============================================================================
--- beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/site.xml
(original)
+++ beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/site.xml
Wed Aug 24 11:21:44 2005
@@ -16,7 +16,9 @@
<pageflow_getting_started label="Getting Started"
href="pageflow/getting_started.html"/>
<pageflow_overview label="Overview"
href="pageflow/pageflow_overview.html"/>
<pageflow_controllers label="Controller Files"
href="pageflow/pageflow_controllers.html"/>
- <pageflow_jsp label="JSP Files" href="pageflow/jspOverview.html"/>
+ <pageflow_jsp label="JSP Files" href="pageflow/jspOverview.html">
+ <pageflow_jspOverview_SimpleLinking href="#SimpleLinking" />
+ </pageflow_jsp>
<pageflow_building label="Building a Web Project"
href="pageflow/pageflow_building.html"/>
<pageflow_altering label="Altering a Page Flow"
href="pageflow/pageflow_altering.html"/>
<pageflow_databinding label="Databinding"
href="pageflow/databinding.html"/>
@@ -25,7 +27,8 @@
<pageflow_popups label="Popup Windows"
href="pageflow/popupWindows.html"/>
<pageflow_tags label="Tags">
<pageflow_tag_overview label="Overview"
href="pageflow/tagsOverview.html" />
- <pageflow_tag_html_mapping label="HTML Mapping"
href="pageflow/tagsHtmlMapping.html" />
+ <pageflow_tag_htmlMapping label="HTML Mapping"
href="pageflow/tagsHtmlMapping.html" />
+ <pageflow_tag_formControls label="Form Controls"
href="pageflow/tagsFormControls.html" />
<pageflow_tag_xhtml label="HTML/XHTML Support"
href="pageflow/tagsXhtml.html">
<pageflow_tagsXhtml_HtmlTag href="#HtmlTag" />
<pageflow_tagsXhtml_BodyTag href="#BodyTag" />