title: How to clear all input fields in p:dataTable?
body: <p>I am using JSF 2.0 with PrimeFaces. I have a <code>&lt;p:dataTable&gt;</code>. I have a <code>&lt;p:inputText&gt;</code> in a column. I can edit and save it. I have also a reset button, but it is not working. </p>
  
  <pre><code>&lt;h:form id="f"&gt;
      &lt;f:facet name="head"&gt;Enteri Karbon Hesaplaması&lt;/f:facet&gt;
      &lt;p:dataTable value="#{orderBean.orderList}" var="o" id="bir"&gt;
          &lt;p:column&gt;
              &lt;f:facet name="header"&gt;Hayvan Adi&lt;/f:facet&gt;
              &lt;h:outputText value="#{o.hayvanadi}"/&gt;
          &lt;/p:column&gt;
          &lt;p:column&gt;
              &lt;f:facet name="header"&gt;Karbon Salinimi Değeri&lt;/f:facet&gt;
              &lt;h:outputText value="#{o.karbonsalinimi}"/&gt;
          &lt;/p:column&gt;
          &lt;p:column&gt;
              &lt;f:facet name="header"&gt;Adet&lt;/f:facet&gt;
              &lt;p:inputText id="spinner"  maxlength="12" value="#{o.adet}"/&gt;
          &lt;/p:column&gt;
      &lt;/p:dataTable&gt;
      &lt;p:commandButton value="Kaydet"  action="#{orderBean.saveAction()}" update="bir"/&gt;
      &lt;p:commandButton value="Temizle"  update="bir" process="@this" actionListener="#{orderBean.reset}"/&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>Here is the relevant part of my backing bean:</p>
  
  <pre><code>@ManagedBean
  @SessionScoped
  public class OrderBean {
      private static final ArrayList&lt;Order&gt; orderList = 
          new ArrayList&lt;Order&gt;(Arrays.asList(
              new Order("Süt İneği", 99 , 0),             
              new Order("Diğer İnekler", 58, 0),      
              new Order("Koyun",5, 0),
              new Order("Keçi",5, 0),     
              new Order("At ",18, 0),     
              new Order("Eşek ",10, 0)                
          )
      );
  
      public String saveAction() {
          for (Order order : orderList){
              order.setEditable(false);
          }
  
          return null;
      }
  
      public String editAction(Order order) {
          order.setEditable(true);
          return null;
      }
  
      public void reset() {  
          RequestContext.getCurrentInstance().reset("form:f");  
      }  
  
      // ...
  }
  </code></pre>