I would like to prevent triggering the onchange event of selectbooleancheckbox when its value is toggled in toggleBillableChkBox method.
<p:selectBooleanCheckbox value="#{myBean.billableBoolean}" widgetVar="billableEditVar"
id="billableEdit" onchange="showBillableForEdit(this)">
</p:selectBooleanCheckbox>
function showBillableForEdit(obj){
if(obj.checked){
confirmBillableYesEdit.show();
} else{
confirmBillableNoEdit.show();
}
}
<p:confirmDialog id="confirmBYesEditId" header="Please Confirm" severity="alert" visible="false"
widgetVar="confirmBillableYesEdit"
message="edit Are you sure you want to invoice this service ?" >
<p:commandButton value="Yes" oncomplete="confirmBillableYesEdit.hide();" global="false" >
</p:commandButton>
<p:commandButton value="No" onclick="toggleBillableChkBox();"
oncomplete="confirmBillableYesEdit.hide();">
</p:commandButton>
</p:confirmDialog>
function toggleBillableChkBox() {
billableEditVar.toggle();
}