title: JSF p:calendar in p:dataTable: How to get the row of p:ajax dateSelect event
body: <p>In my setup I have a <code>@Named</code> Bean, the class <code>ObWithDate</code> is a <code>@Entity</code> with a date field <em>validFrom</em>. Objects of this class are in a <code>List&lt;ObWithDate&gt;</code> of the bean. I want to update the <code>ObWithDate</code> immediately if a user changes a date. The <code>p:dataTable</code> thus is showing several <code>p:calendar</code> components:</p>
  
  <p><img src="https://i.stack.imgur.com/eBTMw.png" alt="enter image description here"></p>
  
  <pre><code>&lt;h:form id="fUser"&gt;
  &lt;p:dataTable id="dt" var="i" value="#{myBean.list}"&gt;
    &lt;p:column&gt;
      &lt;p:calendar id="cValidFrom" value="#{i.validFrom}"&gt;  
        &lt;p:ajax event="dateSelect" listener="#{myBean.up}" update=":fUser:dt"/&gt;  
      &lt;/p:calendar&gt;                
    &lt;/p:column&gt;
  &lt;/p:dataTable&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>The code of the bean:</p>
  
  <pre><code>public void up(DateSelectEvent event)
  {
    logger.info("DateSelectEvent "+event.getDate());
    // How to get the corresponding ObWithDate?
  }
  </code></pre>
  
  <p>This is a subsequent question of <a href="https://stackoverflow.com/questions/10175371">Primefaces p:calendar with p:ajax value not updated (one step delay)</a> but now targeting the concrete issue: <em>How to get the corresponding list item in the ajax call inside the beans method?</em></p>