myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From we...@apache.org
Subject svn commit: r432576 - /myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Date Fri, 18 Aug 2006 13:28:32 GMT
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]();



Mime
View raw message