You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2011/11/09 10:41:53 UTC
svn commit: r1199676 - in
/myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore:
_AjaxRequest.js _AjaxResponse.js
Author: werpu
Date: Wed Nov 9 09:41:53 2011
New Revision: 1199676
URL: http://svn.apache.org/viewvc?rev=1199676&view=rev
Log:
https://issues.apache.org/jira/browse/MYFACES-3391
fixing the issue
Modified:
myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js
myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.js
Modified: myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js?rev=1199676&r1=1199675&r2=1199676&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js (original)
+++ myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js Wed Nov 9 09:41:53 2011
@@ -197,7 +197,10 @@ _MF_CLS(_PFX_XHR + "_AjaxRequest", _MF_O
jsf.ajax.response((xhr.getXHRObject) ? xhr.getXHRObject() : xhr, context);
- this._sendEvent("SUCCESS");
+ //an error in the processing has been raised
+ if(!context._mfInternal.internalError) {
+ this._sendEvent("SUCCESS");
+ }
} catch (e) {
this._onException(xhr, context, "myfaces._impl.xhrCore._AjaxRequest", "callback", e);
}
@@ -326,7 +329,7 @@ _MF_CLS(_PFX_XHR + "_AjaxRequest", _MF_O
* @param exception the embedded exception
*/
_stdErrorHandler: function(request, context, sourceClass, func, exception) {
-
+ context._mfInternal.internalError = true;
var xhrQueue = this._xhrQueue;
try {
this.attr("impl").stdErrorHandler(request, context, sourceClass, func, exception);
Modified: myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.js
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.js?rev=1199676&r1=1199675&r2=1199676&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.js (original)
+++ myfaces/core/branches/2.0.x/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxResponse.js Wed Nov 9 09:41:53 2011
@@ -83,12 +83,9 @@ _MF_SINGLTN(_PFX_XHR + "_AjaxResponse",
// to solve IE error 1072896658 when a Java server sends iso88591
// istead of ISO-8859-1
- if (!request) {
- throw Exception(_Lang.getMessage("ERR_EMPTY_RESPONSE", null, "jsf.ajaxResponse"));
- }
-
- if (!_Lang.exists(request, "responseXML")) {
+ if (!request || !_Lang.exists(request, "responseXML")) {
_Impl.sendError(request, context, _Impl.EMPTY_RESPONSE);
+ context._mfInternal.internalError = true;
return;
}
//check for a parseError under certain browsers
@@ -798,6 +795,7 @@ _MF_SINGLTN(_PFX_XHR + "_AjaxResponse",
var _Impl = this._Impl;
_Impl.sendError(request, context, _Impl.MALFORMEDXML
, _Impl.MALFORMEDXML, msg);
+ context._mfInternal.internalError = true;
}
})