title: How to update a datalist in a form?
body: <p>I'm trying to update a <code>p:datalist</code> after user enters some informations to pop up. But i cant update partially my form.</p>
  
  <p>Here is my .xhtml</p>
  
  <pre><code>&lt;h:body&gt;
      &lt;center&gt;
      &lt;h:form style="width:500px"&gt;
          &lt;p:tabView&gt;
              &lt;p:tab title="Profil"&gt;
                  &lt;p:panel&gt;
                  &lt;h:panelGrid columns="2"&gt;   
                      &lt;p:dataList id="ortaklar" value="#{ortakController.ortakList}" var="ortak" type="ordered"&gt;  
                          #{ortak.isim}, #{ortak.soyad}  
                      &lt;/p:dataList&gt; 
                  &lt;/h:panelGrid&gt;
                  &lt;/p:panel&gt;
              &lt;/p:tab&gt;
              &lt;p:tab title="Detay"&gt;&lt;/p:tab&gt;
              &lt;p:tab title="Kayıt"&gt;&lt;/p:tab&gt;
          &lt;/p:tabView&gt;
      &lt;/h:form&gt;
      &lt;p:dialog header="Yeni Ortak" widgetVar="ortakDlg"&gt;  
          &lt;h:form&gt;
              &lt;h:panelGrid columns="2"&gt;
                  &lt;h:outputText for="ortakIsim" value="İsim:" /&gt;  
                  &lt;h:inputText id="ortakIsim" value="#{ortakController.person.isim}" /&gt;  
  
                  &lt;h:outputText for="ortakSoyad" value="Soyad:" /&gt;  
                  &lt;h:inputText id="ortakSoyad" value="#{ortakController.person.soyad}" /&gt;  
              &lt;/h:panelGrid&gt;
              &lt;p:commandButton value="Ekle" actionListener="#{ortakController.addToList}" update="ortaklar""/&gt;
              &lt;p:commandButton id="sil" value="Sil" type="reset" /&gt;
          &lt;/h:form&gt;
      &lt;/p:dialog&gt;
      &lt;/center&gt;
  &lt;/h:body&gt;
  </code></pre>
  
  <p>Here is my bean;</p>
  
  <pre><code>@ManagedBean(name = "ortakController")
  public class OrtakController {
  
      private static List&lt;Person&gt; ortakList = new ArrayList&lt;Person&gt;();
      private Person person = new Person();
  
      public OrtakController() {
      }
  
      public void addToList(ActionEvent actionEvent) {
          ortakList.add(person);
      }
  
      public List&lt;Person&gt; getOrtakList() {
          return ortakList;
      }
  
      public void setPerson(Person currentKisi) {
          this.person = currentKisi;
      }
  
      public Person getPerson() {
          return person;
      }
  }
  </code></pre>
  
  <p>Basically i added an item to pop up also i want to add this item to datalist in my form. </p>
  
  <p>Any advice?</p>