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/08/27 23:06:24 UTC

svn commit: r437460 - in /tapestry/tapestry4/trunk: src/site/xdoc/components/ tapestry-framework/src/js/tapestry/ tapestry-framework/src/js/tests/

Author: jkuhnert
Date: Sun Aug 27 14:06:22 2006
New Revision: 437460

URL: http://svn.apache.org/viewvc?rev=437460&view=rev
Log:
Updated submit component types documentation for new async/json/updateComponents paramters.

Modified tapestry asynchronous bind calls to use the queueBind() function in dojo.io to try to eliminate
redundant/spurrious io requests, as well as to prevent concurrent updates from destroying each others 
actions during important operations like script/content replacement/evaluation.

Modified:
    tapestry/tapestry4/trunk/src/site/xdoc/components/ImageSubmit.xml
    tapestry/tapestry4/trunk/src/site/xdoc/components/LinkSubmit.xml
    tapestry/tapestry4/trunk/src/site/xdoc/components/Submit.xml
    tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/core.js
    tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form.js
    tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/test.js
    tapestry/tapestry4/trunk/tapestry-framework/src/js/tests/test_form.js

Modified: tapestry/tapestry4/trunk/src/site/xdoc/components/ImageSubmit.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/xdoc/components/ImageSubmit.xml?rev=437460&r1=437459&r2=437460&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/src/site/xdoc/components/ImageSubmit.xml (original)
+++ tapestry/tapestry4/trunk/src/site/xdoc/components/ImageSubmit.xml Sun Aug 27 14:06:22 2006
@@ -236,6 +236,42 @@
                             <a href="Form.html">Form</a> they will be invoked accordingly.
                         </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>
 
                 <p>

Modified: tapestry/tapestry4/trunk/src/site/xdoc/components/LinkSubmit.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/src/site/xdoc/components/LinkSubmit.xml?rev=437460&r1=437459&r2=437460&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/src/site/xdoc/components/LinkSubmit.xml (original)
+++ tapestry/tapestry4/trunk/src/site/xdoc/components/LinkSubmit.xml Sun Aug 27 14:06:22 2006
@@ -177,6 +177,42 @@
                             <a href="Form.html">Form</a> they will be invoked accordingly.
                         </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>
 
                 <p>

Modified: 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=437460&r1=437459&r2=437460&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/src/site/xdoc/components/Submit.xml (original)
+++ tapestry/tapestry4/trunk/src/site/xdoc/components/Submit.xml Sun Aug 27 14:06:22 2006
@@ -219,6 +219,42 @@
                             <a href="Form.html">Form</a> they will be invoked accordingly.
                         </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>
 
                 <p>

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/core.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/core.js?rev=437460&r1=437459&r2=437460&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/core.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/core.js Sun Aug 27 14:06:22 2006
@@ -48,7 +48,7 @@
 			parms.encoding="UTF-8";
 		}
 		
-		dojo.io.bind(parms);
+		dojo.io.queueBind(parms);
 	},
 	
 	/**

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form.js?rev=437460&r1=437459&r2=437460&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/form.js Sun Aug 27 14:06:22 2006
@@ -303,7 +303,7 @@
 			kwArgs.load=(function(){tapestry.load.apply(this, arguments);});
 		}
 		
-		dojo.io.bind(kwArgs);
+		dojo.io.queueBind(kwArgs);
 	}
 }
 

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/test.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/test.js?rev=437460&r1=437459&r2=437460&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/test.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/test.js Sun Aug 27 14:06:22 2006
@@ -63,7 +63,7 @@
 	}
 }
 
-dojo.io.bind=function(kwArgs){
+dojo.io.queueBind=function(kwArgs){
 	dojo.log.info("dojo.io.RhinoIO.bind():");
 	dojo.debugShallow(kwArgs);
 }

Modified: tapestry/tapestry4/trunk/tapestry-framework/src/js/tests/test_form.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/tests/test_form.js?rev=437460&r1=437459&r2=437460&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/tests/test_form.js (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/tests/test_form.js Sun Aug 27 14:06:22 2006
@@ -91,14 +91,14 @@
 	node.elements=[];
 	document.body.appendChild(node);
 	
-	dojo.event.connect(dojo.io, "bind", this, checkSubmitParms);
+	dojo.event.connect(dojo.io, "queueBind", this, checkSubmitParms);
 	
 	tapestry.form.registerForm("formparmtest");
 	tapestry.form.submit("formparmtest", null, {async:true,url:"/new/url"});
 	
 	jum.assertTrue("bindCalled", bindCalled);
 	
-	dojo.event.disconnect(dojo.io, "bind", this, checkSubmitParms);
+	dojo.event.disconnect(dojo.io, "queueBind", this, checkSubmitParms);
 }
 
 function checkSubmitParms(kwArgs){
@@ -117,14 +117,14 @@
 	node.elements=[];
 	document.body.appendChild(node);
 	
-	dojo.event.connect(dojo.io, "bind", this, checkDefaultParms);
+	dojo.event.connect(dojo.io, "queueBind", this, checkDefaultParms);
 	
 	tapestry.form.registerForm("formasynctest", true);
 	tapestry.form.submit("formasynctest");
 	
 	jum.assertTrue("bindCalled", bindCalled);
 	
-	dojo.event.disconnect(dojo.io, "bind", this, checkDefaultParms);
+	dojo.event.disconnect(dojo.io, "queueBind", this, checkDefaultParms);
 }
 
 function checkDefaultParms(kwArgs){