[ http://issues.apache.org/jira/browse/MYFACES-337?page=comments#action_12316087 ]
Peter Mahoney commented on MYFACES-337: --------------------------------------- In testing this, I have noticed that h:dataTable and x:dataTable do not behave the same. Using x:dataTable, when the form is submitted, some of the answer text values are replaced. For example, if the form has these values: Q1. A1. x Q1, A2. y Q2. A1. a Q2. A2. b Q2. A3. c Q2. A4. d Then, when submitted, Q2 A2, Q2 A3 and Q2 A4 will all become "b". If question 1 only had one option, then all answers for question 2 would become "a". The form works correctly just by changing the page to use h:dataTable instead. I hope this makes sense. > Nested dataTable buttons not working > ------------------------------------ > > Key: MYFACES-337 > URL: http://issues.apache.org/jira/browse/MYFACES-337 > Project: MyFaces > Type: Bug > Versions: Nightly Build > Reporter: Peter Mahoney > Assignee: Mathias Broekelmann > > Buttons within a nested dataTable always call the action methods bound to the > first row of the outer table: > For example, using the JSP below, if the delete button is clicked for the > third answer of question 2, answer.deleteAnswer() is called on the third > answer of question 1 instead. > <h:dataTable value="#{handler.poll.questions}" var="question"> > <h:column> > <h:dataTable value="#{question.answers}" var="answer"> > <h:column> > <h:outputLabel for="answerText" > value="Q#{question.questionNumber} A#{answer.answerNumber}"/> > <h:inputText id="answerText" > value="#{answer.text}"/> > </h:column> > <h:column> > <h:commandButton > action="#{answer.deleteAnswer}" value="Delete"/> > </h:column> > </h:dataTable> > </h:column> > </h:dataTable> > Probably related is that the text of all other answers for the first question > becomes the text from the last answer of the last question following clicking > on the delete button. This did not occur using the RI. -- 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
