Skip to content

Commit

Permalink
https://issues.apache.org/jira/browse/MYFACES-4638:
Browse files Browse the repository at this point in the history
crossport from 4.0 fix
  • Loading branch information
werpu committed Nov 13, 2023
1 parent be11306 commit bf2b5b2
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
},

Expand Down

0 comments on commit bf2b5b2

Please sign in to comment.