Primefaces dataTable选择复合键的记录为rowKey

时间:2016-02-05 06:35:46

标签: primefaces selection

我有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"/>

实体代码:

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
    };
}

0 个答案:

没有答案