dataTable does not re-render correctly after deleting a row with
immediate="true"
---------------------------------------------------------------------------------
Key: RF-3598
URL: http://jira.jboss.com/jira/browse/RF-3598
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.1.4
Environment: JBoss 4.0.5, JSF 1.2
Reporter: Jonck van der Kogel
Priority: Critical
Given the following sample code:
<t:div id="testDiv">
<rich:dataTable
value="#{backingBean.holders}"
var="holder">
<f:facet name="header">
<rich:columnGroup>
<rich:column>
<h:outputText value="TestColumn">
</rich:column>
<rich:column>
<h:outputText value="DeleteColumn">
</rich:column>
</rich:columnGroup>
</f:facet>
<rich:column>
<h:outputText value="#{holder.testValue}" />
</rich:column>
<rich:column>
<a4j:commandLink action="#{backingBean.deleteRow}"
reRender="testDiv"
value="testLink"
immediate="true">
<f:setPropertyActionListener
value="#{holder}"
target="#{backingBean.toBeDeletedHolder}" />
</a4j:commandLink>
</rich:column>
</rich:dataTable>
</t:div>
The Java code in the backingBean to remove the row is:
public void deleteRow() {
holders.remove(toBeDeletedHolder);
}
Let's say this table has 4 rows. When you now press the delete link of the
second row, the model gets updated correctly, indeed the second row is removed.
But in the view, it appears like the 3d row (always the row directly below the
row that was intended) is removed, not the second. Removing the
immediate="true" attribute resolves the issue, but is undesirable since then
validation comes into play, which is precisely why you put immediate="true" on
such a component in the first place.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues