Hello
I am using a data table to display a list of entries. On single select I am just showing a button on each row. That's fine.
Now we want to have a multiple selection and I thought using a checkbox or even better a toggleSwitch instead of the button. If clicked, it will add the id of the row element to the list.
<p:toggleSwitch value="#{data.ids.contains(row.id)}" onIcon="pi pi-check" offIcon="pi pi-times">
<p:ajax listener="#{logic.select(row.id)}" />
</p:toggleSwitch>
The value EL seems to be evaluated differently then expected. I receive Number Format
For input string: "contains". If I used it on the rendered attribute of a button it is fine. The data.ids is a scripting list of Strings. The IDE even display me the selection of .contains, but somehow it complains.
What am I doing wrong?