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 2023/06/14 19:40:57 UTC
[myfaces] branch 2.2.x updated: MYFACES-4606: Fix a small issue caused by the naming container fixes
This is an automated email from the ASF dual-hosted git repository.
werpu pushed a commit to branch 2.2.x
in repository https://gitbox.apache.org/repos/asf/myfaces.git
The following commit(s) were added to refs/heads/2.2.x by this push:
new 5fc2a4d38 MYFACES-4606: Fix a small issue caused by the naming container fixes
new 34ce9654b Merge pull request #585 from werpu/2.2.x
5fc2a4d38 is described below
commit 5fc2a4d38f2e4ecca9afba97e76142313944dfd6
Author: Werner Punz <we...@gmail.com>
AuthorDate: Wed Jun 14 00:42:47 2023 +0200
MYFACES-4606: Fix a small issue caused by the naming container fixes
---
.../META-INF/resources/myfaces/_impl/xhrCore/_AjaxRequest.js | 5 +++--
.../META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js | 7 +++++--
2 files changed, 8 insertions(+), 4 deletions(-)
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 c0a7c254c..a290f5e03 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
@@ -329,8 +329,9 @@ _MF_CLS(_PFX_XHR + "_AjaxRequest", _MF_OBJECT, /** @lends myfaces._impl.xhrCore.
* which keeps the final Send Representation of the
*/
getFormData:function () {
- var _AJAXUTIL = this._AJAXUTIL, myfacesOptions = this._context.myfaces;
- return this._Lang.createFormDataDecorator(jsf.getViewState(this._sourceForm));
+ var formDataDecorator = this._Lang.createFormDataDecorator(jsf.getViewState(this._sourceForm));
+ this._AJAXUTIL.appendIssuingItem(this._source, formDataDecorator);
+ return formDataDecorator;
},
/**
diff --git a/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js b/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js
index 1375d420a..d41b8a457 100644
--- a/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js
+++ b/api/src/main/javascript/META-INF/resources/myfaces/_impl/xhrCore/_AjaxUtils.js
@@ -57,8 +57,11 @@ _MF_SINGLTN(_PFX_XHR+"_AjaxUtils", _MF_OBJECT,
*/
appendIssuingItem: function (item, targetBuf) {
// if triggered by a Button send it along
- if (item && item.type && item.type.toLowerCase() == "submit") {
- targetBuf.append(item.name, item.value);
+ if (item && item.type &&
+ (item.type.toLowerCase() == "submit" ||
+ item.type.toLowerCase() == "button" )) {
+ //buttons not always have a name unlike inputs
+ targetBuf.append(item.id || item.name, item.value);
}
},