title: p:datatable with selectionMode as multiple
body: <p>As per the primefaces document the selection should be a array. In the below code bean.selectedUsers is defined as "HasUsersVO[] selectedUsers" but the value of datatable is List. I am getting cast error as pasted at the bottom when i click the OK button after the datatable got filled. </p>
  
  <pre><code>                &lt;p:dataTable id="userListTable" value="#{bean.peopleVOList}"
                      var="user" rowClasses="odd even" selection="#{bean.selectedUsers}" rowKey="#{user.userGuid}"
                      &lt;p:column selectionMode="multiple" style="width:18px"&gt;
                      &lt;/p:column&gt;
  .....
  .....
  &lt;/p:dataTable&gt;
  </code></pre>
  
  <h1>Error</h1>
  
  <pre><code>22:59:16,962 INFO  [class com.zreflect.emyed.managedbean.circle.CircleController] (http--127.0.0.1-8080-3) *******************Outside getUsersList********************
  22:59:38,943 WARNING [javax.enterprise.resource.webcontainer.jsf.lifecycle] (http--127.0.0.1-8080-3) [Lcom.user.PeopleVO; cannot be cast to java.util.Collection: java.lang.ClassCastException: [Lcom.user.PeopleVO; cannot be cast to java.util.Collection
      at org.primefaces.component.datatable.DataTable.getRowData(DataTable.java:835) [primefaces-3.3.1.jar:]
      at org.primefaces.component.datatable.DataHelper.decodeMultipleSelection(DataHelper.java:262) [primefaces-3.3.1.jar:]
      at org.primefaces.component.datatable.DataHelper.decodeSelection(DataHelper.java:240) [primefaces-3.3.1.jar:]
      at org.primefaces.component.datatable.DataTableRenderer.decode(DataTableRenderer.java:72) [primefaces-3.3.1.jar:]
  </code></pre>