FacesException: DataModel must implement org.primefaces.model.SelectableDataModel when selection is enabled

前端 未结 3 506
广开言路
广开言路 2020-12-09 13:59

I am trying to learn PF so I started with displaying datatable first and navigating to next page on rowClick passing parameters, but got stuck with the following error. I fo

3条回答
  •  Happy的楠姐
    2020-12-09 14:17

    It worked for my project using a composite key for rowkey e.g.: rowKey="#{course.getCompositeKey()

    Since I didn't have a compositeKey variable I simply created one in my Course Class (in your case the Car Class). The 2 primary keys are strings so I just said this.compositeKey=this.courseNumber+this.product--you just use whatever 2 primary keys are in your Car class instead of courseNumber and product.

    | |

提交回复
热议问题