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

svn commit: r397401 - in /tapestry/tapestry4/branches/4.0: contrib/src/documentation/content/xdocs/tapestry-contrib/ComponentReference/XTile.xml src/documentation/content/xdocs/links.ent src/documentation/content/xdocs/site.xml

Author: bwallace
Date: Wed Apr 26 22:04:30 2006
New Revision: 397401

URL: http://svn.apache.org/viewcvs?rev=397401&view=rev
Log:
[TAPESTRY-921] Created XTile documentation

Added:
    tapestry/tapestry4/branches/4.0/contrib/src/documentation/content/xdocs/tapestry-contrib/ComponentReference/XTile.xml
Modified:
    tapestry/tapestry4/branches/4.0/src/documentation/content/xdocs/links.ent
    tapestry/tapestry4/branches/4.0/src/documentation/content/xdocs/site.xml

Added: tapestry/tapestry4/branches/4.0/contrib/src/documentation/content/xdocs/tapestry-contrib/ComponentReference/XTile.xml
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/branches/4.0/contrib/src/documentation/content/xdocs/tapestry-contrib/ComponentReference/XTile.xml?rev=397401&view=auto
==============================================================================
--- tapestry/tapestry4/branches/4.0/contrib/src/documentation/content/xdocs/tapestry-contrib/ComponentReference/XTile.xml (added)
+++ tapestry/tapestry4/branches/4.0/contrib/src/documentation/content/xdocs/tapestry-contrib/ComponentReference/XTile.xml Wed Apr 26 22:04:30 2006
@@ -0,0 +1,178 @@
+<?xml version="1.0"?>
+<!-- 
+   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.
+-->
+
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "./dtd/document-v12.dtd"
+[
+	<!ENTITY projectroot '../../'>
+	<!ENTITY % links.ent SYSTEM "../../links.ent">
+	%links.ent;
+]>
+<document>
+  <header>
+    <title>XTile</title>
+  </header>
+  
+  <body>
+
+<p>
+   A component providing the required JavaScript to pass some information to the server
+   and receive its response without reloading the page (Ajax)
+</p>
+
+<section>
+  <title>Parameters</title>
+  
+<table>
+	<tr> 
+    	<th>Name</th>
+	    <th>Type</th>
+	 	<th>Direction</th>
+	    <th>Required</th> 
+    	<th>Default</th>
+	    <th>Description</th>
+	</tr>
+
+    <tr>
+		<td>listener</td>
+		<td>&IActionListener;</td> 
+		<td>in</td>
+		<td>yes</td>
+		<td></td>
+		<td>
+        The listener that will be invoked when the Javascript function with the given name is invoked.
+        Any parameters passed to the send function will be available from cycle.getServiceParameters(). 
+        In addition, the listener can perform cycle.setServiceParameters() to pass an array of
+        strings to the JavaScript receive function.
+		</td>
+    </tr>
+    
+    <tr>
+		<td>sendName</td>
+		<td>String</td> 
+		<td>in</td>
+		<td>yes</td>
+		<td></td>
+		<td>
+        The name of the JavaScript function that the script will define to allow the application
+        to send information to the server.
+     </td>
+     </tr>
+    
+    <tr>
+		<td>receiveName</td>
+		<td>String</td> 
+		<td>in</td>
+		<td>yes</td>
+		<td></td>
+		<td>
+        The name of the JavaScript function that the script will call to allow the application
+        to receive information from the server some time after the send function has been invoked.
+     </td>
+     </tr>
+    
+    <tr>
+		<td>errorName</td>
+		<td>String</td> 
+		<td>in</td>
+		<td>no</td>
+		<td>null</td>
+		<td>
+        The name of the JavaScript function that the script will call to indicate that
+        an error has occurred while sending the information to the server.
+     </td>
+     </tr>
+    
+    <tr>
+		<td>disableCaching</td>
+		<td>boolean</td> 
+		<td>in</td>
+		<td>no</td>
+		<td>false</td>
+		<td>
+        Some browsers cache repeated requests that have identical URLs.
+        Pass 'true' to this parameter to disable caching by making the URLs unique.
+     </td>
+     </tr>
+</table>
+  
+<p>
+  Body: <strong>removed</strong>
+</p>  
+
+<p>
+  Informal parameters: <strong>allowed</strong>
+</p>
+
+<p>
+  Reserved parameters: <em>none</em>
+</p>
+
+</section>
+
+<section>
+  <title>Examples</title>
+    <p>The XTile example has portions implemented in the HTML and a listener method
+       in the page class. They are broken down as follows:</p>
+       
+    <p>XTileExample.html</p>
+
+  	<source><![CDATA[
+<html>
+  <head>
+    <title>XTile Example</title>
+  </head>
+  <body>
+    <span jwcid="@contrib:XTile" listener="ognl:listeners.handleListRequest"
+        sendName="sendPrefix" receiveName="receivevList"/>
+    <form action="Results.html" method="post">
+       <input type="text" onkeyup="sendPrefix(this.value)"/>
+       <br/>
+       <textarea name="listing" rows="5"></textarea>
+    </form>
+    <script>
+      function recvList(arr) {
+      	document.f.listing.value = arr.join("\n");
+      }
+    </script>
+
+  </body>
+</html>
+	]]></source>
+	
+	  <p>Then in your page class you just need to add the appropriate method.</p>
+	  
+    <p>XTileExample.java</p>
+  	<source><![CDATA[
+    .
+    .
+    .
+    public void handleListRequest(IRequestCycle cycle) {
+      Object[] params = cycle.getServiceParameters();
+      if (params.length == 0) return;
+
+      String typed = params[0].toString();
+      String[] ret = findCompletions(typed);
+      cycle.setServiceParameters(ret);
+    }
+    .
+    .
+    .
+	]]></source>
+
+</section>
+</body>
+</document>
\ No newline at end of file

Modified: tapestry/tapestry4/branches/4.0/src/documentation/content/xdocs/links.ent
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/branches/4.0/src/documentation/content/xdocs/links.ent?rev=397401&r1=397400&r2=397401&view=diff
==============================================================================
--- tapestry/tapestry4/branches/4.0/src/documentation/content/xdocs/links.ent (original)
+++ tapestry/tapestry4/branches/4.0/src/documentation/content/xdocs/links.ent Wed Apr 26 22:04:30 2006
@@ -209,6 +209,7 @@
 <!ENTITY TreeTableDataView 	'<link href="site:TreeTableDataView">TreeTableDataView</link>'>
 <!ENTITY TreeTableNodeViewDelegator 	'<link href="site:TreeTableNodeViewDelegator">TreeTableNodeViewDelegator</link>'>
 <!ENTITY TreeView 			'<link href="site:TreeView">TreeView</link>'>
+<!ENTITY XTile					'<link href="site:XTile">XTile</link>'>
 
 <!-- External links -->
 

Modified: tapestry/tapestry4/branches/4.0/src/documentation/content/xdocs/site.xml
URL: http://svn.apache.org/viewcvs/tapestry/tapestry4/branches/4.0/src/documentation/content/xdocs/site.xml?rev=397401&r1=397400&r2=397401&view=diff
==============================================================================
--- tapestry/tapestry4/branches/4.0/src/documentation/content/xdocs/site.xml (original)
+++ tapestry/tapestry4/branches/4.0/src/documentation/content/xdocs/site.xml Wed Apr 26 22:04:30 2006
@@ -170,6 +170,7 @@
          <TreeView label="TreeView" href="TreeView.html"/>
          <ValidatingTextField label="ValidatingTextField" href="ValidatingTextField.html"/>
          <When label="When" href="When.html"/>
+         <XTile label="XTile" href="XTile.html"/>
        </ComponentReference>
          
       <reports label="Reports">



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org