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/22 22:33:54 UTC
svn commit: r424629 - in /tapestry/tapestry4/trunk:
src/site/xdoc/components/DirectLink.xml src/site/xdoc/components/Shell.xml
tapestry-annotations/src/site/xdoc/index.xml
tapestry-framework/src/java/org/apache/tapestry/html/Shell.jwc
Author: jkuhnert
Date: Sat Jul 22 13:33:54 2006
New Revision: 424629
URL: http://svn.apache.org/viewvc?rev=424629&view=rev
Log:
Updating documentation to reflect changes made to core components.
Modified:
tapestry/tapestry4/trunk/src/site/xdoc/components/DirectLink.xml
tapestry/tapestry4/trunk/src/site/xdoc/components/Shell.xml
tapestry/tapestry4/trunk/tapestry-annotations/src/site/xdoc/index.xml
tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/html/Shell.jwc
Modified: tapestry/tapestry4/trunk/src/site/xdoc/components/DirectLink.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/xdoc/components/DirectLink.xml?rev=424629&r1=424628&r2=424629&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/src/site/xdoc/components/DirectLink.xml (original)
+++ tapestry/tapestry4/trunk/src/site/xdoc/components/DirectLink.xml Sat Jul 22 13:33:54 2006
@@ -54,8 +54,7 @@
<tr>
<th>Name</th>
<th>Type</th>
- <th>Direction</th>
-
+
<th>Required</th>
<th>Default</th>
@@ -65,15 +64,14 @@
<td>listener</td>
<td>
<a
- href="../../tapestry-framework/apidocs/org/apache/tapestry/IActionListener.html">
+ href="../tapestry-framework/apidocs/org/apache/tapestry/IActionListener.html">
IActionListener
</a>
</td>
-
- <td>in</td>
+
<td>yes</td>
- <td />
+ <td></td>
<td>
Specifies an object that is notified when the link is clicked, which is
typically a listener method of its container (for example, listeners.
@@ -91,10 +89,8 @@
<br />
List
</td>
-
- <td>in</td>
<td>no</td>
- <td />
+ <td></td>
<td>
<p>
An array of objects to be encoded into the URL. These parameters
@@ -127,7 +123,7 @@
may now be of any type; type will be maintained when the parameters
are later retrieved by a listener. See
<a
- href="../../tapestry-framework/apidocs/org/apache/tapestry/util/io/DataSqueezer.html">
+ href="../tapestry-framework/apidocs/org/apache/tapestry/util/io/DataSqueezer.html">
DataSqueezer
</a>
for more details.
@@ -138,7 +134,6 @@
<tr>
<td>disabled</td>
<td>boolean</td>
- <td>in</td>
<td>no</td>
<td>false</td>
@@ -150,15 +145,13 @@
<tr>
<td>stateful</td>
<td>boolean</td>
- <td>in</td>
-
<td>no</td>
<td>true</td>
<td>
If true (the default), then the component requires an active (i.e.,
non-new) HttpSession when triggered. Failing that, it throws a
<a
- href="../../tapestry-framework/apidocs/org/apache/tapestry/StaleLinkException.html">
+ href="../tapestry-framework/apidocs/org/apache/tapestry/StaleLinkException.html">
StaleLinkException
</a>
. If false, then no check is necessary. The latter works well with links
@@ -170,7 +163,6 @@
<td>anchor</td>
<td>String</td>
- <td>in</td>
<td>no</td>
<td />
<td>
@@ -184,9 +176,8 @@
<tr>
<td>scheme</td>
<td>String</td>
- <td>in</td>
<td>no</td>
- <td />
+ <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
@@ -200,9 +191,8 @@
<tr>
<td>port</td>
<td>Integer</td>
- <td>in</td>
<td>no</td>
- <td />
+ <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
@@ -218,16 +208,51 @@
<td>renderer</td>
<td>
<a
- href="../../tapestry-framework/apidocs/org/apache/tapestry/link/ILinkRenderer.html">
+ href="../tapestry-framework/apidocs/org/apache/tapestry/link/ILinkRenderer.html">
ILinkRenderer
</a>
</td>
- <td>in</td>
<td>no</td>
- <td />
+ <td></td>
<td>The object which will actually render the link.</td>
+ </tr>
+ <tr>
+ <td>updateComponents</td>
+ <td>String[],Collection</td>
+ <td>no</td>
+ <td></td>
+ <td>
+ In an asynchronous request, specifies which components should have their content
+ rendered back to the client. These are expected to be unique component ids.
+
+ <p>
+ See: <a href="../tapestry-framework/apidocs/org/apache/tapestry/services/ResponseBuilder.html">ResponseBuilder</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>json</td>
+ <td>boolean</td>
+ <td>no</td>
+ <td>false</td>
+ <td>
+ Causes the request to be asynchronous and the response to be captured/rendered via
+ the <a href="../tapestry-framework/apidocs/org/apache/tapestry/services/impl/JSONResponseBuilder.html">JSONResponseBuilder</a>
+ renderer.
+ </td>
+ </tr>
+ <tr>
+ <td>async</td>
+ <td>boolean</td>
+ <td>no</td>
+ <td>false</td>
+ <td>
+ Causes the request to be asynchronous and the response to be captured/rendered via
+ the <a href="../tapestry-framework/apidocs/org/apache/tapestry/services/impl/DojoAjaxResponseBuilder.html">DojoAjaxResponseBuilder</a>
+ renderer.
+ </td>
</tr>
</table>
Modified: 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=424629&r1=424628&r2=424629&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/src/site/xdoc/components/Shell.xml (original)
+++ tapestry/tapestry4/trunk/src/site/xdoc/components/Shell.xml Sat Jul 22 13:33:54 2006
@@ -45,7 +45,7 @@
<p>
<strong>
See also:
- <a href="../../tapestry-framework/apidocs/org/apache/tapestry/html/Shell.html">
+ <a href="../tapestry-framework/apidocs/org/apache/tapestry/html/Shell.html">
org.apache.tapestry.html.Shell
</a>
,
@@ -62,7 +62,6 @@
<tr>
<th>Name</th>
<th>Type</th>
- <th>Direction</th>
<th>Required</th>
<th>Default</th>
<th>Description</th>
@@ -71,7 +70,6 @@
<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 <title> tag.</td>
@@ -80,7 +78,6 @@
<tr>
<td>raw</td>
<td>boolean</td>
- <td>in</td>
<td>no</td>
<td>false</td>
<td>
@@ -92,11 +89,10 @@
<tr>
<td>stylesheet</td>
<td>
- <a href="../../tapestry-framework/apidocs/org/apache/tapestry/IAsset.html">
+ <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 <link> to the stylesheet is generated.</td>
@@ -106,11 +102,10 @@
<td>stylesheets</td>
<td>
Array or collection of
- <a href="../../tapestry-framework/apidocs/org/apache/tapestry/IAsset.html">
+ <a href="../tapestry-framework/apidocs/org/apache/tapestry/IAsset.html">
IAsset
</a>
</td>
- <td>in</td>
<td>no</td>
<td></td>
<td>
@@ -122,7 +117,6 @@
<tr>
<td>doctype</td>
<td>String</td>
- <td>in</td>
<td>no</td>
<td>
HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
@@ -137,7 +131,6 @@
<tr>
<td>renderContentType</td>
<td>boolean</td>
- <td>in</td>
<td>no</td>
<td>true</td>
<td>
@@ -149,7 +142,6 @@
<tr>
<td>refresh</td>
<td>int</td>
- <td>in</td>
<td>no</td>
<td></td>
<td>
@@ -162,11 +154,10 @@
<tr>
<td>delegate</td>
<td>
- <a href="../../tapestry-framework/apidocs/org/apache/tapestry/IRender.html">
+ <a href="../tapestry-framework/apidocs/org/apache/tapestry/IRender.html">
IRender
</a>
</td>
- <td>in</td>
<td>no</td>
<td></td>
<td>
@@ -178,7 +169,6 @@
<tr>
<td>renderBaseTag</td>
<td>boolean</td>
- <td>in</td>
<td>no</td>
<td>true</td>
<td>
@@ -186,8 +176,105 @@
document head.
</td>
</tr>
-
-
+ <tr>
+ <td>ajaxDelegate</td>
+ <td>
+ <a href="../tapestry-framework/apidocs/org/apache/tapestry/IRender.html">
+ IRender
+ </a>
+ </td>
+ <td>no</td>
+ <td>
+ <a href="../tapestry-framework/apidocs/org/apache/tapestry/dojo/AjaxShellDelegate.html">
+ AjaxShellDelegate
+ </a>
+ </td>
+ <td>
+ If specified, allows for the default ajaxDelegate that renders the dojo script
+ includes to be overriden.
+ </td>
+ </tr>
+ <tr>
+ <td>browserLogLevel</td>
+ <td>String - One of [DEBUG,INFO,WARNING,ERROR,CRITICAL]</td>
+ <td>no</td>
+ <td>WARNING</td>
+ <td>
+ Sets the default browser based javascript log level to use to debug client side
+ interactions. If you specify an html element id to place the debug content it will be
+ written there. Otherwise, the default is to write to an element with id "debug", or append to
+ the document body if none exists.
+
+ <p>
+ See the dojo docs for more information about logging, but the basic idea is that you can write
+ statements like <code>dojo.log.info("Doing some operation");</code> in javascript and have them
+ appropriately filtered based on the log level used.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>ajaxEnabled</td>
+ <td>boolean</td>
+ <td>yes</td>
+ <td>true</td>
+ <td>
+ Controls whether or not the
+ <a href="../tapestry-framework/apidocs/org/apache/tapestry/dojo/AjaxShellDelegate.html">
+ AjaxShellDelegate
+ </a> is used to write out javascript include headers for dojo and tapestry core javascript
+ libraries.
+
+ <p>
+ <strong>WARNING:</strong> Turning this off effectively disables javascript for many standard
+ tapestry operations, such as form validation. Be careful about turning it off unless you know
+ it is what you want. Most of the dynamic ajax features aren't used by default unless you
+ specifically use a component / parmater that causes them to happen.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>tapestrySource</td>
+ <td>
+ <a href="../tapestry-framework/apidocs/org/apache/tapestry/IAsset.html">
+ IAsset
+ </a>
+ </td>
+ <td>false</td>
+ <td>classpath:/tapestry/core.js</td>
+ <td>
+ Controls what the root source inclusion is for tapestry javascript packages. Override if you
+ want to replace the built in defaults with a version of your own.
+ </td>
+ </tr>
+ <tr>
+ <td>dojoSource</td>
+ <td>
+ <a href="../tapestry-framework/apidocs/org/apache/tapestry/IAsset.html">
+ IAsset
+ </a>
+ </td>
+ <td>false</td>
+ <td>classpath:/dojo/dojo.js</td>
+ <td>
+ Controls what the root source inclusion is for the dojo javascript packages. Override if you
+ want to replace the built in defaults with a version of your own.
+ </td>
+ </tr>
+ <tr>
+ <td>dojoPath</td>
+ <td>
+ <a href="../tapestry-framework/apidocs/org/apache/tapestry/IAsset.html">
+ IAsset
+ </a>
+ </td>
+ <td>false</td>
+ <td>classpath:/dojo/</td>
+ <td>
+ Specifies the default path to the root dojo folder, not the dojo.js file itself. This
+ is used by the <code>djConfig.baseRelativePath</code> javascript configuration property in dojo
+ to resolve relative resource includes - like widgets/images/js/css/etc..
+ </td>
+ </tr>
</table>
<p>
Modified: tapestry/tapestry4/trunk/tapestry-annotations/src/site/xdoc/index.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-annotations/src/site/xdoc/index.xml?rev=424629&r1=424628&r2=424629&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-annotations/src/site/xdoc/index.xml (original)
+++ tapestry/tapestry4/trunk/tapestry-annotations/src/site/xdoc/index.xml Sat Jul 22 13:33:54 2006
@@ -47,7 +47,7 @@
</p>
<subsection name="Asset">
-
+
<p>
The
<a href="apidocs/org/apache/tapestry/annotations/Asset.html">Asset</a>
@@ -235,6 +235,129 @@
...
</source>
+
+ </subsection>
+
+ <subsection name="EventListener">
+
+
+ <p>
+ The
+ <a
+ href="../tapestry-framework/apidocs/org/apache/tapestry/annotations/EventListener.html">
+ EventListener
+ </a>
+ annotation is attached to
+ <a href="../tapestry-framework/apidocs/org/apache/tapestry/IActionListener">
+ listener
+ </a>
+ methods to dynamically bind and listen to client side browser events.
+ </p>
+
+ <p>
+ This annotation is capable of a variety of tasks, but most of them are centered
+ around the
+ <a href="http://dojotoolkit.org">dojo</a>
+ javascript toolkit event API for binding and listening to javascript events in
+ an AOP fashion.
+ </p>
+
+ <p>
+ As an example, this page form listener method will be called when the component
+ with id "projectChoose" has it's javascript functional equivalent
+ <code>selectOption</code>
+ function called:
+ </p>
+
+ <source xml:space="preserve">
+@EventListener(events = "selectOption", targets = "projectChoose",
+submitForm = "taskForm", async=true)
+public void projectSelected(IRequestCycle cycle)
+{
+ cycle.getResponseBuilder().updateComponent("projectDescription");
+ cycle.getResponseBuilder().updateComponent("feedbackBlock");
+}
+ </source>
+
+ <subsection name="Parameters">
+
+ <table>
+
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Required</th>
+ <th>Default</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>targets</td>
+ <td>String[],String</td>
+ <td>no</td>
+ <td></td>
+ <td>
+ Specifies the components/widgets to listen to events on, in the form of unique
+ component ids. One of either elements OR targets must be supplied.
+ </td>
+ </tr>
+ <tr>
+ <td>elements</td>
+ <td>String[],String</td>
+ <td>no</td>
+ <td></td>
+ <td>
+ Specifies the unique html element dom node ID's to listen to events on. One of
+ either elements OR targets must be supplied.
+ </td>
+ </tr>
+ <tr>
+ <td>events</td>
+ <td>String[],String</td>
+ <td>yes</td>
+ <td></td>
+ <td>
+ Specifies which javascript "events" to listen for. Just as with the dojo api, these
+ events can be simple things like <code>onClick</code> or <code>onSubmit</code>, but can
+ also be bound to specific functions if they exist on the component/widget you are targeting.
+
+ <p>
+ For example, the Autocomplete component wraps a dojo ComboBox widget that has a function named
+ <code>selectOption</code> that is called when an item in the list is selected.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>submitForm</td>
+ <td>String</td>
+ <td>no</td>
+ <td></td>
+ <td>
+ If specified, the form matching the passed in form ID will be submitted before calling your
+ listener method.
+ </td>
+ </tr>
+ <tr>
+ <td>validateForm</td>
+ <td>boolean</td>
+ <td>no</td>
+ <td>false</td>
+ <td>
+ When used in conjunction with the <code>submitForm</code> parameter, optionally enables/disables
+ client side validation when the form is submitted.
+ </td>
+ </tr>
+ <tr>
+ <td>async</td>
+ <td>boolean</td>
+ <td>no</td>
+ <td>true</td>
+ <td>
+ When used in conjunction with the <code>submitForm</code> parameter, optionally submits the form
+ via a dynamic asynchronous request, or submits it using normal http IO POST methods.
+ </td>
+ </tr>
+ </table>
+ </subsection>
</subsection>
Modified: tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/html/Shell.jwc
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/html/Shell.jwc?rev=424629&r1=424628&r2=424629&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/html/Shell.jwc (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/html/Shell.jwc Sat Jul 22 13:33:54 2006
@@ -110,7 +110,7 @@
<parameter name="browserLogLevel" default-value="literal:WARNING">
<description>
Sets the default browser based log level. Default value is INFO. Uses
- the dojo.log API.
+ the dojo.logging API.
</description>
</parameter>