You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2007/03/02 00:25:31 UTC

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

Author: bommel
Date: Thu Mar  1 13:14:24 2007
New Revision: 513496

URL: http://svn.apache.org/viewvc?view=rev&rev=513496
Log:
(TOBAGO-303) Ajax reloads stopped when submitting non-JSF request

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?view=diff&rev=513496&r1=513495&r2=513496
==============================================================================
--- 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 Thu Mar  1 13:14:24 2007
@@ -1611,13 +1611,13 @@
       if (actionId && this.currentActionId == actionId) {
         LOG.debug('Ignoring request');
         // If actionId equals currentActionId asume double request: do nothing
-        return;
+        return false;
       }
       index = this.requests.push(req);
       //LOG.debug('index = ' + index)
       this.currentActionId = actionId;
     } else {
-      return;
+      return false;
     }
     //LOG.debug('index = ' + index)
     if (index == 1) {
@@ -1626,6 +1626,7 @@
     } else {
       LOG.debug("Request queued!");
     }
+    return true;
   },
 
   requestComplete: function() {
@@ -1732,9 +1733,15 @@
           + '&' + Form.serialize(Tobago.form);
 
       //    LOG.debug("request url = " + url);
-      Tobago.Transport.request(function() {
+      var queued = Tobago.Transport.request(function() {
         new Ajax.Updater(container, url, requestOptions);
       }, false, actionId);
+      if (!queued) {
+        //LOG.error("No update onFailure")
+        if (typeof requestOptions.onFailure  == 'function' ) {
+          requestOptions.onFailure();
+        }
+      }
       Tobago.action.value = oldAction;
     } else {
       LOG.info("No Ajax transport found! Doing full page reload.");