title: How to set Boolean value to an 'Yes' or 'No' h:selectOneRadio
body: <p>I have the following code in JSF-2 Mojarra 2.0.8 running on Tomcat 7</p>
  
  <pre><code>&lt;h:panelGrid  id="yesNoRadioGrid"&gt;
  &lt;h:panelGrid columns="2" rendered="#{user.yesNoRadioGridFlag}"&gt;
      &lt;h:outputText id ="otherLbl" value="Select Yes or No"&gt;&lt;/h:outputText&gt;
      &lt;h:selectOneRadio id="yesNoRadio" value ="#{user.yesNoRadio}"&gt;
          &lt;f:selectItems value="#{user.choices}"/&gt;                    
          &lt;f:ajax execute="@form" render="userDetailsGrid "&gt;&lt;/f:ajax&gt;
      &lt;/h:selectOneRadio&gt;
  &lt;/h:panelGrid&gt;
  &lt;/h:panelGrid&gt;      
  &lt;h:message for ="yesNoRadio"&gt; &lt;/h:message&gt;
  &lt;h:panelGrid  id="userDetailsGrid"&gt;
  &lt;h:panelGrid columns="2" rendered="#{user.yesNoRadio}"&gt;
      &lt;h:outputLabel&gt;Name :&lt;/h:outputLabel&gt;
      &lt;h:inputText id="customerName" value="#{user.customerName}"&gt;&lt;/h:inputText&gt;
      &lt;h:outputLabel&gt;Salary: &lt;/h:outputLabel&gt;
      &lt;h:inputText id="customerSalary" value="#{user.customerSalary}"&gt;&lt;/h:inputText&gt;
  &lt;/h:panelGrid&gt;
  &lt;/h:panelGrid&gt;
  </code></pre>
  
  <p>My managedBean contain following </p>
  
  <pre><code>private enum Choice {
  
      Yes, No; 
      } 
  private Choice yesNoRadio;
  public Choice[] getChoices() {
      return Choice.values(); 
      }
  public Choice getYesNoRadio() {
      return yesNoRadio;
  }
  public void setYesNoRadio(Choice yesNoRadio) {
      this.yesNoRadio = yesNoRadio;
  }
  </code></pre>
  
  <p>How can I render my 'userDetailsGrid' based on the boolean value (user.yesNoRadio) selected in </p>
  
  <p>I found a workarround by adding following in my mangedbean</p>
  
  <pre><code>private Boolean yesNoRadio;
  public SelectItem[] getMyBooleanValues() {   
      return new SelectItem[] {    
      new SelectItem(Boolean.TRUE, "Yes"),   
      new SelectItem(Boolean.FALSE, "No")    
      };   
  }  
  </code></pre>
  
  <p>and changing my view to </p>
  
  <pre><code>&lt;h:selectOneRadio id="yesNoRadio" value ="#{user.yesNoRadio}"&gt;
      &lt;f:selectItems value="#{user.myBooleanValues}" /&gt;                   
      &lt;f:ajax execute="@form" render="userDetailsGrid "&gt;&lt;/f:ajax&gt;
  &lt;/h:selectOneRadio&gt;
  </code></pre>