title: primefaces 3.2 datatable incell editing not working
body: <p>I have a datatable with incell editing which displays the records correctly but when I try to edit a row, the change is not reflected. Following is the xhtml code:</p>
  
  <pre><code> &lt;p:cellEditor&gt;
              &lt;f:facet name="output"&gt;
                  &lt;h:outputText value="#{scrip.companyName}"/&gt; 
              &lt;/f:facet&gt;
             &lt;f:facet name="input"&gt;
                 &lt;p:inputText value="#{scrip.companyName}"/&gt; 
              &lt;/f:facet&gt;
              &lt;/p:cellEditor&gt;
          &lt;/p:column&gt;
              &lt;p:column headerText="Exchange"&gt;
              &lt;p:cellEditor&gt;
              &lt;f:facet name="output"&gt;
                &lt;h:outputText value="#{scrip.exchange}"/&gt; 
              &lt;/f:facet&gt;
                  &lt;f:facet name="input"&gt;
              &lt;p:selectOneMenu style="width: 150px" value="#{manageScrip.exchange}"&gt;
                  &lt;f:selectItem itemLabel="nse" itemValue="nse"/&gt;
                  &lt;f:selectItem itemLabel="bse" itemValue="bse"/&gt;                        
              &lt;/p:selectOneMenu&gt;
                      &lt;/f:facet&gt;
         &lt;/p:cellEditor&gt;
          &lt;/p:column&gt;
              &lt;p:column headerText="Brokerage Charge"&gt;
              &lt;p:cellEditor&gt;
              &lt;f:facet name="output"&gt;
             &lt;h:outputText value="#{scrip.brokerageCharge}"/&gt; 
              &lt;/f:facet&gt;
             &lt;f:facet name="input"&gt;
             &lt;p:inputText value="#{scrip.brokerageCharge}"/&gt; 
              &lt;/f:facet&gt;
         &lt;/p:cellEditor&gt;
          &lt;/p:column&gt;
  
              &lt;p:column headerText="Options"&gt;
                  &lt;p:rowEditor/&gt;
  
          &lt;/p:column&gt;
  
      &lt;/p:dataTable&gt;
  
      &lt;/h:form&gt;
  &lt;/h:body&gt;
  </code></pre>
  
  <p>
  Following is the managed bean function:</p>
  
  <pre><code>public void updateScrip()
  {
      try{
          Integer i=(Integer)dt.getRowKey();
          String str=i.toString();
          sc=(ScripMaster) dt.getRowData(str);
  
          scripSymbol=sc.getScripSymbol();
          exchange=sc.getExchange();
          companyName=sc.getCompanyName();
  
  
          updateScrip(i, scripSymbol, companyName, exchange,);
  
        }catch(Exception ex){
  
          }
  }
  </code></pre>
  
  <p>Alternatively I also tried:</p>
  
  <pre><code>public void updateScrip(RowEditEvent e)
  {
      try{
          sc=(ScripMaster) e.getObject();
          scripSymbol=sc.getScripSymbol();
          exchange=sc.getExchange();
          companyName=sc.getCompanyName();
          Integer i=sc.getScripID();
          updateScrip(i, scripSymbol, companyName, exchange);
          }catch(Exception ex){
          }
  }
  </code></pre>
  
  <hr>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8' ?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html" 
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:p="http://primefaces.org/ui"&gt;
  &lt;h:head&gt;
      &lt;title&gt;Facelet Title&lt;/title&gt;
  &lt;/h:head&gt;
  &lt;h:body&gt; 
      &lt;h:form id="frm"&gt;
          &lt;p:commandLink action="/adminpages/addScrip" value="add scrip" ajax="false"/&gt;
          &lt;p:dataTable editable="true" var="scrip" value="#{manageScrip.scripList}" binding="#{manageScrip.dt}" rowKey="#{scrip.scripID}" id="dt"&gt;
              &lt;p:ajax event="rowEdit" listener="#{manageScrip.updateScrip}" update="@this"/&gt;
              &lt;p:column headerText="Scrip Symbol"&gt;
                  &lt;p:cellEditor&gt;
                      &lt;f:facet name="output"&gt;
                          &lt;h:outputText value="#{scrip.scripSymbol}"/&gt;
                      &lt;/f:facet&gt;
                      &lt;f:facet name="input"&gt;
                          &lt;p:inputText value="#{scrip.scripSymbol}"/&gt;
                      &lt;/f:facet&gt;
                  &lt;/p:cellEditor&gt;
              &lt;/p:column&gt;
  
              &lt;p:column headerText="Company Name"&gt;
                  &lt;p:cellEditor&gt;
                      &lt;f:facet name="output"&gt;
                          &lt;h:outputText value="#{scrip.companyName}"/&gt; 
                      &lt;/f:facet&gt;
                      &lt;f:facet name="input"&gt;
                          &lt;p:inputText value="#{scrip.companyName}"/&gt; 
                      &lt;/f:facet&gt;
                  &lt;/p:cellEditor&gt;
              &lt;/p:column&gt;
              &lt;p:column headerText="Exchange"&gt;
                  &lt;p:cellEditor&gt;
                     &lt;f:facet name="output"&gt;
                        &lt;h:outputText value="#{scrip.exchange}"/&gt; 
                     &lt;/f:facet&gt;
                     &lt;f:facet name="input"&gt;
                         &lt;p:selectOneMenu style="width: 150px" value="#{manageScrip.exchange}"&gt;
                             &lt;f:selectItem itemLabel="nse" itemValue="nse"/&gt;
                            &lt;f:selectItem itemLabel="bse" itemValue="bse"/&gt;                        
                         &lt;/p:selectOneMenu&gt;
                     &lt;/f:facet&gt;
                  &lt;/p:cellEditor&gt;
              &lt;/p:column&gt;
              &lt;p:column headerText="Brokerage Charge"&gt;
                 &lt;p:cellEditor&gt;
                     &lt;f:facet name="output"&gt;
                         &lt;h:outputText value="#{scrip.brokerageCharge}"/&gt; 
                     &lt;/f:facet&gt;
                     &lt;f:facet name="input"&gt;
                         &lt;p:inputText value="#{scrip.brokerageCharge}"/&gt; 
                     &lt;/f:facet&gt;
                 &lt;/p:cellEditor&gt;
              &lt;/p:column&gt;
  
              &lt;p:column headerText="Options"&gt;
                  &lt;p:rowEditor/&gt;
              &lt;/p:column&gt;
          &lt;/p:dataTable&gt;
      &lt;/h:form&gt;
  &lt;/h:body&gt;
  </code></pre>
  
  <p></p>