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