[ http://issues.apache.org/jira/browse/MYFACES-277?page=comments#action_12317825 ]
Mathias Werlitz commented on MYFACES-277: ----------------------------------------- I think the fix is not fully correct, it breaks a major functionality of the UIInput component: save the submitted state for further processing. 1. The behaviour is completely different to the SUN RI 2. The spec says (Apply Request Values 2.2.2): At the end of this phase, all EditableValueHolder components in the component tree will have been updated with new submitted values included in this request (or enough data to reproduce incorrect input will have been stored, if there were conversion errors). In addition, conversion and validation will have been performed on EditableValueHolder components whose immediate property is set to true. 3. If immediate is true on the UIInput component and conversion or validation fails, now the value of the value binding is displayed with an error message. The user does get wrong feedback - he does not see his wrong input and cannot correct it, but sees an error message for the (possibly) correct value of the value binding. I would be really confused. Think of a form with many input fields, the user has to retype everything and does not see his previous entered values. 4. I'm using UIInput components with no value binding an ValueChangeListener to simply add multiple values to the model. These are empty afterwards. 5. I have created a component for partial form validation (simulating partial forms) that influences the jsf cycle for some components (leaving out the validation and update model phase). It is similar to the http://tobago.atanion.net partial forms. I may contribute it. The function of the component is broken, because all other input fields (not submitted partial form) on the page lose their value and the user has to type in everything again. > using a button with immediate on a form with a dataTable component > ------------------------------------------------------------------ > > Key: MYFACES-277 > URL: http://issues.apache.org/jira/browse/MYFACES-277 > Project: MyFaces > Type: Bug > Reporter: Tamietto Claudio > Fix For: Nightly Build > > i'm using a form that contain a dataTable component . There is also a button > that modify the model of the table with > an array of only one element with the single fields initialized to "" (String > fields) and has the attribute immediate set > to true. When the form is rendered after i have pressed the button with the > immediate attribute set to true ,the value that i obtain is the value > submitted and not the value of the model. > I have found the following workaround that i have put on a properties of the > row of the table that is called on the rendering phase: > if (component.getSubmittedValue() != null && > arrayOfRecord[model.getRowIndex()].getCodice() != null && > > !component.getSubmittedValue().equals(arrayOfRecord[model.getRowIndex()].getCodice())) > { > > component.setSubmittedValue(arrayOfRecord[model.getRowIndex()].getCodice()); > } > I have used the value of the model and not the component.getValue() because > also this was not the same > of the value of te model. > I can try to create a simple case if it is necessary o the problem is not > clear. > The problem seems the same of the issue 187 (that it is closed) but i i have > tested the night builds and nothing > changed. However in the release notes of the night builds the issue is not > reported as solved. -- 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
