dataTable selection records of composite key as rowKey

UI Components for JSF
Post Reply
rchiu5hk
Posts: 32
Joined: 29 Jun 2015, 03:50

04 Feb 2016, 04:03

Dear all,

I have dataTable with selection. But I find that when I select the records, the "selectedTeachers" are still empty.
I guess it may be rowKey problem which is "compositeKey". Isn't it?? Do you have any ideas?? Please help..



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

rchiu5hk
Posts: 32
Joined: 29 Jun 2015, 03:50

12 Feb 2016, 11:50

Any ideas??
Please help!!

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 50 guests