You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by gm...@apache.org on 2007/08/14 11:54:24 UTC
svn commit: r565682 -
/myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/ppr/resource/ppr.js
Author: gmuellan
Date: Tue Aug 14 02:54:24 2007
New Revision: 565682
URL: http://svn.apache.org/viewvc?view=rev&rev=565682
Log:
callbackErrorHandler function to force a common submit ought to be called in any case after a response error. The attribute 'showDebugMessages' should only affect a debug alert window.
Modified:
myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/ppr/resource/ppr.js
Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/ppr/resource/ppr.js
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/ppr/resource/ppr.js?view=diff&rev=565682&r1=565681&r2=565682
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/ppr/resource/ppr.js (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/ppr/resource/ppr.js Tue Aug 14 02:54:24 2007
@@ -170,13 +170,15 @@
var componentUpdate = null;
var domElement = null;
- for (var i = 0; i < componentUpdates.length; i++)
- {
- componentUpdate = componentUpdates[i];
- domElement = dojo.byId(componentUpdate.getAttribute("id"));
- //todo - doesn't work with tables in IE (not used for tables at the moment)
- domElement.innerHTML = componentUpdate.firstChild.data;
- }
+
+ for (var i = 0; i < componentUpdates.length; i++)
+ {
+ componentUpdate = componentUpdates[i];
+ domElement = dojo.byId(componentUpdate.getAttribute("id"));
+ //todo - doesn't work with tables in IE (not used for tables at the moment)
+ domElement.innerHTML = componentUpdate.firstChild.data;
+ }
+
//ensure that new buttons in the PartialUpdate also have onclick-handlers
this.formNode.myFacesPPRCtrl.reConnectEventHandlers();
@@ -207,18 +209,22 @@
}
}
}
- else if(this.showDebugMessages)
+ else
{
- // In case of an error during the AJAX Request do a normal form submit
- // to enable showing a proper error page
- this.formNode.myFacesPPRCtrl.callbackErrorHandler();
+ // In case of an error during the AJAX Request do a normal form submit
+ // to enable showing a proper error page
+ this.formNode.myFacesPPRCtrl.callbackErrorHandler();
}
}
org.apache.myfaces.PPRCtrl.prototype.callbackErrorHandler = function() {
- if(!this.lastSubmittedElement) {
- alert("An unexpected error occured during an ajax-request - page has been fully submitted!");
+ if(!this.lastSubmittedElement)
+ {
+ if(this.showDebugMessages)
+ {
+ alert("An unexpected error occured during an ajax-request - page has been fully submitted!");
+ }
this.form.submit();
}