myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From we...@apache.org
Subject svn commit: r1522833 - /myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Date Fri, 13 Sep 2013 09:38:31 GMT
Author: weber
Date: Fri Sep 13 09:38:31 2013
New Revision: 1522833

URL: http://svn.apache.org/r1522833
Log:
TOBAGO-1313 - Configurable ajax error handling

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

Modified: myfaces/tobago/trunk/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/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=1522833&r1=1522832&r2=1522833&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
(original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Fri Sep 13 09:38:31 2013
@@ -2251,7 +2251,11 @@ Tobago.Updater = {
     LOG.warn('Request failed : ' + requestObject.textStatus); // @DEV_ONLY
 
     if (requestObject.textStatus === 'timeout') {
-      Tobago.Updater.doErrorUpdate(Tobago.parsePartialIds(requestObject.ajaxComponentIds));
+      if (Tobago.Config.get("Ajax", "timeoutAction") == "fullReload") {
+        Tobago.submitAction(null, Tobago.page.id);
+      } else {
+        Tobago.Updater.doErrorUpdate(Tobago.parsePartialIds(requestObject.ajaxComponentIds));
+      }
     } else if (requestObject.textStatus === 'notmodified') {
       Tobago.Updater.handle304Response(Tobago.parsePartialIds(requestObject.ajaxComponentIds));
     } else {
@@ -2359,7 +2363,11 @@ Tobago.Updater = {
         // XXX Here also a double click will be logged, but "warn" is not appropriate.
         LOG.warn("ERROR 500 when updating component id = '" + data.ajaxId + "'"); // @DEV_ONLY
 //        overlay.overlay("destroy");
-        overlay.overlay({error: true, ajax: true});
+        if (Tobago.Config.get("Ajax", "errorAction") == "fullReload") {
+          Tobago.submitAction(null, Tobago.page.id);
+        } else {
+          overlay.overlay({error:true, ajax:true});
+        }
         break;
       default:
         LOG.error('Unknown response code: ' + data.responseCode + " for component id = '"
+ data.ajaxId + "'"); // @DEV_ONLY



Mime
View raw message