title: onRowSelect of radiobutton in Primefaces datatable
body: <p>I have a datatable using JSF2.0 where I have rows displayed with radiobutton</p>
  
  <pre><code>&lt;p:dataTable id="dataTable" var="emp" lazy="true" value="#{req.lazyModel}"
              paginator="true" rows="10" 
              paginatorTemplate="{CurrentPageReport}  
                      {FirstPageLink} {PreviousPageLink} 
             {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
         rowsPerPageTemplate="5,10" 
             selection="#{req.selectedEmp}"
              rowKey="#{req.empNo}" 
         rowSelectListener="#{req.onRowSelect}"&gt;
  
  
   &lt;p:column selectionMode="single" style="width:18px" /&gt;
  </code></pre>
  
  <p>and in Bean I have</p>
  
  <pre><code>public void onRowSelect(SelectEvent event) { 
         System.out.println("row "+((Request) event.getObject()).getEmpNo());  
  
      } 
  </code></pre>
  
  <p>However <code>onRowSelect</code> method is not getting invoked. What could be the reason for this?</p>
  
  <p>My idea of radiobutton is when user clicks radiobutton, I would like to display a datatable below the master datatable with details of selected row.</p>
  
  <p>Any help is highly appreciated.</p>
  
  <p>Update 1</p>
  
  <pre><code>&lt;p:dataTable id="dataTable" var="emp" lazy="true" value="#{req.lazyModel}"
              paginator="true" rows="10" 
              paginatorTemplate="{CurrentPageReport}  
                      {FirstPageLink} {PreviousPageLink} 
             {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
         rowsPerPageTemplate="5,10" 
             selection="#{req.selectedEmp}"&gt;
  
  
   &lt;p:column selectionMode="single" style="width:18px" /&gt;
   &lt;p:ajax event="rowSelect" listener="#{reqMB.onRowSelect}" /&gt;  
  </code></pre>