First off: I am using Spring Web Flow underneath Richfaces!
I am using the rich:dataTable tag in conjunction with a checkbox (with a4j:support) on every row. Now if I first render the rich:dataTable with a Collection of beans like so:
<rich:dataTable id="listTable" width="100%" rows="#{listBackingBean.pageSize}" value="#{listBackingBean.listDTOs}" var="listElement" reRender="listTableScroller"> <f:facet name="header"> <h:outputText value="#{flowScope.title}" /> </f:facet> <rich:column id="CbbNr" sortBy="#{listElement.cbbNummer}" rendered="#{flowScope.listtype != 'A'}"> <f:facet name="header"> #{resourceBundle['message.list.column.cbbnr']} </f:facet> #{listElement.cbbNummer} </rich:column> <rich:column id="columnA" rendered="#{flowScope.listtype == 'A' and flowScope.personal == false}" style="text-align:center;"> <f:facet #{resourceBundle['message.list.column.A']} </f:facet> <h:selectBooleanCheckbox value="#{listElement.claimAsManager}" rendered="#{listElement.manager == null}"> <a4j:support event="onchange" reRender="listTable" ajaxSingle="true" /> </h:selectBooleanCheckbox> </rich:column> [...]
Ok, the problem resided in the use of ajaxSingle="true" in the h:selectBooleanCheckbox of a row.
It was due to the fact that while changing the checkbox only the checkbox is send to the server and not the (sorting) information of the table i.e. which column is sorted ASC or DESC.