title: Value of <h:selectBooleanCheckbox> is not updated according to backing bean value
body: <p>I'm using JSF2 and Tomcat server. I programmed a simple example in which:</p>
  
  <ul>
  <li>User Selects a faculty from "h:selectOneMenu"</li>
  <li>Upon selection, the value of "h:inputText" is changed to "odd" or "even" based on facultyNo</li>
  <li>Also, upon selection, the value of "h:selectBooleanCheckBox" is changed to "checked" if facultyNo is even and "not checked" if facultyNo is odd </li>
  </ul>
  
  <p>Everything works fine for "h:inputText". On the other hand, the value of "h:selectBooleanCheckBox" does not change. Why is this happening?</p>
  
  <p>By the way, the use of boolean value inside a HashMap is <strong><em>intentional</em></strong> because the project I'm working on has lots of boolean values in a HashMap. So, replacing the Hashmap with a simple boolean property and using a getter and a setter for it is definitely not a solution for my case.</p>
  
  <p>The code for the xhtml page is below:</p>
  
  <pre><code>&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:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"&gt;
       &lt;head&gt;       
          &lt;title&gt;Dummy Title&lt;/title&gt;        
       &lt;/head&gt;    
       &lt;body&gt;
          &lt;h:form&gt;
              &lt;label for="faculty"&gt;Faculty&lt;/label&gt;
              &lt;h:selectOneMenu id="faculty" value="#{test.selectedFaculty}" converter="faccon" valueChangeListener="#{test.facultyChange}" onchange="submit()"&gt;
                  &lt;f:selectItems value="#{start.app.faculties}"/&gt;                      
              &lt;/h:selectOneMenu&gt;                                  
              &lt;h:selectBooleanCheckbox id="mycheck" value="#{test.x.get(0)}"&gt;&lt;/h:selectBooleanCheckbox&gt;
              &lt;h:outputText value="#{test.res}"&gt;&lt;/h:outputText&gt;
              &lt;h:commandButton value="Save" action="#{test.saveChoices}" /&gt;
          &lt;/h:form&gt;           
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The code for the backing bean is below</p>
  
  <pre><code>import java.io.Serializable;
  import java.util.HashMap;
  import javax.annotation.PostConstruct;
  import javax.faces.bean.ManagedBean;
  import javax.faces.bean.RequestScoped;
  import javax.faces.event.ValueChangeEvent;
  import com.myWork.Application;
  import com.myWork.Faculty;
  
  @ManagedBean(name="test")
  @RequestScoped
  public class TestBean implements Serializable
  {
      private HashMap&lt;Integer,Boolean&gt; x;
      private String res;
      private Faculty selectedFaculty;
  
      @PostConstruct
      public void init(){
          Application app = Application.getInstance();
          selectedFaculty = app.getFaculties()[0];
          x = new HashMap&lt;Integer, Boolean&gt;();
          if (selectedFaculty.getFacultyNo()%2==0)
          {
              x.put(0, true);
              res = "even";
          }
          else
          {
              x.put(0, false);
              res = "odd";
          }
      }
  
      public HashMap&lt;Integer,Boolean&gt; getX() {
          return x;
      }
  
  
      public void setX(HashMap&lt;Integer,Boolean&gt; x) {
          this.x = x;
      }
  
      public Faculty getSelectedFaculty() {
          return selectedFaculty;
      }
  
      public void setSelectedFaculty(Faculty selectedFaculty) {
          this.selectedFaculty = selectedFaculty;
      }   
  
      public String getRes() {
          return res;
      }
  
      public void setRes(String res) {
          this.res = res;
      }
  
      public void facultyChange(ValueChangeEvent e){
          Faculty fac = (Faculty) e.getNewValue();
          if (fac.getFacultyNo()%2==0)
          {           
              x.put(0, true);
              res = "even";
          }
          else
          {
              x.put(0, false);
              res = "odd";
          }
      }   
  
      public String saveChoices(){        
          return "test";
      }
  }
  </code></pre>
  
  <p>Any help is greatly appreciated.</p>