You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Mathias Broekelmann (JIRA)" <my...@incubator.apache.org> on 2005/07/19 15:54:49 UTC

[jira] Closed: (MYFACES-335) dataTable values are not properly updated if immediate action is used

     [ http://issues.apache.org/jira/browse/MYFACES-335?page=all ]
     
Mathias Broekelmann closed MYFACES-335:
---------------------------------------

    Resolution: Fixed

fixed in the current svn repository

> dataTable values are not properly updated if immediate action is used
> ---------------------------------------------------------------------
>
>          Key: MYFACES-335
>          URL: http://issues.apache.org/jira/browse/MYFACES-335
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.9 beta
>  Environment: Windows XP, Tomcat 5.0.27, Java SDK 1.4.2.
>     Reporter: Christopher Hlubek

>
> The bug appears in the following scenario:
> In my view I have a dataTable displaying a List of beans with a column to enter a new value and one with two buttons to delete and edit each row.
> <h:form>
>     <h:dataTable value="#{handler.listModel}" var="bean" width="100%">
>       <h:column>
>         <f:facet name="header">
>           Label
>         </f:facet>
>         <h:inputText value="#{bean.value}" />
>       </h:column>
>       <h:column>
>         <f:facet name="header">
>           <h:outputText value="-" />
>         </f:facet>
>         <h:commandButton
>           action="#{handler.updateRow}"
>           value="Update" />
>         <h:commandButton
>           action="#{handler.deleteRow}"
>           immediate="true" value="Delete" />
>       </h:column>
>     </h:dataTable>
>   </h:form>
> And this is the code I am using in the handler:
> ListDataModel listModel =...
> ...
> public String deleteRow() {
> 	int i = listModel.getRowIndex();
> 	List l = (List)listModel.getWrappedData();
> 	l.remove(i);
> 	return "success";
> }
> And now the issue:
> Every time the delete button is clicked, the correct row is deleted but the values shown in the dataTable are the old ones, except the table is one row shorter!
> I am using a redirect navigation case to handle this shortcoming right now and then it is working as expected.
> I think the immediate action doesn't properly update the view values, I have debuged the application and the DataModel is updated perfectly fine.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira