Primefaces datatable with checkbox selection ONLY

前端 未结 2 1743
眼角桃花
眼角桃花 2020-12-31 16:55

In my project, I use datatable with so that the entries can be multiple selected using the checkboxes.

Ho

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-31 17:08

    According to this feature request, this feature is now supported in Primefaces versions 5.0.3 & 5.1 by simply adding rowSelectMode="checkbox" to the datatable.

    Documentation reference (PF 5.1):

    Use rowSelectMode option to customize the default behavior on row click of a multiple selection enabled datatable. Default value is "new" that clears previous selections, "add" mode keeps previous selections same as selecting a row with mouse click when metakey is on and "checkbox" mode allows row selection with checkboxes only.

提交回复
热议问题