-
1. Re: Call JavaScript function on reRender of rich:dataTable
ilya_shaikovsky Apr 14, 2010 11:49 AM (in response to mcfly83)if you need just update some other elements on the page after sorting/filtering (e.g. datascroller) - you could use reRender on dataTable itself.
-
2. Re: Call JavaScript function on reRender of rich:dataTable
mcfly83 Apr 14, 2010 12:06 PM (in response to ilya_shaikovsky)No other elements of the page need to be updated.
We have a rich:dataTable with multi-selection by using hidden checkboxes (Found that somewhere on this board). Selected lines are being displayed with a different background-color. But when the table is being rerendered, the assigned CSS class for selected rows is lost. (The hidden checkbox is still intact.) So I thought of calling a JavaScript function after rerendering that checks the rows for selection and assigns the CSS class if needed.
-
3. Re: Call JavaScript function on reRender of rich:dataTable
ilya_shaikovsky Apr 14, 2010 12:16 PM (in response to mcfly83)how about to use
<rich:column styleClass="#{dataTableVar.selected? 'classContainingBGProperties' :'' }">
or
<rich:column styleClass="#{selectionMap[dataTableVar.objectId]? 'classContainingBGProperties' :'' }"> //selection map contains boolean selection flag //according to object id
and change via ajax instead of just changing on client side. Then it will be stored in your iteration object or in some map and will not be lost between requests.
-
4. Re: Call JavaScript function on reRender of rich:dataTable
mcfly83 Apr 16, 2010 3:25 AM (in response to ilya_shaikovsky)Alright, that works! Thanks a lot so far!
But is there a way to set the class for the whole row? Now it has to be set for every single column...
-
5. Re: Call JavaScript function on reRender of rich:dataTable
ilya_shaikovsky Apr 16, 2010 3:36 AM (in response to mcfly83)we have such task for 4.x but unfortunatelly not available in 3.3.
https://jira.jboss.org/jira/browse/RF-6494 - vote there.