title: Execute row click using listener on primefaces datatable
body: <p>Problem is short. I have created a <code>p:datatable</code> but within the <code>p:column</code> i actually have a <code>div</code> element. Unfortunately the datatable should have selectable rows and the div just won't cooperate ;).
  So the solution is to call it manually, on the div element there is onclick listener, but how should I call the rowSelection of the datatable? Is there some list of the functions of Primefaces' elements?</p>
  
  <p>the code:</p>
  
  <pre><code>&lt;p:dataTable var="user" value="#{rec.friends}" rowKey="#{user.id}" widgetVar="friendscrollist"
          rendered="#{not empty rec.friends}" scrollable="true" rowIndexVar="findex"
          scrollHeight="500" scrollWidth="220" selectionMode="single" selection="#{rec.chosenFriend}" styleClass="friendscroll"&gt;
                  &lt;p:column width="198" id="friend#{findex}"&gt;
      &lt;div class="friendlist" onclick="friendscrollist.clickRow(#{findex})" /&gt;
                  &lt;/p:column&gt;
                  &lt;p:ajax update=":leftform" event="rowSelect" /&gt;
                  &lt;p:ajax update=":leftform" event="rowUnselect" /&gt;
  &lt;/p:dataTable&gt;
  </code></pre>
  
  <p>Of course it is a simplified version, only things u need. So the question is what to call in the <strong><code>div onclick?</code></strong></p>