Does a nested subTable break reRender?
Posted
by Tom
on Stack Overflow
See other posts from Stack Overflow
or by Tom
Published on 2010-04-22T10:01:38Z
Indexed on
2010/04/22
10:33 UTC
Read the original article
Hit count: 473
Here is a minimal rich:dataTable 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 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 complete page refresh.
Why does subTable break support for reRender-ing the way i'd like to use it here?
Tanks Tom
© Stack Overflow or respective owner