Update Multiple Rows In Tales With Richfaces
As far as I know, AJAX4JSF was a standalone project once but has been integrated into Richfaces which itself belongs now to JBoss.
Given to tables with different rows and the need to update them both e.g. as a respond to an AJAX call, you can use the ajaxKeys attribute and a more detailed notation to define the Ids of the fields of the two tables to update:
...
<h:form id="testForm">
...
<rich:dataTable value="#{reportTable.rows}" var="oneRow" border="0" id="tab1" ajaxKeys="#{rowsToUpdate}" rowKeyVar="currentRowIndex">
<rich:column>
<f:facet name="header">
<h:outputText value="2. column"/>
</f:facet>
<h:outputText id="col2" value="#{oneRow.get(1)}"/>
</rich:column>
<rich:column>
<f:facet name="header">
<h:outputText value="3. column"/>
</f:facet>
<h:outputText id="col3" value="#{oneRow.get(2)}"/>
</rich:subTable>
<rich:dataTable value="#{reportTable2.descriptions}" var="tableRow" border="0" id="tab2" ajaxKeys="#{rowsToUpdate}"
rowKeyVar="currentRowIndex">
<rich:column>
<f:facet name="header">
<h:outputText value="2. column"/>
</f:facet>
<h:outputText id="col2" value="#{oneRow.get(1)}"/>
</rich:column>
<rich:column>
<f:facet name="header">
<h:outputText value="3. column"/>
</f:facet>
<h:outputText id="col3" value="#{oneRow.get(2)}"/>
</rich:subTable>
...
<a4j:commandLink...reRender=":testForm:tab1:col2,:testForm:tab2:col2,:testForm:tab1:col3,:testForm:tab2:col3"/>
...
</h:form>
...