You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2012/06/22 15:41:01 UTC

svn commit: r1352887 - /myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js

Author: lofwyr
Date: Fri Jun 22 13:41:00 2012
New Revision: 1352887

URL: http://svn.apache.org/viewvc?rev=1352887&view=rev
Log:
TOBAGO-1161: Double AJAX request shows an error in the area 
Merged from trunk [from revision 1352824]

Modified:
    myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js   (contents, props changed)

Modified: myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=1352887&r1=1352886&r2=1352887&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Fri Jun 22 13:41:00 2012
@@ -1860,6 +1860,9 @@ Tobago.Transport = {
     return this.ajaxTransport && typeof this.ajaxTransport.request == 'function';
   },
 
+  /**
+   * @return true if the request is queued or ignored, because of a double request.
+   */
   request: function(req, submitPage, actionId) {
     var index = 0;
     if (submitPage) {
@@ -1871,7 +1874,7 @@ Tobago.Transport = {
       if (actionId && this.currentActionId == actionId) {
         LOG.debug('Ignoring request'); // @DEV_ONLY
         // If actionId equals currentActionId assume double request: do nothing
-        return false;
+        return true;
       }
       index = this.requests.push(req);
       //LOG.debug('index = ' + index)
@@ -2068,9 +2071,9 @@ Tobago.Updater = {
         Tobago.partialRequestIds = hidden;
       }
 
-      var queued = Tobago.Transport.ajaxTransport.request(requestOptions);
+      var error = !Tobago.Transport.ajaxTransport.request(requestOptions);
 
-      if (!queued) {
+      if (error) {
         LOG.error('error on update: not queued!'); // @DEV_ONLY
         if (!ids) {
           ids = Tobago.parsePartialIds(ajaxComponentIds);

Propchange: myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
------------------------------------------------------------------------------
  Merged /myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js:r1352824