diff --git a/api/src/main/javascript/META-INF/resources/myfaces/_impl/quirks/_AjaxRequestQuirks.js b/api/src/main/javascript/META-INF/resources/myfaces/_impl/quirks/_AjaxRequestQuirks.js index 3195d6b0d..be39308d5 100644 --- a/api/src/main/javascript/META-INF/resources/myfaces/_impl/quirks/_AjaxRequestQuirks.js +++ b/api/src/main/javascript/META-INF/resources/myfaces/_impl/quirks/_AjaxRequestQuirks.js @@ -233,7 +233,7 @@ _MF_CLS(_PFX_XHR + "_AjaxRequestQuirks", myfaces._impl.xhrCore._AjaxRequest, /** */ getFormData:function () { var formDataDecorator = this._Lang.createFormDataDecorator(jsf.getViewState(this._sourceForm)); - if(!this._isBehaviorEvent()) { + if(this._source && !this._isBehaviorEvent()) { this._AJAXUTIL.appendIssuingItem(this._source, formDataDecorator); } return formDataDecorator; diff --git a/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js b/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js index 0ed54c421..7897c9847 100644 --- a/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js +++ b/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js @@ -304,9 +304,9 @@ _MF_CLS(_PFX_XHR + "_AjaxRequest", _MF_OBJECT, /** @lends myfaces._impl.xhrCore. //now this is less performant but we have to call it to allow viewstate decoration ret = this._Lang.createFormDataDecorator(new Array()); _AJAXUTIL.encodeSubmittableFields(ret, this._sourceForm, this._partialIdsArray); - if (this._source && myfacesOptions && myfacesOptions.form && !this._isBehaviorEvent()) + if (this._source && !this._isBehaviorEvent()) { _AJAXUTIL.appendIssuingItem(this._source, ret); - + } } return ret; diff --git a/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_FormDataRequest.js b/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_FormDataRequest.js index 90aafbe08..2fef97662 100644 --- a/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_FormDataRequest.js +++ b/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_FormDataRequest.js @@ -50,14 +50,15 @@ _MF_CLS(_PFX_XHR+"_FormDataRequest", myfaces._impl.xhrCore._AjaxRequest, { //just in case the source item is outside of the form //only if the form override is set we have to append the issuing item //otherwise it is an element of the parent form - if (this._source && myfacesOptions && myfacesOptions.form && !this._isBehaviorEvent()) + if (this._source && !this._isBehaviorEvent()) { _AJAXUTIL.appendIssuingItem(this._source, ret); + } } else { ret = new FormData(); _AJAXUTIL.encodeSubmittableFields(ret, this._sourceForm, this._partialIdsArray); - if (this._source && myfacesOptions && myfacesOptions.form && !this._isBehaviorEvent()) + if (this._source && !this._isBehaviorEvent()) { _AJAXUTIL.appendIssuingItem(this._source, ret); - + } } return ret;