I have a JSF woodstock table with checkboxes. When a row is selected I want to do some processing with those items. I managed to get a selection of RowKey objects but can't find out how to get the original objects I put in back. The table is populated by an ObjectListDataProvider.
How do I retrieve the selected rows of a woodstock table
3.4k Views Asked by Jasper At
2
So I stumbled across this and was hoping to find how to actually do the selecting and get the row information. I eventually figured it out and I thought others might benefit from how I did it.
I added a RadioButton to a table column in the JSP and added a valueChangeListener
In my Java code I created the valueChangeListener function and stored the current row information.
Now if you have any buttons that want to manipulate the data in the selected row you can do this to get the object data. Jasper mentioned this above.
You might be able to use something like selectedValue attribute for radio button in conjunction with something else instead of doing valueChangeListener and avoid having to do a valueChange function but this worked so I didn't care to figure out another way.