Whatever I use (jsf ajax, bootsfaces, primefaces) the checkbox calls the bean method on second click. I have done many research , tried to use the fixviewstate from omnifaces, nothing works. The bean method is only triggered on second click, never on first. here is an example with primefaces :
<h:form id="myformexample">
<b:row>
<b:column colSm="12">
<p:selectBooleanCheckbox id="value2zz" value="#{selectedEmployeeDayBean.morningActive}">
<p:ajax update="mypane" listener="#{selectedEmployeeDayBean.clickMorning()}" />
</p:selectBooleanCheckbox>
</b:column>
</b:row>
<h:panelGroup id="mypane">
<b:row>
<b:column colSm="12">
<h:outputText value="#{selectedEmployeeDayBean.morningActive}"/>
</b:column>
</b:row>
</h:panelGroup>
</h:form>
my backing bean methods:
public boolean isMorningActive() {
return morningActive;
}
public void setMorningActive(boolean morningActive) {
this.morningActive = morningActive;
}
public void clickMorning(){
this.morningActive = !this.morningActive;
}
I use JSF 2.2 with javaEE8 , primefaces6.0 bootsfaces1.0, deployed on wildfly(jboss) 10.0
What do I do wrong ? Thanks