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 b0016d3da..aae1e8263 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 @@ -65,14 +65,16 @@ _MF_SINGLTN(_PFX_XHR+"_AjaxUtils", _MF_OBJECT, } //MYFACES-4606 we cannot send a value on an unchecked box as issuing element - if(("checkbox" == type || "radio" == type) && !item.checked) { + let isCheckboxRadio = "checkbox" == type || "radio" == type; + if(isCheckboxRadio && !item.checked) { return; - } else if ("checkbox" == type || "radio" == type) { + } else if (isCheckboxRadio) { var value = ("undefined" == typeof item.value || null == item.value) ? true : item.value; - targetBuf.append(item.id || item.name, value); - } else { - var itemValue = ("undefined" == typeof item.value || null == item.value) ? "" : item.value; - targetBuf.append(item.id || item.name, itemValue); + targetBuf.append(identifier, value); + //item must have a valid value to be able to be appended, without it no dice! + } else if(!(("undefined" == typeof item.value) || (null == item.value))) { + var itemValue = item.value; + targetBuf.append(identifier, itemValue); } },