You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2006/08/18 15:28:32 UTC

svn commit: r432576 - /myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js

Author: weber
Date: Fri Aug 18 06:28:30 2006
New Revision: 432576

URL: http://svn.apache.org/viewvc?rev=432576&view=rev
Log:
exclude submit requests from ajax request queue

Modified:
    myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js

Modified: myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=432576&r1=432575&r2=432576&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Fri Aug 18 06:28:30 2006
@@ -331,11 +331,13 @@
     */
   submitAction: function(actionId) {
     Tobago.Transport.request(function() {
+      var req = Tobago.Transport.requests.shift(); // remove this from queue
+      LOG.debug("request removed :" + req.toString());
       Tobago.action.value = actionId;
       Tobago.onSubmit();
 //      LOG.debug("submit form with action: " + Tobago.action.value);
       Tobago.form.submit();
-    });
+    }, true);
   },
 
    /**
@@ -1297,8 +1299,18 @@
 Tobago.Transport = {
   requests: new Array(),
 
-  request: function(req) {
-    this.requests.push(req);
+  pageSubmited: false,
+
+  request: function(req, submitPage) {
+    if (submitPage) {
+        this.pageSubmited = true;
+        this.requests.push(req);
+    } else if (!this.pageSubmited) {
+      this.requests.push(req);
+    } else {
+        return;
+    }
+
     if (this.requests.length == 1) {
       LOG.debug("Execute request!");
       this.requests[0]();