title: Rendering <p:outputPanel> based on selected <h:selectOneRadio > option in JSF
body: <p>I have two panels:</p>
  
  <pre><code>&lt;p:outputPanel id="contentDisplay"&gt;
  &lt;p:outputPanel id="dashboarddisplay"&gt;
  </code></pre>
  
  <p>I need to render either one of the <code>&lt;p:outputPanel&gt;</code> above by selecting the <code>&lt;h:selectOneRadio&gt;</code> button.</p>
  
  <p>Here is the code that I have for <code>&lt;h:selectOneRadio&gt;</code>:</p>
  
  <pre><code>&lt;h:selectOneRadio id="choice" style="width:100%"
                    value="#{Bean.selectedChoice}"&gt;
      &lt;f:selectItem id="item1" itemLabel="Hours Allocation"   itemValue="1" /&gt;
      &lt;f:selectItem id="item2" itemLabel="DashBoard" itemValue="2" /&gt; 
      &lt;p:ajax render="contentDisplay dashboarddisplay " execute="@this"
              update="contentDisplay dashboarddisplay" listener="#{cmpmBean.onChoiceSelect}" /&gt;    
  &lt;/h:selectOneRadio&gt;
  </code></pre>
  
  <p><br/>
  How do I pass the selected value of the <code>&lt;f:selectItem&gt;</code> to the backing bean?</p>
  
  <p>Though the ajax event is triggered I could not able to get the value for the variable "onChoiceSelect" in the backing bean.</p>
  
  <p>Any suggestions will really helpful to resolve this  issue.</p>