title: Primefaces dataTable selection records of composite key as rowKey
body: <p>I have dataTable with selection, but when I select the records, the <code>selectedTeachers</code> variable is still empty. I guess it may be a <code>rowKey</code> problem which is <code>compositeKey</code>.</p>
  
  <pre><code>&lt;p:dataTable var="item" value="#{uploadVo}" 
          rowKey="#{item.compositeKey}"
          selection="#{selectedTeachers}" rowIndexVar="index"
          id="gridItemName" rowSelectMode="checkbox" &gt;
      &lt;p:column selectionMode="multiple"/&gt;
  </code></pre>
  
  <p>Entity code:</p>
  
  <pre><code>public Object[] getCompositeKey() {
      return new Object[] { this.batchNumb, this.schlnumb,this.schllocnid,
              this.schllevltypecode, this.schlsesstypecode, this.schlYear,
              this.schlnumbAdd, this.schllocnidAdd, this.schllevltypecodeAdd,
              this.schlsesstypecodeAdd, this.priIdTypeCode, this.priIdNo,
              this.issuePlaceCode, this.edbSubjCode, this.seq
      };
  }
  </code></pre>