Primefaces组合键作为行键的数据表选择记录

Primefaces组合键作为行键的数据表选择记录,primefaces,selection,Primefaces,Selection,我有带选择的dataTable,但当我选择记录时,selectedTeachers变量仍然为空。我想这可能是一个rowKey问题,它是compositeKey <p:dataTable var="item" value="#{uploadVo}" rowKey="#{item.compositeKey}" selection="#{selectedTeachers}" rowIndexVar="index" id="gridItemName

我有带选择的dataTable,但当我选择记录时,
selectedTeachers
变量仍然为空。我想这可能是一个
rowKey
问题,它是
compositeKey

<p:dataTable var="item" value="#{uploadVo}" 
        rowKey="#{item.compositeKey}"
        selection="#{selectedTeachers}" rowIndexVar="index"
        id="gridItemName" rowSelectMode="checkbox" >
    <p:column selectionMode="multiple"/>

你到底为什么有这么大的组合键?恐怕你的数据模型有严重的问题。无论如何,要检查问题,您可以在实体get中添加一个断点,看看它是否停止。
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
    };
}