Setting title for checkbox in primefaces datatable with multiple selection column

為{幸葍}努か 提交于 2019-12-12 02:17:22

问题


I want to set titles for checkboxes in a primefaces datatable with a multiple selection column. As an example I use a snippet of the primefaces showcase (http://www.primefaces.org/showcase/ui/data/datatable/selection.xhtml).

<p:dataTable id="checkboxDT" var="car" value="#{dtSelectionView.cars6}" selection="#{dtSelectionView.selectedCars}" rowKey="#{car.id}" style="margin-bottom:0">
    <p:column selectionMode="multiple" style="width:16px;text-align:center"/>
</p:dataTable>

The column in this table is filled with generated checkboxes and I wonder if there is a (declarative) way to set the titles of these checkboxes (for example: select item #itemName). I need the titles for reasons of accessibility, so that a screenreader user knows which element is selected.

Thx in advance!

来源:https://stackoverflow.com/questions/39489916/setting-title-for-checkbox-in-primefaces-datatable-with-multiple-selection-colum

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!