[ http://jira.jboss.com/jira/browse/RF-3598?page=comments#action_12419941 ] 
            
Simon van Scheltinga commented on RF-3598:
------------------------------------------

I can confirm this issue with an a4j:repeat tag but with the exception that I 
experience it only with input fields. If I change for example my h:inputText to 
an h:outputText the page is rendered correct. But it is only the view that is 
incorrect, after a full page refresh the correct row is removed. 

<h:form id="repeatForm">
        <a4j:outputPanel id="items">
                <a4j:repeat value="#{demo.items}" var="item">
                        <div>
                                <h:inputText value="#{item.nr}" 
required="true"/>&#160;
                                <a4j:commandLink action="#{item.doRemove}" 
reRender="items" immediate="true" >remove</a4j:commandLink>
                        </div>
                </a4j:repeat>
        </a4j:outputPanel>
        <h:commandLink action="#{demo.doAdd}" >add</h:commandLink>
</h:form>


> 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
>         Attachments: rf-3598.war 
>
>
> 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

Reply via email to