title: Primefaces Datatable and InputText element to create dynamic form
body: <p>I ve a question about using inputText element in primefaces datatable.</p>
  
  <p>Xhtml is like below</p>
  
  <pre><code>&lt;h:form &gt;
                   &lt;h:panelGrid columns="2"&gt;
                      &lt;p:commandButton action="#{offerController.addNewOfferRow}" update="panel1" id="iconOnly1"  
             icon="ui-icon-circle-plus" value="Yeni Satır" title="Icon Add"  style="width:220px;" /&gt; 
  
  
                   &lt;/h:panelGrid&gt;
                  &lt;p:dataTable id="panel1" var="offer" value="#{offerController.offerIds}"  style="align: center;"&gt;
                      &lt;p:column id="modelHeader"  style=" margin-left: auto; margin-right: auto; width:70%;" &gt;
                          &lt;f:facet name="header"&gt;
                              Eklenecek Offerlar
                          &lt;/f:facet&gt;
  
                          &lt;p:inputText id="addOfferId" value="#{offer}"   style=" margin-left: auto; margin-right: auto; width:70%;"  /&gt;
  
                      &lt;/p:column&gt;
  
  
                  &lt;/p:dataTable&gt;
  </code></pre>
  
  <p></p>
  
  <p>And my java bean is like below:</p>
  
  <pre><code>@ManagedBean
  @ViewScoped
  
  
  public class OfferController implements Serializable{
  
      /**
       * 
       */
  
      private static final long serialVersionUID = -1552493989687233258L;
      private static final int defaultNumberOfRows = 6;
      private List&lt;String&gt; offerIds = new LinkedList&lt;String&gt;();
  
  
      public OfferController() {
           super();
      for(int i=0;i&lt;defaultNumberOfRows;i++){
          offerIds.add("");
           }
  
      }
  
      public void addOffers(){
           // do some op.
      }
  
      public void addNewOfferRow(){
           offerIds.add("");
      }
  
      public getOfferIds(){
           return offerIds;
      }
  
      public setOfferIds(List&lt;String&gt; offerIds){
            this.offerIds = offerIds;
      }
  
  
  }
  </code></pre>
  
  <p>When using codes above.I want to display a list of string items in inputText elements which is in datatable.</p>
  
  <p>And addNewOfferRow operation add new element to List and datatable is updated client side.</p>
  
  <p>However after submitting the form all inputText elements does not store the values entered by user.</p>
  
  <p>How can i use these datatable end inputText element to create dynamic rows form.</p>
  
  <p>Thanks.</p>