title: primefaces rowediting datatable ejb update returns old data
body: <p>Salut :), iam a newbie in primefaces and ajax</p>
  
  <p>Iam using primefaces 3.4, glassfish 3.1, jsf2.0 and ejb 3. I tried to implement primefaces showcase datatable rowediting. But when i validate the updated value into the datatable, i get the old value. This is my code :</p>
  
  <pre><code>&lt;h:form id="form"&gt;
  &lt;p:growl id="messages" showDetail="true"/&gt;
  &lt;p:dataTable var="item" value="#{jSFMBean.allContacts}" id="contactList" editable="true"&gt;
      &lt;p:ajax event="rowEdit" listener="#{jSFMBean.onEdit}" update="@this :form:messages" /&gt;
      &lt;p:ajax event="rowEditCancel" listener="#{jSFMBean.onCancel}" update=":form:messages" /&gt;
          &lt;p:column headerText="EMAIL" style="width:125px"&gt;
                      &lt;p:cellEditor&gt;
                          &lt;f:facet name="output"&gt;
                              &lt;h:outputText value="#{item.email}" /&gt;
                          &lt;/f:facet&gt;
                          &lt;f:facet name="input"&gt;
                              &lt;p:inputText value="#{item.email}" label="EMAIL"/&gt;
                          &lt;/f:facet&gt;
                      &lt;/p:cellEditor&gt;
                  &lt;/p:column&gt;&lt;p:column headerText="Options" style="width:50px"&gt; 
                      &lt;p:rowEditor /&gt;
                  &lt;/p:column&gt;
       &lt;/p:dataTable&gt;
  &lt;h:outputText value="#{jSFMBean.selectedContact.displayname}" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>the methods are :</p>
  
  <pre><code>  public void onEdit(RowEditEvent event) {
      this.session.updateContact((Contacts) event.getObject());
      FacesMessage msg = new FacesMessage("Edition contact: ", ((Contacts) event.getObject()).getDisplayname());
  
      FacesContext.getCurrentInstance().addMessage(null, msg);
  }
  </code></pre>
  
  <p><strong>(Contacts) event.getObject()</strong> always get the old value :(. It's like the getter of the datatable fireup first before ajax update to the database.</p>
  
  <p>what iam i doing wrong ? thank you for your help solving this .</p>