title: no selected rows from datatable show in datalist with primefaces
body: <p>if I select some rows in checkbox of datatable and press "view" button. it will be showed in a datalist. but there nothing in the datalist. it seemes that, the "selectedServers" have not store the selected rows from datatable.</p>
  
  <p>i need help! </p>
  
  <h2>list.xhtml</h2>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8' ?&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:fn="http://java.sun.com/jsp/jstl/functions"&gt;
  
      &lt;h:head&gt;
          &lt;link rel="stylesheet" media="screen" href="style/style.css" /&gt;
      &lt;/h:head&gt;
      &lt;h:body&gt;
      &lt;div id="container"&gt;
          &lt;div id="header"&gt;
              &lt;p:panel id="headerpanel"&gt;
              &lt;f:facet name="header"&gt;
                      &lt;h:outputText value="cloudMon"/&gt;
                  &lt;/f:facet&gt;
              &lt;/p:panel&gt;
          &lt;/div&gt;
  
          &lt;div id="mainnav"&gt;
              &lt;h:form&gt;
                  &lt;p:dataTable
                      var="gerate"
                      value="#{tableBean.server}"
                      paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" 
                      paginator="true"
                      rows="10"
                      rowsPerPageTemplate="5,10,15" 
                      emptyMessage="es gibt keine anpassende Elemente" 
                      selection="#{tableBean.selectedServers}"&gt;
  
                      &lt;f:facet name="header"&gt;
                          &lt;p:outputPanel&gt;
                              &lt;h:outputText value="suchen:" /&gt;
                              &lt;p:inputText id="globalFilter" onkeyup="carsTable.filter()" style="width: 100px" /&gt;
                          &lt;/p:outputPanel&gt;
                      &lt;/f:facet&gt;
  
                      &lt;p:column selectionMode="multiple" /&gt;
  
                      &lt;p:column sortBy="#{gerate.owner}"
                          headerText="gerate_owner" 
                          filterBy="#{gerate.owner}"
                          filterMatchMode="contains" &gt;
  
                          &lt;h:outputText value="#{gerate.owner}"/&gt;
                      &lt;/p:column&gt;
  
                      &lt;p:column sortBy="#{gerate.year}" 
                          headerText="gerate.year" 
                          filterBy="#{gerate.year}"
                          filterMatchMode="startsWith" &gt;
  
                          &lt;h:outputText value="#{gerate.year}"/&gt;
                      &lt;/p:column&gt;
  
  
                      &lt;f:facet name="footer"&gt;
                          &lt;p:commandButton value="view" 
                              update="displayMulti"
                              oncomplete="multiGeraeteDialog.show()"/&gt;
  
                          insgesamt #{fn:length(tableBean.server)} geraete
                      &lt;/f:facet&gt;
                  &lt;/p:dataTable&gt;
  
                  &lt;p:dialog header="geraete anzeigen" 
                      widgetVar="multiGeraeteDialog"
                      width="300" height="300" 
                      showEffect="explode" hideEffect="explode"&gt;
                              ajlkdjflasjl
                      &lt;p:dataList id="displayMulti"                                   
                          value="#{tableBean.selectedServers}"
                          var="select"&gt;
                                 aa: #{select.owner}
                      &lt;/p:dataList&gt;
  
                  &lt;/p:dialog&gt;
              &lt;/h:form&gt;
          &lt;/div&gt; 
  
          &lt;div id="menu"&gt;
              &lt;p:panel&gt;
                  &lt;h:outputText value="Menu" /&gt;
          &lt;/p:panel&gt;
          &lt;/div&gt;
  
          &lt;div id="contents"&gt;
              &lt;p:panel header="Hello World"&gt;
                  &lt;h:outputText value="Hello!" /&gt;
          &lt;/p:panel&gt;
          &lt;/div&gt;
  
          &lt;div id="footer"&gt;
              &lt;p:themeSwitcher initialText="Change Skin" buttonPreText="Skin: " /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;/h:body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <h2>TableBean.java</h2>
  
  <pre><code>package tud.cloudmon;
  
  import java.io.Serializable;
  import java.util.ArrayList;
  import java.util.List;
  import java.util.UUID;
  
  import javax.faces.bean.ManagedBean;
  import javax.faces.bean.RequestScoped;
  
  @ManagedBean(name = "tableBean")
  @RequestScoped
  public class TableBean implements Serializable {
  
      /**
       * 
       */
      private static final long serialVersionUID = 2160613756770646562L;
  
      private final static String[] colors;
  
      private final static String[] manufacturers;
      private final static String[] owner;
  
      static {
          colors = new String[10];
          colors[0] = "Black";
          colors[1] = "White";
          colors[2] = "Green";
          colors[3] = "Red";
          colors[4] = "Blue";
          colors[5] = "Orange";
          colors[6] = "Silver";
          colors[7] = "Yellow";
          colors[8] = "Brown";
          colors[9] = "Maroon";
  
          manufacturers = new String[10];
          manufacturers[0] = "IBM";
          manufacturers[1] = "Fujitsu";
          manufacturers[2] = "BenQ";
          manufacturers[3] = "Samsung";
          manufacturers[4] = "Oracle";
          manufacturers[5] = "HP";
          manufacturers[6] = "Dell";
          manufacturers[7] = "Packard Bell";
          manufacturers[8] = "USRobotics";
          manufacturers[9] = "Intel";
  
          owner = new String[10];
          owner[1]="Google";
          owner[2]="Amazon";
          owner[3]="Private";
          owner[4]="Private";
          owner[5]="SETI";
          owner[6]="Google";
          owner[7]="Google";
          owner[8]="Google";
          owner[9]="Amazon";
          owner[0]="Amazon";
      }
  
      private List&lt;Server&gt; server;
  
      private List&lt;Server&gt; servers;
  
      private Server selectedServer;
  
      private Server[] selectedServers;
  
      public TableBean() {
          server = new ArrayList&lt;Server&gt;();
  
          populateRandomServer(server, 50);
      }
  
      public Server[] getSelectedServers(){
          return selectedServers;
      }
  
      public void setSelectedServers(Server[] selectedServers){
          this.selectedServers = selectedServers;
      }
  
      public Server getSelectedServer() {
          return selectedServer;
      }
  
      public void setSelectedServer(Server selectedServer) {
          this.selectedServer = selectedServer;
      }
  
      private void populateRandomServer(List&lt;Server&gt; list, int size) {
          for(int i = 0 ; i &lt; size ; i++)
          list.add(new Server(getRandomModel(), getRandomYear(), getRandomManufacturer(), getRandomOwner()));
      }
  
      public List&lt;Server&gt; getServer() {
          return server;
      }
  
      public List&lt;Server&gt; getServers(){
          return servers;
      }
  
      private int getRandomYear() {
          return (int) (Math.random() * 50 + 1960);
      }
  
      private String getRandomOwner() {
          return owner[(int) (Math.random() * 10)];
      }
  
      private String getRandomManufacturer() {
          return manufacturers[(int) (Math.random() * 10)];
      }
  
      private String getRandomModel() {
          return UUID.randomUUID().toString().substring(0, 8);
      }
  }
  </code></pre>