title: Set value of selectBooleanCheckbox on page refresh
body: <p>On page I have checkbox which enables/disables h:inputText and h:selectOneMenu.  That works fine until I refresh the page. Value of checkbox is probably cached by browser. </p>
  
  <p>So, when the checkbox was set on "true" after refresh both controls are enabled. selectOneMenu is rendered corresponding to value set in init() method, but selectBooleanCheckbox and inputText isn't. How can I fix that? I use Firefox browser.</p>
  
  <p>Backing bean is simple, one property and one method - init in which value is set to false.</p>
  
  <pre><code>@ManagedBean(name="newBean")
  @ViewScoped
  public class NewBean implements Serializable {
      private boolean booleanValue;  
  
      public NewBean() {
  
      }   
  
      public void init()
      {
          booleanValue = true;
      }   
  
      public boolean isBooleanValue() {
          return booleanValue;
      }
  
      public void setBooleanValue(boolean booleanValue) {
          this.booleanValue = booleanValue;
      }
  }
  </code></pre>
  
  <p>Page source:</p>
  
  <pre><code>&lt;h:body&gt;
      &lt;f:metadata&gt;
          &lt;f:viewAction action="#{newBean.init()}"&gt;&lt;/f:viewAction&gt;
      &lt;/f:metadata&gt;
  
      &lt;h:form&gt;
          &lt;h:outputText value="#{newBean.booleanValue}"&gt;&lt;/h:outputText&gt;
          &lt;br/&gt;
          &lt;h:selectBooleanCheckbox value="#{newBean.booleanValue}" id="selected"&gt;
              &lt;f:ajax event="change"
                      render="enabledInput disabledInput enabledMenu"&gt;&lt;/f:ajax&gt;
          &lt;/h:selectBooleanCheckbox&gt;
          &lt;br/&gt;
          &lt;h:inputText disabled="#{newBean.booleanValue}" id="enabledInput"&gt;&lt;/h:inputText&gt;&lt;br/&gt;
          &lt;h:selectOneMenu disabled="#{!newBean.booleanValue}" id="enabledMenu"&gt;
              &lt;f:ajax&gt;&lt;/f:ajax&gt;
          &lt;/h:selectOneMenu&gt;
      &lt;/h:form&gt;
  &lt;/h:body&gt;
  </code></pre>
  
  <p>EDIT: Added some screenshots so it will be easier to understand the problem.</p>
  
  <p>Correct: Page opened by user (checkbox is checked, and it corresponds to bean value, textbox is disabled, menu is enabled):</p>
  
  <p><img src="https://i.imgur.com/uAKZ41C.png" alt="First Image"></p>
  
  <p>Correct: User unchecked checkbox (checkbox is unchecked, value on bean is false too, textbox is enabled, menu is disabled):</p>
  
  <p><img src="https://i.imgur.com/OUuBoCc.png" alt="Second Image"></p>
  
  <p>ISSUE: after unchecking user refreshed page. Value on bean is true, but checkbox is still unchecked. Also, textbox and menu are BOTH enabled. </p>
  
  <p><img src="https://i.imgur.com/hJc7PoK.png" alt="Third Image"></p>