Here is a minimal rich:dataTable example with an a4j:commandLink inside. When clicked, it sends an AJAX request to my bean and reRenders the dataTable.
<rich:dataTable id="dataTable" value="#{carManager.all}" var="item">
<rich:column>
<f:facet name="header">name</f:facet>
<h:outputText value="#{item.name}" />
</rich:column>
<rich:column>
<f:facet name="header">action</f:facet>
<a4j:commandLink reRender="dataTable" value="Delete" action="#{carForm.delete}">
<f:setPropertyActionListener value="#{item.id}" target="#{carForm.id}" />
<f:param name="from" value="list" />
</a4j:commandLink>
</rich:column>
</rich:dataTable>
The exmaple obove works fine so far. But when I add a rich:subTable (grouping the cars by garage for example) to the table, reRendering fails...
<rich:dataTable id="dataTable" value="#{garageManager.all}" var="garage">
<f:facet name="header">
<rich:columnGroup>
<rich:column>name</rich:column>
<rich:column>action</rich:column>
</rich:columnGroup>
</f:facet>
<rich:column colspan="2">
<h:outputText value="#{garage.name}" />
</rich:column>
<rich:subTable value="#{garage.cars}" var="car">
<rich:column><h:ouputText value="#{car.name}" /></rich:column>
<rich:column>
<a4j:commandLink reRender="dataTable" value="Delete" action="#{carForm.delete}">
<f:setPropertyActionListener value="#{item.id}" target="#{carForm.id}" />
<f:param name="from" value="list" />
</a4j:commandLink>
</rich:column>
</rich:column>
</rich:dataTable>
Now the rich:dataTable is not rerendered but the item gets deleted since the item does not show up after a manual page refresh.
Why does subTable break support for reRender-ing here?
Tanks Tom