0

Starting from Color the rows of datatable based a condition in JSF 2:

How would you change this so clicking a button in the row of the datatable changed a value of entry.action and therefore the rowStyleClass? Is there a way to update the rowStyleClass after rendering?

My button is already has a tag that calls a listener that's changing the value of entry.action.

Brett Slocum
  • 390
  • 1
  • 5
  • 21
  • You can add an ajax event on the button so that clicking on it triggers the listener for `entry.action` then refreshes you datatable – tfosra Jun 01 '16 at 22:19
  • My tag contains render="datatable-id". The datatable has rowStyleClass="#{entry.action ? 'altline2' : 'line2'}". – Brett Slocum Jun 02 '16 at 16:54

0 Answers0