I have a selectBooleanCheckbox with a backing bean that sets the value of the checkbox to true. This shows the box checked on render. (What I want) However when you click the box (assuming it should remove the check) it continues to be checked. Only after a second click does the box become unchecked. This leads to another issue. If the box is never clicked (assuming the boolean should equal true as the value has not changed) the value is saved as false and screwing with my logic. Due to requirements I need to have the box checked on load. Note:The Ajax seems to be working correctly. Here is my code:
html:
<p:selectBooleanCheckbox id="testBox"
widgetVar="textBoxVar"
value="#{bean.testValue}">
<p:ajax event="change" process="testValue">
<s:conversationId/>
</p:ajax>
</p:selectBooleanCheckbox>
bean:
Boolean testValue = 'true';
public void setTestValue(Boolean test1){
this.testValue = test1;
}
public Boolean getTestValue(){
return this.test;
}