Author: dolander
Date: Tue Aug 30 11:54:58 2005
New Revision: 264825
URL: http://svn.apache.org/viewcvs?rev=264825&view=rev
Log:
Update to the Form Controls document
Modified:
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tagsFormControls.xml
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tagsHtmlMapping.xml
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/site.xml
Modified:
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tagsFormControls.xml
URL:
http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tagsFormControls.xml?rev=264825&r1=264824&r2=264825&view=diff
==============================================================================
---
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tagsFormControls.xml
(original)
+++
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tagsFormControls.xml
Tue Aug 30 11:54:58 2005
@@ -39,7 +39,7 @@
<code>formSubmit</code> attribute is set to
<code>true</code>. In addition, there
is no requirement to set an <code>action</code> or
<code>href</code> on the anchor.
</p>
- <p> The anchor doesn't bind to a <code>dataSource</code> of
any type.
+ <p> The anchor does not bind to a <code>dataSource</code> of
any type.
</p>
<source>
<netui:form>
@@ -60,12 +60,110 @@
</section>
<section id="Button">
<title>Button</title>
+ <p>The <code><netui:button></code> tag acts as the standard
button used to submit a form.
+ As a default the button acts as an HTML
<code>type="submit"</code> button. You may
+ also create the button with a <code>type</code> of
<code>reset</code> or <code>button</code>.
+ In the example below, when the users presses the generated
button it will cause the form
+ to be submited. The button must appear within the
<code><netui:form></code>
+ </p>
+ <p> The button does not bind to a <code>dataSource</code> of
any type.
+ </p>
+ <source>
+<netui:form>
+ ...
+ <netui:button type="submit">Submit the Form</netui:button>
+</netui:form>
+ </source>
</section>
<section id="CheckBox">
<title>CheckBox</title>
+ <p> The <code><netui:checkBox></code> binds a boolean value
to a <code>dataSource</code>.
+ The Checkbox will generate an <code><input
type="checkbox"></code> HTML element.
+ The natural type of the <code>dataSource</code> being
bound to is typically a
+ <code>boolean</code> or <code>java.lang.Boolean</code>.
In addition, it is possible
+ to bind to a <code>java.lang.String</code>.
+ </p>
+ <p>
+ In the following example, there are three checkboxes which
are bound to a <code>boolean</code>,
+ <code>java.lang.Boolean</code> and a
<code>java.lang.String</code>.
+ </p>
+ <source><![CDATA[
+<table>
+ <tr><th align="right">CheckBox [boolean]</th><td><netui:checkBox
dataSource="actionForm.checkBox"/></td></tr>
+ <tr><th align="right">CheckBox [java.lang.Boolean]</th><td><netui:checkBox
dataSource="actionForm.checkBoxBoolean"/></td></tr>
+ <tr><th align="right">CheckBox [java.lang.String]</th><td><netui:checkBox
dataSource="actionForm.checkBoxString"/></td></tr>
+</table>
+]]></source>
+ <p> In the action form, the following three properties are
being bound to by the above
+ NetUI tags.
+ </p>
+ <source>
+ private boolean checkBox;
+ private Boolean checkBoxBoolean;
+ private String checkBoxString;
+
+ public boolean isCheckBox() {
+ return checkBox;
+ }
+ public void setCheckBox(boolean checkBox) {
+ this.checkBox = checkBox;
+ }
+
+ public Boolean getCheckBoxBoolean() {
+ return checkBoxBoolean;
+ }
+ public void setCheckBoxBoolean(Boolean checkBoxBoolean) {
+ this.checkBoxBoolean = checkBoxBoolean;
+ }
+
+ public String getCheckBoxString() {
+ return checkBoxString;
+ }
+ public void setCheckBoxString(String checkBoxString) {
+ this.checkBoxString = checkBoxString;
+ }
+</source>
</section>
<section id="CheckBoxGroup">
<title>CheckBoxGroup</title>
+ <p> The <code><netui:checkBoxGroup></code> creates a group
of boolean values. Multiple
+ values may be selected at one time. The natural type for
the <code>dataSource</code>
+ is a <code>java.lang.String[]</code>. Each
<code>CheckBoxOption</code> contains a
+ value that will be posted back if the item is selected.
See the <a href="#checkBoxOption">
+ CheckBoxOption</a> for more information on how options are
specified.
+ </p>
+ <p> There are two methods for creating the options which
create the items inside of the
+ group. The body of the tag may contain
<code><CheckBoxOption></code> tags or
+ the <code>optionsDataSource</code> may bind to an array of
values. When using the
+ <code>optionsDataSource</code> this tag may act as a
repeater. This allows for
+ control of both the layout and the form of the options.
+ </p>
+ <p> In the following example, the a CheckBoxGroup contains
four children defined
+ through options. When the form is posted, all of the
values that are selected
+ (checked) will be posted back to an array in the action
form.
+ </p>
+ <source><![CDATA[
+<netui:checkBoxGroup dataSource="actionForm.checkBoxGroup"
orientation="vertical">
+ <netui:checkBoxOption value="Check One"/>
+ <netui:checkBoxOption value="Check Two"/>
+ <netui:checkBoxOption value="Check Three"/>
+ <netui:checkBoxOption value="Check Four"/>
+</netui:checkBoxGroup>
+]]></source>
+ <p> The following property in the action form will recieve the
results of the
+ posted CheckBoxGroup.
+ </p>
+ <source>
+private String[] checkBoxGroup;
+
+public String[] getCheckBoxGroup() {
+ return checkBoxGroup;
+}
+public void setCheckBoxGroup(String[] checkBoxGroup) {
+ this.checkBoxGroup = checkBoxGroup;
+}
+
+ </source>
</section>
<section id="CheckBoxOption">
<title>CheckBoxOption</title>
Modified:
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tagsHtmlMapping.xml
URL:
http://svn.apache.org/viewcvs/beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tagsHtmlMapping.xml?rev=264825&r1=264824&r2=264825&view=diff
==============================================================================
---
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tagsHtmlMapping.xml
(original)
+++
beehive/trunk/docs/forrest/release/src/documentation/content/xdocs/netui/tagsHtmlMapping.xml
Tue Aug 30 11:54:58 2005
@@ -15,7 +15,8 @@
<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><a href="site:pageflow_jspOverview_SimpleLinking">Simple
Linking</a></td>
+ <td><a></td><td>netui:anchor</td><td>Create an
anchor</td><td><a href="site:pageflow_jspOverview_SimpleLinking">Simple
Linking</a>,
+ <a href="site:pageflow_tag_formControls_anchor">Form
Controls</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>
@@ -28,10 +29,12 @@
<td><a
href="site:pageflow_tagsXhtml_BodyTag">HTML/XHTML</a></td>
</tr>
<tr>
- <td><input type={submit, button,
reset}></td><td>netui:button</td><td>Create a button, supports submit, button
and reset</td><td></td>
+ <td><input type={submit, button,
reset}></td><td>netui:button</td><td>Create a button, supports submit, button
and reset</td>
+ <td><a href="site:pageflow_tag_formControls_button">Form
Controls</a></td>
</tr>
<tr>
- <td><input
type=checkbox></td><td>netui:checkBox</td><td>Form Control allowing a binary
value</td><td></td>
+ <td><input
type=checkbox></td><td>netui:checkBox</td><td>Form Control allowing a binary
value</td>
+ <td><a href="site:pageflow_tag_formControls_checkbox">Form
Controls</a></td>
</tr>
<tr>
<td><input
type=file></td><td>netui:fileUpload</td><td>Form Control allowing a file to be
uploaded</td><td></td>
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=264825&r1=264824&r2=264825&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
Tue Aug 30 11:54:58 2005
@@ -33,6 +33,10 @@
<pageflow_tag_overview label="Overview"
href="netui/tagsOverview.html" />
<pageflow_tag_htmlMapping label="HTML Mapping"
href="netui/tagsHtmlMapping.html" />
<pageflow_tag_formControls label="Form Controls"
href="netui/tagsFormControls.html">
+ <pageflow_tag_formControls_anchor href="#Anchor" />
+ <pageflow_tag_formControls_button href="#Button" />
+ <pageflow_tag_formControls_checkbox href="#CheckBox" />
+ <pageflow_tag_formControls_checkboxgroup
href="#CheckBoxGroup" />
</pageflow_tag_formControls>
<pageflow_tag_xhtml label="HTML/XHTML Support"
href="netui/tagsXhtml.html">
<pageflow_tagsXhtml_HtmlTag href="#HtmlTag" />