views:

34

answers:

1

I've got a datatable with row styling applied via rowClasses on the datatable. The rows contain AJAX buttons. When a button is clicked, it does some databasy stuff, updates it's text, and changes the datasource used by the datatable. The datatable then refreshes (as it's one of the ajax render options). The text of the buttons updates fine, but the row styles (via rowClasses) do not change. I threw in some debugging code, and the datatable isn't even calling the code. Appears that it's caching the first rowClasses value and never goes back to update it (even when the datatable is refreshed).

How do I go about getting the desired effect of being able to update the style applied to the datatable rows?

+1  A: 

What is your reRender target? I've had issues with directly reRendering dataTables. I will usually reRender a wrapper component like h:panelGroup or a4j:outputPanel.

Naganalf
Yep, that's the problem. About 1 minute before you posted, I ended up figuring out that making the render target "@form" solved the problem. :-)
Brian Knoblauch