title: Primefaces issue - need to keep the row expanded after an ajax update, but it keeps collapsing
body: <p>I have a problem with JSF. I try to keep the row expansion open after an update, but it keeps collapsing. </p>
  
  <p>I want to change the panel content in the expanded row and reply button is pressed and also keep the row in the <code>dataTable</code> expanded.</p>
  
  <p>If I can resolve this issue it will be nice. I also used <code>partiallySubmit</code> property to update only some components with ajax, not all. </p>
  
  <p>I provide the code here:</p>
  
  <pre><code>    &lt;p:dataTable id="topicDataTable" value="#{index.topics}" var="topic"
          rowIndexVar="row" rowKey="#{topic.id}" style="border:none;"
          onExpandStart="getExpandedRow()"&gt;
          &lt;!--    expandedRow="#{true}" --&gt;
          &lt;p:column style="border-style:none;"&gt;
              &lt;p style="padding-left: 50px; font-size: 8px;"&gt;
                  &lt;br /&gt;
              &lt;/p&gt;
              &lt;p style="font-size: 18px;"&gt;#{topic.title}&lt;/p&gt;
              &lt;p style="font-size: 8px;"&gt;#{topic.displayedCreatedOn}&lt;/p&gt;
          &lt;/p:column&gt;
  
          &lt;p:column style="width:2%; border-style:none;"&gt;
              &lt;p:rowToggler /&gt;
          &lt;/p:column&gt;
  
          &lt;p:rowExpansion style="border:none;"&gt;
  
              &lt;p style="font-size: 16px;"&gt;
                  &lt;br /&gt;
              &lt;/p&gt;
  
              &lt;div style="padding-left: 30px;"&gt;
                  &lt;h:form id="replyForm" style="width:100%"&gt;
                      &lt;p:panel id="repeatPanel"&gt;
                          &lt;p:scrollPanel id="scrollPanel"
                              style="padding-left:50px;max-height:300px; overflow-y: auto;"
                              mode="native"&gt;
  
  
                              &lt;p:repeat id="repeatComponent" value="#{topic.messages}"
                                  var="reply"&gt;
  
                                  &lt;!-- rowIndexVar="row" --&gt;
                                  &lt;div style="padding-left: 30px; font-size: 14px;"&gt;
                                      &lt;p style="font-size: 14px; color: black;"&gt;#{reply.createdBy}&lt;/p&gt;
                                      &lt;p style="font-size: 8px; line-height: 12px"&gt;
  
                                          #{reply.displayedCreatedOn}&lt;/p&gt;
  
                                      &lt;p style="font-size: 4px;"&gt;
                                          &lt;br /&gt;
                                      &lt;/p&gt;
                                      &lt;p
                                          style="color: rgba(0, 0, 0, .5); white-space: pre-wrap; font-size: 14px;"&gt;#{reply.text}&lt;/p&gt;
                                  &lt;/div&gt;
  
                                  &lt;p style="padding-left: 50px; font-size: 16px;"&gt;
                                      &lt;br /&gt;
                                  &lt;/p&gt;
  
                              &lt;/p:repeat&gt;
  
  
                          &lt;/p:scrollPanel&gt;
  
  
  
                          &lt;!--    &lt;h:form id="replyForm" style="width:100%"&gt; --&gt;
                          &lt;p&gt;
                              &lt;p:inputTextarea id="replyArea" binding="#{replyInput}"
                                  required="true" requiredMessage="The reply should not be empty"
                                  style="vertical-align: middle; width:99.3%; " /&gt;
                          &lt;/p&gt;
                          &lt;p&gt;
                              &lt;p:message for="replyArea" style="color:red; font-size: 14px; " /&gt;
                          &lt;/p&gt;
                          &lt;p style="font-size: 8px;"&gt;
                              &lt;br /&gt;
                          &lt;/p&gt;
                          &lt;p&gt;
                              &lt;p:commandButton value="Reply"
                                  style="font-size: 12px; float:right; vertical-align:right;"
                                  partialSubmit="true" actionListener="#{index.updateMessages}"
                                  process="@form" update="replyForm:repeatPanel"
                                  onstart="saveScrollPos()" oncomplete="getScrollPos()"&gt;
                                  &lt;!--     process="@form topicaDataTable:#{row}:repeatPanel"" --&gt;
                                  &lt;f:attribute name="rowId" value="#{row}" /&gt;
  
                              &lt;/p:commandButton&gt;
  
                          &lt;/p&gt;
                          &lt;p style="padding-left: 50px; font-size: 8px;"&gt;
                              &lt;br /&gt;
                          &lt;/p&gt;
                          &lt;!--    &lt;/h:form&gt; --&gt;
  
                      &lt;/p:panel&gt;
                  &lt;/h:form&gt;
  
              &lt;/div&gt;
  
              &lt;p style="padding-left: 50px; font-size: 16px;"&gt;
                  &lt;br /&gt;
              &lt;/p&gt;
  
          &lt;/p:rowExpansion&gt;
      &lt;/p:dataTable&gt;
  </code></pre>