-
1. Re: Dynamically changing row class for active/inactive items in rich:extendedDataTable
jackalope Jul 2, 2010 12:21 PM (in response to jackalope)My Solution:
1. Accomplished this by setting active/inactive on my model for each row item and interrogating this when rendering the the extendedDataTable. Each rich:column sets its own "styleClass" based on active/inactive state of the model. Depends on the table being rerendered which is fine for my case.
2. This was quite easy as extendedDataTable already supports this. I added a new class for the selected row to my stylesheet and set "selectedClass" on extendedDataTable to use this new class.
3. The trickiest bit. Used jquery that listens for a click on a row in each of my extendedDataTables needing this functionality. A jquery callback then updates the classes of all the rows in the rendered table as needed.
It works, but at the moment doesn't handle keyboard only selections such as "ctrl + a" or "shift + up" and "shift + down"...