title: Selected row is null using different forms
body: <p>I am getting a null selected row when I press the showDialog command button</p>
  
  <p>I can't see what is my problem</p>
  
  <p><strong>This is my first form:</strong></p>
  
  <pre><code>&lt;h:form id="firstForm"&gt;
      &lt;p:commandButton action="#{testBB.showDialog}" id="showDialog"
          update=":secondForm" value="#{msg['show.dialog']}" /&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p><strong>This is my second form:</strong></p>
  
  <pre><code>&lt;h:form id="secondForm"&gt;
      &lt;p:dataTable id="testDatatable"
          rendered="#{not empty testBB.list}" 
          rowKey="#{order.orderNumber}"
          selection="#{testBB.selectedRow}"
          selectionMode="single"
          sortBy="customerName" value="#{testBB.list}" var="order"&gt;
          &lt;p:column headerText="#{msg['order.number']}"&gt;
              &lt;h:outputText value="#{order.orderNumber}" /&gt;
          &lt;/p:column&gt;
          &lt;p:column headerText="#{msg['total.value']}"&gt;
              &lt;h:outputText value="#{order.totalValue}" /&gt;
          &lt;/p:column&gt;
      &lt;/p:dataTable&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p><strong>My backing bean:</strong></p>
  
  <pre><code>@ManagedBean
  @ViewScoped
  public class TestBB implements Serializable {
      private List&lt;Order&gt; list;
      private Order selectedRow;
  
      public void showOrder() {
          try {
              System.out.println(selectedRow);
          } catch (Exception exception) {
          }
      }
  }
  </code></pre>
  
  <p><strong>And my DTO:</strong></p>
  
  <pre><code>public class Order implements Serializable {
      private int orderNumber;
      private double totalValue;
  
      public void showOrder() {
          try {
              System.out.println(selectedRow);
          } catch (Exception exception) {
          }
      }
  
      /** Getters and setters */
  }
  </code></pre>
  
  <p>What is wrong in my code?</p>