You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by jk...@apache.org on 2006/07/15 18:57:31 UTC

svn commit: r422268 [4/5] - in /tapestry/tapestry4/trunk: src/documentation/ src/images/ src/site/ src/site/xdoc/components/ support/ tapestry-framework/src/documentation/content/xdocs/ tapestry-framework/src/documentation/content/xdocs/tapestry/Compon...

Propchange: tapestry/tapestry4/trunk/src/site/xdoc/components/Rollover.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/src/site/xdoc/components/Script.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/xdoc/components/Script.xml?rev=422268&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/src/site/xdoc/components/Script.xml (added)
+++ tapestry/tapestry4/trunk/src/site/xdoc/components/Script.xml Sat Jul 15 09:57:28 2006
@@ -0,0 +1,273 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+    Copyright 2004, 2005 The Apache Software Foundation
+    
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<document>
+    <properties>
+        <title>Script</title>
+    </properties>
+    <body>
+
+        <section name="Script">
+
+            <p>
+                A component that accesses a script file and adds JavaScript functions and statements
+                to the response page. The specified script file is read and parsed and substitutions
+                are made before the final scripting code is inserted into the page. This allows the
+                JavaScript to be tailored to the ids and names that are generated by Tapestry.
+            </p>
+            <p>
+                Components within a Script's body may access the input and output parameters of the
+                Script via the OGNL expression components.scriptId.symbols.name.
+            </p>
+            <p>
+                Note a Body component is required when using the Script element. The Body component
+                is used to write out the JavaScript after the HTML &lt;body&gt; section and attach
+                any initialization code to the body's "onload" event handler.
+            </p>
+
+            <p>
+                <strong>
+                    See also:
+                    <a href="Body.html">Body</a>
+                </strong>
+            </p>
+
+            <section name="Parameters">
+
+
+                <table>
+                    <tr>
+                        <th>Name</th>
+                        <th>Type</th>
+                        <th>Direction</th>
+                        <th>Required</th>
+                        <th>Default</th>
+                        <th>Description</th>
+                    </tr>
+                    <tr>
+                        <td>scriptPath</td>
+                        <td>String</td>
+
+                        <td>in</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>
+                            The path of a resource (on the classpath) containing the script. One of
+                            either scriptPath or scriptAsset must be specified.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>scriptAsset</td>
+                        <td>
+                            <a href="../../tapestry-framework/apidocs/org/apache/tapestry/IAsset.html">
+                                IAsset
+                            </a>
+                        </td>
+
+                        <td>in</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>
+                            A reference to a script as an
+                            <a href="../../tapestry-framework/apidocs/org/apache/tapestry/IAsset.html">
+                                IAsset
+                            </a>
+                            parameter. One of either scriptPath or scriptAsset must be specified.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>symbols</td>
+                        <td>java.util.Map</td>
+
+                        <td>in</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>
+                            The base set of symbols to be provided to the
+                            <a href="../../tapestry-framework/apidocs/org/apache/tapestry/IScript.html">
+                                IScript
+                            </a>
+                            . To this is added (in a copy of the Map) any informal parameters.
+                        </td>
+                    </tr>
+
+                </table>
+
+                <p>
+                    Body:
+                    <strong>allowed</strong>
+                </p>
+
+                <p>
+                    Informal parameters:
+                    <strong>allowed</strong>
+                </p>
+
+                <p>
+                    Reserved parameters:
+                    <em>none</em>
+                </p>
+
+            </section>
+
+            <section name="Examples">
+
+                <p>
+                    See the
+                    <a href="PropertySelection.html">PropertySelection</a>
+                    example use of SelectSubmit script to submit a
+                    <a href="Form.html">Form</a>
+                    when a user selects a drop down list item.
+                </p>
+                <p>
+                    In this example a Script is used set the focus to the first text field of the
+                    login form. In the script file .. tags are used to wrap the JavaScript code to
+                    prevent '&lt;' and '&amp;&amp;' character XML parsing errors.
+                </p>
+                <p>
+                    Note Tapestry will not perform property substitutions in CDATA blocks when using
+                    the &lt;expression&gt; style syntax, instead use the ${expression} syntax.
+                </p>
+                <img src="../../images/tapestry/ComponentReference/Script.png"
+                    alt="Script Screen Shot" />
+                <p>
+                    <strong>HTML Template</strong>
+                </p>
+                <source xml:space="preserve">
+&lt;body jwcid="@Body"&gt;
+&lt;span jwcid="@Script" script="/com/mycorp/scripts/FormFocus.script"/&gt;
+&lt;form jwcid="@Form" listener="ognl:listener.formSubmit"&gt;
+ &lt;table cellpadding="4"&gt;
+   &lt;tr&gt;&lt;td&gt;Username:&lt;/td&gt;&lt;td&gt;&lt;input jwcid="@TextField" value="ognl:visit.username" size="12"/&gt;&lt;/td&gt;
+  &lt;/tr&gt;
+   &lt;tr&gt;&lt;td&gt;Password:&lt;/td&gt;&lt;td&gt;&lt;input jwcid="@TextField" value="ognl:visit.password" hidden="ognl:true" size="12"/&gt;&lt;/td&gt;
+  &lt;/tr&gt;
+  &lt;tr align="right"&gt;
+   &lt;td colspan="2"&gt;&lt;input type="submit" value="Login"/&gt;&lt;/td&gt;
+  &lt;/tr&gt;
+ &lt;/table&gt;
+&lt;/form&gt;
+&lt;/body&gt;
+    </source>
+                <p>
+                    <strong>Script File (FormFocus.script)</strong>
+                </p>
+                <source xml:space="preserve">
+&lt;script&gt;
+  &lt;body&gt;
+&lt;![CDATA[
+function setFocus() {
+    if (document.forms[0]) {
+        for (i = 0; i &lt; document.forms[0].elements.length; i++) {
+            if (document.forms[0].elements[i].type != "hidden" &amp;&amp;
+                document.forms[0].elements[i].disabled != true) {
+
+                document.forms[0].elements[i].focus();
+                return;
+            }
+        }
+    }
+}
+]]&gt;
+  &lt;/body&gt;
+  &lt;initialization&gt;
+    setFocus();
+  &lt;/initialization&gt;
+&lt;/script&gt;
+        </source>
+                <p>
+                    This alternative FormFocus.script specifies the actual input field to give the
+                    focus to. The target input field is identified by an informal parameter named
+                    component. The script then uses ${expression} element name insertions to
+                    complete the JavaScript.
+                </p>
+                <p>
+                    Note when using this script, the target input field component must be declared
+                    before the script component in the HTML template, and within the Form block, so
+                    that the target field component can be resolved by the Script component.
+                </p>
+                <p>
+                    <strong>HTML Template</strong>
+                </p>
+                <source xml:space="preserve">
+&lt;body jwcid="@Body"&gt;
+&lt;form jwcid="@Form" listener="ognl:listener.formSubmit"&gt;
+ &lt;table cellpadding=
+  "4"&gt;
+   &lt;tr&gt;&lt;td&gt;Username:&lt;/td&gt;&lt;td&gt;&lt;input jwcid="usernameTextField@TextField" value="ognl:visit.username" size="12"/&gt;&lt;/td&gt;
+  &lt;/tr&gt;
+   &lt;tr&gt;&lt;td&gt;Password:&lt;/td&gt;&lt;td&gt;&lt;input jwcid="@TextField" value="ognl:visit.password" hidden="ognl:true" size="12"/&gt;&lt;/td&gt;
+  &lt;/tr&gt;
+  &lt;tr align="right"&gt;
+   &lt;td colspan="2"&gt;&lt;input type="submit" value="Login"/&gt;&lt;/td&gt;
+  &lt;/tr&gt;
+ &lt;/table&gt;
+ &lt;span jwcid="@Script" script="/com/mycorp/scripts/FormFocus.script" component="ognl:components.usernameTextField"/&gt;
+&lt;/form&gt;
+&lt;/body&gt;
+    </source>
+
+                <p>
+                    <strong>Script File (FormFocus.script)</strong>
+                </p>
+                <source xml:space="preserve">
+&lt;!--
+Selects the specified form input field on body load if the input type is not
+"hidden" and the input field is not disabled.
+
+Input symbols:
+  component: the component input field to give focus
+--&gt;
+	
+&lt;script&gt;
+	
+&lt;input-symbol key="component" class="org.apache.tapestry.form.AbstractFormComponent" required="yes"/&gt;
+
+&lt;let key="formObject"&gt;
+	document.${component.form.name}
+&lt;/let&gt;
+
+&lt;let key="componentObject"&gt;
+	${formObject}.${component.name}
+&lt;/let&gt;
+
+&lt;body&gt;
+function setFocus() {
+    var inputField = ${componentObject};
+
+    if (inputField.type != "hidden") {
+        if (inputField.disabled != true) {
+            inputField.focus();
+        }
+    } else {
+         window.alert('InputFocus.script cannot set focus on a hidden field');
+    }
+}
+&lt;/body&gt;
+
+&lt;initialization&gt;
+    setFocus();
+&lt;/initialization&gt;
+
+&lt;/script&gt;
+    </source>
+
+            </section>
+
+        </section>
+
+    </body>
+</document>

Propchange: tapestry/tapestry4/trunk/src/site/xdoc/components/Script.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/src/site/xdoc/components/Select.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/xdoc/components/Select.xml?rev=422268&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/src/site/xdoc/components/Select.xml (added)
+++ tapestry/tapestry4/trunk/src/site/xdoc/components/Select.xml Sat Jul 15 09:57:28 2006
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+    Copyright 2004, 2005 The Apache Software Foundation
+    
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<document>
+    <properties>
+        <title>Select</title>
+    </properties>
+    <body>
+
+        <section name="Select">
+
+            <p>
+                Implements a component that manages an HTML &lt;select&gt; form element. The Select
+                component can take the form of a drop down list (default) or a list selection box if
+                the "multiple" parameter is set to true. The Select component must wrap around
+                <a href="Option.html">Option</a>
+                components within a
+                <a href="Form.html">Form</a>
+                .
+            </p>
+            <p>
+                Unless multiple selections are required, it is generally easier to use the
+                <a href="PropertySelection.html">PropertySelection</a>
+                component.
+            </p>
+
+            <p>
+                <strong>
+                    See also:
+                    <a href="../../tapestry-framework/apidocs/org/apache/tapestry/form/Select.html">
+                        org.apache.tapestry.form.Select
+                    </a>
+                    ,
+                    <a href="Form.html">Form</a>
+                    ,
+                    <a href="Option.html">Option</a>
+                    ,
+                    <a href="RadioGroup.html">RadioGroup</a>
+                    ,
+                    <a href="Radio.html">Radio</a>
+                    ,
+                    <a href="PropertySelection.html">PropertySelection</a>
+                </strong>
+
+            </p>
+
+            <section name="Parameters">
+
+
+                <table>
+                    <tr>
+                        <th>Name</th>
+                        <th>Type</th>
+                        <th>Direction</th>
+
+                        <th>Required</th>
+                        <th>Default</th>
+                        <th>Description</th>
+                    </tr>
+                    <tr>
+                        <td>multiple</td>
+                        <td>boolean</td>
+
+                        <td>in</td>
+                        <td>no</td>
+                        <td>false</td>
+                        <td>If true, the component allows multiple selection.</td>
+                    </tr>
+                    <tr>
+
+                        <td>disabled</td>
+                        <td>boolean</td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td>false</td>
+                        <td>
+
+                            Controls whether the select is active or not. Corresponds to the
+                            "disabled" HTML attribute.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>displayName</td>
+                        <td>String</td>
+                        <td>in</td>
+                        <td>no</td>
+
+                        <td />
+                        <td>
+                            The user-presentable name for the component, which will be used by a
+                            <a href="FieldLabel.html">FieldLabel</a>
+                            connected to the component.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>validators</td>
+                        <td>
+                            Array or collection of
+                            <a
+                                href="../../tapestry-framework/apidocs/org/apache/tapestry/form/validator/Validator.html">
+                                Validator
+                            </a>
+                            , or
+                            <a
+                                href="../../tapestry-framework/apidocs/org/apache/tapestry/form/validator/Validator.html">
+                                Validator
+                            </a>
+                        </td>
+
+                        <td>in</td>
+                        <td>no</td>
+                        <td />
+                        <td>
+                            The validators to apply to the component. In many cases, a "validators"
+                            binding can help.
+                        </td>
+                    </tr>
+                    <tr>
+
+                        <td>id</td>
+                        <td>String</td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td />
+                        <td>Sets the id attribute for the rendered &lt;select&gt; element.</td>
+
+                    </tr>
+                </table>
+
+                <p>
+                    Body:
+                    <strong>allowed</strong>
+                </p>
+
+                <p>
+                    Informal parameters:
+                    <strong>allowed</strong>
+                </p>
+
+                <p>
+                    Reserved parameters:
+                    <em>name</em>
+                </p>
+
+            </section>
+
+            <section name="Examples">
+
+
+                <p>
+                    In the following example, a user can select several colors (and, because of the
+                    validator, he must select at least one).
+                </p>
+
+                <source xml:space="preserve">
+&lt;form jwcid="@Form" listener="listener:formSubmit"&gt;
+ &lt;span jwcid="@FieldLabel" field="component:colorChooser" displayName="Choose a color"&gt;Color&lt;/span&gt;
+ &lt;select jwcid="colorChooser@Select" multiple="ognl:true" validators="validators:required"&gt;
+  &lt;span jwcid="@Foreach" source="ognl:colors" value="ognl:currentColor" index="ognl:currentColorIndex"&gt;
+   &lt;option jwcid="@Option" selected="ognl:selection[currentColorIndex]" label="ognl:currentColor"/&gt;
+  &lt;/span&gt;
+ &lt;/select&gt;
+ &lt;input type="submit"/&gt;
+&lt;/form&gt;
+</source>
+
+                <source xml:space="preserve">
+public abstract class ColorChooser extends BasePage implements PageBeginRenderListener{
+
+  private String[] colors = {"blue", "red", "green", "yellow"};
+
+  public abstract int getCurrentColorIndex();
+  public abstract String getCurrentColor();
+  public abstract boolean[] getSelection();
+  public abstract void setSelection(boolean[] selection);
+
+  public String[] getColors() {
+    return colors;
+  }
+
+  public void formSubmit() {
+    // process form
+
+  }
+
+  public void pageBeginRender(PageEvent event) {
+    if (getSelection() == null) {
+      setSelection(new boolean[colors.length]);
+    }
+  }
+
+}
+</source>
+
+            </section>
+
+        </section>
+
+    </body>
+</document>

Propchange: tapestry/tapestry4/trunk/src/site/xdoc/components/Select.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/src/site/xdoc/components/ServiceLink.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/xdoc/components/ServiceLink.xml?rev=422268&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/src/site/xdoc/components/ServiceLink.xml (added)
+++ tapestry/tapestry4/trunk/src/site/xdoc/components/ServiceLink.xml Sat Jul 15 09:57:28 2006
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+    Copyright 2004, 2005 The Apache Software Foundation
+    
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<document>
+    <properties>
+        <title>ServiceLink</title>
+    </properties>
+    <body>
+
+        <section name="ServiceLink">
+
+            <p>
+                A component for creating a link for an arbitrary engine service that uses no
+                parameters, such as the reset or home service. A ServiceLink component can emulate
+                an ActionLink, PageLink or DirectLink component, but is most often used in
+                conjunction with an application-specific service.
+            </p>
+
+            <p>
+                Prior to release 2.2, this component was named
+                <strong>Service</strong>
+                .
+            </p>
+
+            <p>
+                <strong>
+                    See also:
+                    <a href="DirectLink.html">DirectLink</a>
+                    ,
+                    <a href="ExternalLink.html">ExternalLink</a>
+                    ,
+                    <a href="GenericLink.html">GenericLink</a>
+                    ,
+                    <a href="PageLink.html">PageLink</a>
+                </strong>
+            </p>
+
+            <section name="Parameters">
+
+
+                <table>
+                    <tr>
+                        <th>Name</th>
+                        <th>Type</th>
+                        <th>Direction</th>
+                        <th>Required</th>
+                        <th>Default</th>
+                        <th>Description</th>
+                    </tr>
+
+                    <tr>
+                        <td>service</td>
+                        <td>String</td>
+
+                        <td>in</td>
+                        <td>yes</td>
+                        <td />
+                        <td>
+                            The name of the
+                            <a
+                                href="../../tapestry-framework/apidocs/org/apache/tapestry/engine/IEngineService.html">
+                                IEngineService
+                            </a>
+                            to invoke.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>parameters</td>
+                        <td>
+                            Object or
+                            <br />
+                            Object[] or
+                            <br />
+                            List
+                        </td>
+
+                        <td>in</td>
+                        <td>no</td>
+                        <td />
+                        <td>
+                            An array of Objects to be encoded into the URL. These parameters will be
+                            decoded when the link is triggered.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>disabled</td>
+                        <td>boolean</td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td>false</td>
+
+                        <td>
+                            <p>
+                                Controls whether the link is produced. If disabled, the portion of
+                                the template the link surrounds is still rendered, but not the link
+                                itself.
+                            </p>
+                            <p>
+                                Using the namespace scheme, to create a link to a page in a library,
+                                you must provide the libraries namespace prefix.
+                            </p>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>anchor</td>
+
+                        <td>String</td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td />
+                        <td>
+                            The name of an anchor or element to link to. The final URL will have '#'
+                            and the anchor appended to it.
+                        </td>
+
+                    </tr>
+
+                    <tr>
+                        <td>scheme</td>
+                        <td>String</td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td />
+                        <td>
+                            The required scheme ("http" or "https", typically) for the URL. This
+                            will force the creation of an absolute URL when the current request's
+                            scheme does not match the value for this parameter. This is most often
+                            used to switch to "https" for secure portions of an application (such as
+                            a login page), before switching back to standard "http" for the majority
+                            of an application.
+                        </td>
+                    </tr>
+
+                    <tr>
+                        <td>port</td>
+                        <td>Integer</td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td />
+                        <td>
+                            The required port (80, 443, 8080. 8443, typically) for the URL. This
+                            will force the creation of an absolute URL when the current request's
+                            scheme does not match the value for this parameter. This is most often
+                            used in conjunction with scheme to switch to "https:443"/"https:8443"
+                            for secure portions of an application (such as a login page), before
+                            switching back to standard "http:80"/"http:80" for the majority of an
+                            application.
+                        </td>
+                    </tr>
+
+                    <tr>
+                        <td>renderer</td>
+                        <td>
+                            <a
+                                href="../../tapestry-framework/apidocs/org/apache/tapestry/link/ILinkRenderer.html">
+                                ILinkRenderer
+                            </a>
+                        </td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td />
+
+                        <td>The object which will actually render the link.</td>
+                    </tr>
+
+                </table>
+
+                <p>
+                    Body:
+                    <strong>rendered</strong>
+                </p>
+
+                <p>
+                    Informal parameters:
+                    <strong>allowed</strong>
+                </p>
+
+                <p>
+                    Reserved parameters:
+                    <em>href</em>
+                </p>
+
+            </section>
+
+            <section name="Examples">
+
+                <p>This example is under construction.</p>
+            </section>
+
+        </section>
+
+    </body>
+</document>

Propchange: tapestry/tapestry4/trunk/src/site/xdoc/components/ServiceLink.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/src/site/xdoc/components/Shell.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/xdoc/components/Shell.xml?rev=422268&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/src/site/xdoc/components/Shell.xml (added)
+++ tapestry/tapestry4/trunk/src/site/xdoc/components/Shell.xml Sat Jul 15 09:57:28 2006
@@ -0,0 +1,275 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+    Copyright 2004, 2005 The Apache Software Foundation
+    
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<document>
+    <properties>
+        <title>Shell</title>
+    </properties>
+    <body>
+
+        <section name="Shell">
+
+            <p>
+                Provides the outer 'shell' of a page, including the <code>&lt;html&gt;, &lt;head&gt;</code> and
+                <code>&lt;title&gt;</code> tags, but not the <code>&lt;body&gt;</code> tag (which is typically provided by a
+                <a href="Body.html">Body</a>
+                component).
+            </p>
+            <p>
+                Most Tapestry pages will include a Shell component enclosing a
+                <a href="Body.html">Body</a>
+                component. The Shell is used to resolve the page's HTML stylesheet and the
+                <a href="Body.html">Body</a>
+                component manages dynamically generated JavaScript.
+            </p>
+            <p>
+                When designing the look and feel of a Tapestry page, include the normal HTML
+                elements before the Shell component, including a <code>&lt;link rel="stylesheet"&gt;</code>
+                element, so that the page will render normally in a web browser, but use a 
+                <code>&lt;span jwcid="$content$"&gt;</code> around the actual content.
+            </p>
+
+            <p>
+                <strong>
+                    See also:
+                    <a href="../../tapestry-framework/apidocs/org/apache/tapestry/html/Shell.html">
+                        org.apache.tapestry.html.Shell
+                    </a>
+                    ,
+                    <a href="Body.html">Body</a>
+                    ,
+                    <a href="PageLink.html">PageLink</a>
+                </strong>
+            </p>
+
+            <section name="Parameters">
+
+
+                <table>
+                    <tr>
+                        <th>Name</th>
+                        <th>Type</th>
+                        <th>Direction</th>
+                        <th>Required</th>
+                        <th>Default</th>
+                        <th>Description</th>
+                    </tr>
+
+                    <tr>
+                        <td>title</td>
+                        <td>String</td>
+                        <td>in</td>
+                        <td>yes</td>
+                        <td></td>
+                        <td>The title for the page, used to render the &lt;title&gt; tag.</td>
+                    </tr>
+
+                    <tr>
+                        <td>raw</td>
+                        <td>boolean</td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td>false</td>
+                        <td>
+                            If false (the default), then HTML characters in the title are escaped.
+                            If true, then value is emitted exactly as is.
+                        </td>
+                    </tr>
+
+                    <tr>
+                        <td>stylesheet</td>
+                        <td>
+                            <a href="../../tapestry-framework/apidocs/org/apache/tapestry/IAsset.html">
+                                IAsset
+                            </a>
+                        </td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>If provided, then a &lt;link&gt; to the stylesheet is generated.</td>
+                    </tr>
+
+                    <tr>
+                        <td>stylesheets</td>
+                        <td>
+                            Array or collection of
+                            <a href="../../tapestry-framework/apidocs/org/apache/tapestry/IAsset.html">
+                                IAsset
+                            </a>
+                        </td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>
+                            If provided, then &lt;link&gt; elements are created for each stylesheet
+                            asset.
+                        </td>
+                    </tr>
+
+                    <tr>
+                        <td>doctype</td>
+                        <td>String</td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td>
+                            HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+                            "http://www.w3.org/TR/html4/loose.dtd"
+                        </td>
+                        <td>
+                            Used to specify the full definition of the DOCTYPE element in the
+                            response page.
+                        </td>
+                    </tr>
+
+                    <tr>
+                        <td>renderContentType</td>
+                        <td>boolean</td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td>true</td>
+                        <td>
+                            If true (the default), then a &lt;meta&gt; tag will be written to set
+                            the content type of the page.
+                        </td>
+                    </tr>
+
+                    <tr>
+                        <td>refresh</td>
+                        <td>int</td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>
+                            If provided, then a &lt;meta&gt; tag will be written to cause a page
+                            refresh. The parameter value is the number of seconds before the
+                            refresh.
+                        </td>
+                    </tr>
+
+                    <tr>
+                        <td>delegate</td>
+                        <td>
+                            <a href="../../tapestry-framework/apidocs/org/apache/tapestry/IRender.html">
+                                IRender
+                            </a>
+                        </td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>
+                            If specified, the delegate is rendered before the close of the
+                            &lt;head&gt; tag. Typically, this is used to provide additional
+                            &lt;meta&gt; tags.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>renderBaseTag</td>
+                        <td>boolean</td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td>true</td>
+                        <td>
+                            Specifies whether or not to render the html basetag element in the
+                            document head.
+                        </td>
+                    </tr>
+
+
+                </table>
+
+                <p>
+                    Body:
+                    <strong>allowed</strong>
+                </p>
+
+                <p>
+                    Informal parameters:
+                    <strong>forbidden</strong>
+                </p>
+
+                <p>
+                    Reserved parameters:
+                    <em>none</em>
+                </p>
+
+            </section>
+
+            <section name="Examples">
+
+
+                <p>The Shell component is used here to provide the page's stylesheet and title.</p>
+
+                <p>
+                    In this example, the Login.html template is in the login subdirectory of the
+                    root application context. The stylesheet is within the styles directory, below
+                    the root application context.
+                </p>
+
+                <p>login/Login.html:</p>
+
+                <source xml:space="preserve">
+&lt;html&gt;
+&lt;head&gt;
+ &lt;link rel="stylesheet" type="text/css" href="../styles/style.css"/&gt;
+ &lt;title&gt;MyCorp Customer Login&lt;/title&gt;
+&lt;/head&gt;
+
+&lt;span jwcid="$content$"&gt;
+&lt;span jwcid="@Shell" stylesheet="asset:stylesheet" title="MyCorp Customer Login"&gt;
+&lt;body jwcid="@Body"&gt;
+
+&lt;h1&gt;Customer Login&lt;/h1&gt;
+Welcome to MyCorp's Customer Portal secure login page.
+
+. . .
+
+&lt;/body&gt;
+&lt;/span&gt;
+&lt;/span&gt;
+&lt;/html&gt;
+</source>
+
+                <p>WEB-INF/login/Login.page:</p>
+
+                <source xml:space="preserve">
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;!DOCTYPE page-specification PUBLIC 
+  "-//Apache Software Foundation//Tapestry Specification 4.0//EN" 
+  "http://tapestry.apache.org/dtd/Tapestry_4_0.dtd"&gt;
+  
+&lt;page-specification&gt;
+
+  . . .
+  
+  &lt;asset name="stylesheet" path="styles/style.css"/&gt;
+   
+&lt;/page-specification&gt;
+
+</source>
+
+                <p>
+                    Note that for page and component specifications stored in the web application
+                    context (even under WEB-INF), relative asset paths are computed from the
+                    <em>root application context directory</em>
+                    .
+                </p>
+
+            </section>
+
+        </section>
+
+    </body>
+</document>

Propchange: tapestry/tapestry4/trunk/src/site/xdoc/components/Shell.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/src/site/xdoc/components/Submit.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/xdoc/components/Submit.xml?rev=422268&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/src/site/xdoc/components/Submit.xml (added)
+++ tapestry/tapestry4/trunk/src/site/xdoc/components/Submit.xml Sat Jul 15 09:57:28 2006
@@ -0,0 +1,254 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+    Copyright 2004, 2005 The Apache Software Foundation
+    
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<document>
+    <properties>
+        <title>Submit</title>
+    </properties>
+    <body>
+
+        <section name="Submit">
+
+            <p>
+                Provides an HTML form submission element, &lt;input type="submit"&gt;. The Submit
+                component must be enclosed by a
+                <a href="Form.html">Form</a>
+                component. A Submit component is used when a single form has multiple form
+                submission buttons, and the application needs to know which one is the trigger for
+                the form submission.
+            </p>
+
+            <p>
+                The application can use two techniques to determine which Submit component (if any)
+                caused the form to be submitted:
+            </p>
+
+            <ul>
+                <li>
+                    A property may be set to some value; this uses the selected and tag parameters.
+                </li>
+                <li>A listener may be notified.</li>
+            </ul>
+
+            <p>
+                It is even possible to combine the two, in which case the property is set first,
+                then the listener is notified. The listener may be notified immediately (i.e., in
+                the middle of processing the form submission) if provided via the 'listener'
+                parameter, but if it is provided via the 'action' parameter, the listener will be
+                notified later, just before the form's listener (if any) is invoked.
+            </p>
+
+
+            <p>
+                <strong>
+                    See also:
+                    <a href="../../tapestry-framework/apidocs/org/apache/tapestry/form/Submit.html">
+                        org.apache.tapestry.form.Submit
+                    </a>
+                    ,
+                    <a href="Form.html">Form</a>
+                    ,
+                    <a href="ImageSubmit.html">ImageSubmit</a>
+                    ,
+                    <a href="LinkSubmit.html">LinkSubmit</a>
+                </strong>
+            </p>
+
+            <section name="Parameters">
+
+
+                <table>
+                    <tr>
+                        <th>Name</th>
+                        <th>Type</th>
+                        <th>Direction</th>
+                        <th>Required</th>
+                        <th>Default</th>
+                        <th>Description</th>
+                    </tr>
+
+                    <tr>
+                        <td>
+                            label
+                            <strong>(deprecated)</strong>
+                        </td>
+                        <td>String</td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>
+                            The label put on the button (this becomes the HTML value attribute).
+                            Alternately, the value attribute may simply be specified as an informal
+                            parameter.
+                        </td>
+                    </tr>
+
+                    <tr>
+                        <td>disabled</td>
+                        <td>boolean</td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td>false</td>
+                        <td>
+                            If set to true, the button will be disabled (will not respond to the
+                            mouse); the browser should provide a "greyed out" appearance.
+                        </td>
+                    </tr>
+
+                    <tr>
+                        <td>selected</td>
+                        <td>Object</td>
+                        <td>out</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>
+                            This parameter is bound to a property that is updated when the submit
+                            button is clicked by the user. The property is updated to match the tag
+                            parameter.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>tag</td>
+                        <td>Object</td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>
+                            Tag used with the selected parameter to indicate which Submit button on
+                            a form was clicked.
+                        </td>
+                    </tr>
+
+                    <tr>
+                        <td>listener</td>
+                        <td>
+                            <a
+                                href="../../tapestry-framework/apidocs/org/apache/tapestry/IActionListener.html">
+                                IActionListener
+                            </a>
+                        </td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>
+                            An optional listener (typically specified as the name of a listener
+                            method), notified when the Submit is triggered.
+                            
+                            <p>
+                            This parameter should <strong>not</strong> be used in the majority of cases as the
+                            listener is notified before all form data has been captured on the server. Only use
+                            this when you know you are going to redirect or do some other cancelling sort of action
+                            that isn't likely to alter form state. Use <em>action</em> as your preferred listener
+                            method parameter.
+                            </p>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>action</td>
+                        <td>
+                            <a
+                                href="../../tapestry-framework/apidocs/org/apache/tapestry/IActionListener.html">
+                                IActionListener
+                            </a>
+                        </td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>
+                            A listener that is notified if this component is triggered just before
+                            the form's listener, after all components enclosed by the Form have had
+                            a chance to update their properties.
+                            
+                            <p>
+                            If you are going to notify a listener, this is probably the parameter you want 
+                            to bind to.
+                            </p>
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>parameters</td>
+                        <td>Object</td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>
+                            Parameter(s) gathered at the time the button is triggered, supplied as
+                            listener parameters in the IRequestCycle available to the listener.
+                            <p>
+                                If the parameter is a Collection, it will be converted to an Object
+                                array (to match the IRequestCycle getListenerParameters()
+                                signature).
+                            </p>
+                            <p>
+                                Allows listeners provided by the 'action' parameter to access any
+                                rewinded state not conveniently placed using tag/selected (e.g. when
+                                there are multiple objects to select as might happen with a nested
+                                For).
+                            </p>
+                        </td>
+                    </tr>
+                </table>
+
+                <p>
+                    Body:
+                    <strong>removed</strong>
+                </p>
+
+                <p>
+                    Informal parameters:
+                    <strong>allowed</strong>
+                </p>
+
+                <p>Reserved parameters: name, type</p>
+
+            </section>
+
+            <section name="Example">
+
+
+                <source xml:space="preserve">
+&lt;form jwcid="form@Form" listener="listener:doSubmit"&gt;
+&lt;table&gt;
+  &lt;tr&gt;
+    &lt;th&gt;User name:&lt;/th&gt;
+    &lt;td&gt;&lt;input jwcid="userName@TextField" value="ognl:userName" size="12"/&gt;&lt;/td&gt;
+  &lt;/tr&gt;
+  &lt;tr&gt;
+    &lt;th&gt;Password:&lt;/th&gt;
+    &lt;td&gt;&lt;input jwcid="password@TextField" value="ognl:password" hidden="true" size="12"/&gt;&lt;/td&gt;
+  &lt;/tr&gt;
+  &lt;tr&gt;
+    &lt;td colspan="2"&gt;
+      &lt;input type="submit" value="Login"/&gt;
+      &lt;input type="submit" jwcid="help@Submit" action="listener:doHelp" value="Help"/&gt;
+    &lt;/td&gt;
+  &lt;/tr&gt;
+&lt;/table&gt;
+&lt;/form&gt;</source>
+
+                <p>
+                    Here, the page class will have
+                    <em>two</em>
+                    listener methods: doHelp() and doSubmit(). doHelp() will be invoked if the user
+                    clicks the Help button, then doSubmit() will be invoked either way.
+                </p>
+
+            </section>
+
+        </section>
+
+    </body>
+</document>

Propchange: tapestry/tapestry4/trunk/src/site/xdoc/components/Submit.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/src/site/xdoc/components/TextArea.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/xdoc/components/TextArea.xml?rev=422268&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/src/site/xdoc/components/TextArea.xml (added)
+++ tapestry/tapestry4/trunk/src/site/xdoc/components/TextArea.xml Sat Jul 15 09:57:28 2006
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+    Copyright 2004, 2005 The Apache Software Foundation
+    
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<document>
+    <properties>
+        <title>TextArea</title>
+    </properties>
+    <body>
+
+        <section name="TextArea">
+
+            <p>
+                A form element control that renders an HTML &lt;textarea&gt;, a multi-line text
+                input.
+            </p>
+
+            <p>
+                <strong>
+                    See also:
+                    <a href="../../tapestry-framework/apidocs/org/apache/tapestry/form/TextArea.html">
+                        org.apache.tapestry.form.TextArea
+                    </a>
+                    ,
+                    <a href="InsertText.html">InsertText</a>
+                    ,
+                    <a href="TextField.html">TextField</a>
+                </strong>
+            </p>
+
+            <section name="Parameters">
+
+
+                <table>
+                    <tr>
+                        <th>Name</th>
+                        <th>Type</th>
+                        <th>Direction</th>
+                        <th>Required</th>
+                        <th>Default</th>
+                        <th>Description</th>
+                    </tr>
+
+                    <tr>
+                        <td>value</td>
+                        <td>string</td>
+                        <td>in / out</td>
+                        <td>yes</td>
+                        <td></td>
+                        <td>
+                            The value to read and update (unless the disabled parameters is true).
+                        </td>
+                    </tr>
+
+                    <tr>
+                        <td>disabled</td>
+                        <td>boolean</td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td>false</td>
+                        <td>
+                            If true, then the &lt;textarea&gt; will be written with a disabled
+                            attribute (preventing user interaction in the client web browser). In
+                            addition, when the form is submitted, the component will not update its
+                            value parameter.
+                        </td>
+                    </tr>
+
+                    <tr>
+                        <td>displayName</td>
+                        <td>string</td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>
+                            A name for the field, which may be used by the
+                            <a href="FieldLabel.html">FieldLabel</a>
+                            component connected to the TextArea.
+                        </td>
+                    </tr>
+
+                </table>
+
+                <p>
+                    Body:
+                    <strong>removed</strong>
+                </p>
+
+                <p>
+                    Informal parameters:
+                    <strong>allowed</strong>
+                </p>
+
+                <p>Reserved parameters: name</p>
+
+                <p>
+                    TextArea components may not have a validator, but they will be decorated by a
+                    <a
+                        href="../../tapestry-framework/apidocs/org/apache/tapestry/valid/IValidationDelegate.html">
+                        IValidationDelegate
+                    </a>
+                    if in error. Since there is no validator, such errors would be set within a
+                    listener method.
+                </p>
+
+            </section>
+
+        </section>
+
+    </body>
+</document>

Propchange: tapestry/tapestry4/trunk/src/site/xdoc/components/TextArea.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/src/site/xdoc/components/TextField.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/xdoc/components/TextField.xml?rev=422268&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/src/site/xdoc/components/TextField.xml (added)
+++ tapestry/tapestry4/trunk/src/site/xdoc/components/TextField.xml Sat Jul 15 09:57:28 2006
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+    Copyright 2004, 2005 The Apache Software Foundation
+    
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<document>
+    <properties>
+        <title>TextField</title>
+    </properties>
+    <body>
+
+        <section name="TextField">
+
+            <p>A form element component that renders an &lt;input&gt; element.</p>
+
+            <p>
+                <strong>
+                    See also:
+                    <a href="../../tapestry-framework/apidocs/org/apache/tapestry/form/TextField.html">
+                        org.apache.tapestry.form.TextField
+                    </a>
+                    ,
+                    <a href="Form.html">Form</a>
+                </strong>
+            </p>
+
+            <section name="Parameters">
+
+
+                <table>
+                    <tr>
+                        <th>Name</th>
+                        <th>Type</th>
+                        <th>Direction</th>
+                        <th>Required</th>
+                        <th>Default</th>
+                        <th>Description</th>
+                    </tr>
+
+                    <tr>
+                        <td>value</td>
+                        <td>string</td>
+                        <td>in / out</td>
+                        <td>yes</td>
+                        <td></td>
+                        <td>
+                            The value to be editted, which is is usually a string. Tapestry has
+                            limited ability to convert to and from strings.
+                        </td>
+                    </tr>
+
+                    <tr>
+                        <td>disabled</td>
+                        <td>boolean</td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td>false</td>
+                        <td>
+                            If true, then a disabled attribute will be rendered as part of the
+                            &lt;input&gt; tag, and the component will not update its value parameter
+                            when the form is submitted.
+                        </td>
+                    </tr>
+
+                    <tr>
+                        <td>displayName</td>
+                        <td>string</td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>
+                            The user-presentable name for the component, which will be used by a
+                            <a href="FieldLabel.html">FieldLabel</a>
+                            connected to the component.
+                        </td>
+                    </tr>
+
+                    <tr>
+                        <td>hidden</td>
+                        <td>boolean</td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td>false</td>
+                        <td>
+                            If true, then the type attribute will be "password", not "text", and
+                            user input in the browser will be masked.
+                        </td>
+                    </tr>
+
+                </table>
+
+                <p>
+                    Body:
+                    <strong>removed</strong>
+                </p>
+
+                <p>
+                    Informal parameters:
+                    <strong>allowed</strong>
+                </p>
+
+                <p>Reserved parameters: name, type, value</p>
+
+            </section>
+
+            <section name="Example">
+
+
+                <p>
+                    Below is an excerpt from a Login page, that collects a user id and a password.
+                </p>
+
+                <p>Login.html: (partial)</p>
+
+                <source xml:space="preserve">
+&lt;form jwcid="form@Form" success="listener:doLogin"&gt;
+  &lt;table&gt;
+    &lt;tr&gt;
+      &lt;th&gt;User id:&lt;/th&gt;
+      &lt;td&gt;&lt;input jwcid="userId@TextField" value="ognl:userId" size="8"/&gt;&lt;/td&gt;
+    &lt;/tr&gt;
+    &lt;tr&gt;
+      &lt;th&gt;Password:&lt;/th&gt;
+      &lt;td&gt;&lt;input jwcid="password@TextField" value="ognl:password" size="8" hidden="true"/&gt;&lt;/td&gt;
+    &lt;/tr&gt;
+    &lt;tr&gt;
+      &lt;td colpsan="2"&gt;
+        &lt;input type="submit" value="Login"/&gt;
+      &lt;/td&gt;
+    &lt;/tr&gt;
+  &lt;/table&gt;
+&lt;/form&gt;</source>
+
+                <p>Login.java:</p>
+
+                <source xml:space="preserve">
+public abstract class Login extends BasePage
+{
+  public abstract String getUserId();
+  public abstract String getPassword();
+  
+  public void doLogin()
+  {
+    // Talk to back end system, etc.
+  }
+}
+</source>
+
+            </section>
+
+        </section>
+
+    </body>
+</document>

Propchange: tapestry/tapestry4/trunk/src/site/xdoc/components/TextField.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/src/site/xdoc/components/Upload.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/xdoc/components/Upload.xml?rev=422268&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/src/site/xdoc/components/Upload.xml (added)
+++ tapestry/tapestry4/trunk/src/site/xdoc/components/Upload.xml Sat Jul 15 09:57:28 2006
@@ -0,0 +1,256 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+    Copyright 2004, 2005 The Apache Software Foundation
+    
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<document>
+    <properties>
+        <title>Upload</title>
+    </properties>
+    <body>
+
+        <section name="Upload">
+
+            <p>
+                A form element used to handle file uploads. The uploaded file is represented by an
+                instance of
+                <a href="../../tapestry-framework/apidocs/org/apache/tapestry/request/IUploadFile.html">
+                    IUploadFile
+                </a>
+                .
+            </p>
+
+            <p>
+                The maximum upload size of a file can be set by configuring the
+                <a
+                    href="../../tapestry-framework/apidocs/org/apache/tapestry/multipart/MultipartDecoder.html">
+                    MultipartDecoder
+                </a>
+                service in hivemind. The default is 10000000(10kb).
+            </p>
+
+            <section name="Example override of default maximum file upload size.">
+
+                <source xml:space="preserve">
+&lt;implementation service-id="tapestry.multipart.ServletMultipartDecoder"&gt;
+&lt;create-instance class="org.apache.tapestry.multipart.MultipartDecoderImpl,maxSize=-1" model="threaded" /&gt;
+&lt;/implementation&gt; 
+</source>
+            </section>
+
+            <p>
+                <strong>
+                    See also:
+
+                    <a href="../../tapestry-framework/apidocs/org/apache/tapestry/form/Upload.html">
+                        org.apache.tapestry.form.Upload
+                    </a>
+                    ,
+                    <a href="site:Form">Form</a>
+                </strong>
+                ,
+                <a
+                    href="../../tapestry-framework/apidocs/org/apache/tapestry/multipart/ServletMultipartDecoder.html">
+                    ServletMultipartDecoder
+                </a>
+            </p>
+
+            <span class="warn">
+                <strong>Warning:</strong>
+                <p>
+                There is a bug in the current fileupload 1.1 version which resolves all filenames to
+                lowercase, this may break certain conditions for people if they are doing file name
+                comparisons. This issue has already been fixed in commons-fileupload version 1.2,
+                which should hopefully be released soon.
+                </p>
+            </span>
+
+            <section name="Parameters">
+
+
+                <table>
+                    <tr>
+                        <th>Name</th>
+                        <th>Type</th>
+                        <th>Direction</th>
+
+                        <th>Required</th>
+                        <th>Default</th>
+                        <th>Description</th>
+                    </tr>
+                    <tr>
+                        <td>file</td>
+                        <td>
+                            <a
+                                href="../../tapestry-framework/apidocs/org/apache/tapestry/request/IUploadFile.html">
+                                IUploadFile
+                            </a>
+                        </td>
+
+                        <td>out</td>
+                        <td>yes</td>
+                        <td></td>
+                        <td>
+                            Updated, when the form is submitted, with the name and content uploaded.
+                        </td>
+                    </tr>
+                    <tr>
+
+                        <td>disabled</td>
+                        <td>boolean</td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td>false</td>
+                        <td>
+
+                            If true, then (on render) the "disabled" attribute is written into the
+                            tag and on submit, the upload will not update its file parameter.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>displayName</td>
+                        <td>string</td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>
+                            The user-presentable name for the component, which will be used by a
+                            <a href="FieldLabel.html">FieldLabel</a>
+                            connected to the component.
+                        </td>
+                    </tr>
+                    <tr>
+                        <td>validators</td>
+                        <td>
+                            Array or collection of
+                            <a
+                                href="../../tapestry-framework/apidocs/org/apache/tapestry/form/validator/Validator.html">
+                                Validator
+                            </a>
+                            , or
+                            <a
+                                href="../../tapestry-framework/apidocs/org/apache/tapestry/form/validator/Validator.html">
+                                Validator
+                            </a>
+                        </td>
+
+                        <td>in</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>The validators to apply to the component.</td>
+                    </tr>
+                    <tr>
+
+                        <td>id</td>
+                        <td>String</td>
+                        <td>in</td>
+                        <td>no</td>
+                        <td></td>
+                        <td>Sets the id attribute for the rendered &lt;input&gt; element.</td>
+
+                    </tr>
+                </table>
+
+                <p>
+                    Body:
+                    <strong>removed</strong>
+                </p>
+
+                <p>
+                    Informal parameters:
+                    <strong>allowed</strong>
+                </p>
+
+                <p>Reserved parameters: name, type</p>
+
+            </section>
+
+            <section name="Examples">
+
+
+                <p>UploadPage.html</p>
+
+                <source xml:space="preserve">
+&lt;form jwcid="@Form" listener="listener:formSubmit"&gt;
+&lt;span jwcid="@FieldLabel" field="component:upload"/&gt;
+&lt;input jwcid="upload@Upload" file="ognl:uploadFile" type="file" displayName="File" validators="validators:required"/&gt;
+&lt;input type= "submit" value="Upload"/&gt;
+&lt;span jwcid="@If" condition="ognl: uploadFile &amp;&amp; serverFile"&gt;
+&lt;ul&gt;
+  &lt;li&gt;Filename: &lt;span jwcid="@Insert" value="ognl:uploadFile.fileName"/&gt;&lt;/li&gt;
+  &lt;li&gt;Client path: &lt;span jwcid="@Insert" value="ognl:uploadFile.filePath"/&gt;&lt;/li&gt;
+  &lt;li&gt;Server Path: &lt;span jwcid="@Insert" value="ognl:serverFile.absolutePath"/&gt;&lt;/li&gt;
+  &lt;li&gt;File Size: &lt;span jwcid="@Insert" value="ognl:serverFile.length()" format="ognl:numberFormat"/&gt; bytes&lt;/li&gt;
+&lt;/ul&gt;
+&lt;/span&gt;
+&lt;/form&gt;
+</source>
+
+                <p>UploadPage.java</p>
+
+                <source xml:space="preserve">
+public abstract class UploadPage extends BasePage {
+
+  public abstract IUploadFile getUploadFile();
+  public abstract File getServerFile();
+  public abstract void setServerFile(File file);
+
+  public Format getNumberFormat() {
+    return NumberFormat.getNumberInstance();
+  }
+
+  public void formSubmit(IRequestCycle cycle) {
+      if (getUploadFile() == null) {
+        return;
+      }
+
+      InputStream fis = getUploadFile().getStream();
+      FileOutputStream fos = null;
+
+      try {
+          fos = new FileOutputStream(new  File(getUploadFile().getFileName()));
+          byte[] buffer = new byte[1024];
+          while (true) {
+              int length = fis.read(buffer);
+              if (length &lt;  0) {
+                  break;
+              }
+              fos.write(buffer, 0, length);
+          }
+          fis.close();
+          fos.close();
+          setServerFile(new File(getUploadFile().getFileName()));
+
+      } catch (IOException ioe) {
+          ioe.printStackTrace();
+      } finally {
+          if (fis != null) {
+              try { fis.close(); } catch (IOException ioe) {}
+          }
+          if (fos != null) {
+              try { fos.close(); } catch (IOException ioe) {}
+          }
+      }
+  }
+
+}
+</source>
+
+
+            </section>
+
+        </section>
+
+    </body>
+</document>

Propchange: tapestry/tapestry4/trunk/src/site/xdoc/components/Upload.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: tapestry/tapestry4/trunk/src/site/xdoc/components/index.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/xdoc/components/index.xml?rev=422268&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/src/site/xdoc/components/index.xml (added)
+++ tapestry/tapestry4/trunk/src/site/xdoc/components/index.xml Sat Jul 15 09:57:28 2006
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+    Copyright 2005 The Apache Software Foundation
+    
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+    
+    http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<document>
+    <properties>
+        <title>Framework Component Reference</title>
+    </properties>
+    <body>
+        
+        <section name="Framework Component Reference">
+            <p>
+                The menu to the left lists all the components provided with the Tapestry framework.
+            </p>
+            <p>
+                Such components may always be referenced without any library prefix; in cases where
+                an application or library provides a component with the same name, the special
+                prefix "framework:" may be used. That is, "DirectLink" and "framework:DirectLink"
+                are equivalent, unless your application (or library) includes a component
+                <em>also</em>
+                named "DirectLink".
+            </p>
+        </section>
+    </body>
+</document>

Propchange: tapestry/tapestry4/trunk/src/site/xdoc/components/index.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: tapestry/tapestry4/trunk/support/build.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/support/build.xml?rev=422268&r1=422267&r2=422268&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/support/build.xml (original)
+++ tapestry/tapestry4/trunk/support/build.xml Sat Jul 15 09:57:28 2006
@@ -30,14 +30,14 @@
 	<property name="work.dir" value="${export.dir}/${module}"/>
 	
 	<target name="convert-docs" >
-		<xslt basedir="../src/documentation/content/xdocs" destdir="tmp"
+		<xslt basedir="../tapestry-framework/src/documentation/content/xdocs/tapestry/ComponentReference" destdir="tmp"
 		       extension=".xml" includes="**/*.xml" 
 				excludes="**/site.xml,**/*.ent,**/*.aart,**/tabs.xml"
 				style="forrest2maven-xdoc.xsl" >
 			
 			<xmlcatalog>
 				<entity publicId="links" 
-					location="links.ent" />
+					location="../../links.ent" />
 				<entity publicId="common" 
 					location="common.ent" />
 			</xmlcatalog>