[ http://issues.apache.org/jira/browse/MYFACES-335?page=comments#action_12365951 ]
David Green commented on MYFACES-335: ------------------------------------- Created related issue http://issues.apache.org/jira/browse/MYFACES-1109 I would have reopened this issue, but it seems that with my JIRA permissions I cannot. > 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.9m9 > 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
