title: h:selectBooleanCheckbox does not work the first time
body: <p>I want to make an outputtext that is appearing according to a value of checkbox; here is my code:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8' ?&gt;
   &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
   &lt;html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"&gt;
  
  &lt;body&gt;
      &lt;ui:composition template="../WEB-INF/templates/template.xhtml"&gt;
          &lt;ui:define name="content"&gt;
              &lt;h:form id="formModifClt"&gt;
              &lt;h:outputText value="voulez-vous modifier cette image ?"/&gt;
              &lt;h:selectBooleanCheckbox value="#{clientController.modifierImage}" &gt;
              &lt;f:ajax event="click" listener="#{clientController.onChangeCheckBox()}" render="textPanel" /&gt;
              &lt;/h:selectBooleanCheckbox&gt;
              &lt;p:outputPanel id="textPanel" autoUpdate="true" &gt;
              &lt;h:outputText value="Oui" rendered="#{clientController.modifierImage}" /&gt;
              &lt;h:outputText value="Non" rendered="#{!clientController.modifierImage}" /&gt;
              &lt;/p:outputPanel&gt;
          &lt;p:outputPanel autoUpdate="true" &gt;
          &lt;h:outputText value="Logo" rendered="#{clientController.modifierImage}" id="logo" /&gt;
          &lt;p:fileUpload id="up" fileUploadListener="#{fileUploadController.handleFileUpload}"  
                    mode="advanced" 
                    sizeLimit="100000" 
                    required="true"
                    allowTypes="/(\.|\/)(gif|jpe?g|png)$/" rendered="#{clientController.modifierImage}"/&gt;
          &lt;/p:outputPanel&gt;
          &lt;p:commandButton action="#{clientController.modifClient()}" value="Modifier" ajax="false"/&gt;
              &lt;/h:form&gt;
          &lt;/ui:define&gt;
  
      &lt;/ui:composition&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>
  
  <p>my problem is that the first time the user click on checkbox the value is not changing and the onChangeCheckBox() is not wroking. Starting with the second time, it works fine. 
  NB: I don't want to do it in javascript because I have other treatments done according to boolean checkbox.</p>
  
  <p>here is my controller:</p>
  
  <pre><code>public void onChangeCheckBox () {
      System.out.println("modifierImage="+modifierImage);
  }
  
   /**
   * @return the modifierImage
   */
  public boolean isModifierImage() {
     return modifierImage;
  }
  
  /**
   * @param modifierImage the modifierImage to set
   */
  public void setModifierImage(boolean modifierImage) {
      this.modifierImage = modifierImage;
  }
  </code></pre>
  
  <p>with the solution of balusC is better (it does not give a chcked checkButton when it is clicked on the first time) but the problem still exists !</p>