In my TableView, I want to have a column that contains a checkbox. This checkbox is a way for the user to select which rows they want to be marked for a certain action, such as deletion. I have tried using a CheckBoxTableCell but all the examples I have seen have binded the checkbox's value to some boolean property of the model. The model on which my TableView is based on is a JPA entity and does not have such a field. I am also reluctant to add such a field because it would not be relevant to the model other than for this row selection purpose.
Therefore my question is, is it possible to use a CheckBoxTableCell for my purpose of selecting multiple rows. And if so, how can I implement it and afterwards get each row that was selected? If not, what is the best way to achieve multiple selection with a checkbox in a table column?
Thank you.
Aucun commentaire:
Enregistrer un commentaire