[ https://issues.apache.org/jira/browse/WICKET-5658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14087632#comment-14087632 ]
Martin Grigorov commented on WICKET-5658: ----------------------------------------- I don't think there is many users of AFCUB#getUpdateModel().Otherwise everyone would hit this problem immediately. It is a clear bug - Wicket clears the rawInput and doesn't set a new model, so the next render will show the old model. Even submitting an invalid data would preserve the rawInput and the user of the application will have a second chance to enter a valid data by fixing it without re-entering it again. But I don't mind what you suggest. Please do it if you believe the chance for more broken apps is bigger than now. > AjaxFormComponentUpdatingBehavior should not clear the rawInput when > updateModel is false > ----------------------------------------------------------------------------------------- > > Key: WICKET-5658 > URL: https://issues.apache.org/jira/browse/WICKET-5658 > Project: Wicket > Issue Type: Bug > Components: wicket > Affects Versions: 6.16.0 > Reporter: Ilia Naryzhny > Assignee: Martin Grigorov > Labels: ajax, dropdown > Fix For: 7.0.0-M3, 6.17.0 > > > Setup: case requires OnChangeAjaxBehavior with getUpdateModel returning false > on DropDownChoice. > Result: ajax response contain model's object, but not new value. > Explanation: There is following lines in AjaxFormComponentUpdatingBehaviour > formComponent.inputChanged(); > formComponent.validate(); > if (formComponent.isValid()) > { > >>>>>>>> formComponent.valid(); > if (getUpdateModel()) > { > formComponent.updateModel(); > } > onUpdate(target); > } > Let me note that "formComponent.valid()" is cleaning raw Input. But it's > required in subsequent AbstractChoice.onComponentTagBody. -- This message was sent by Atlassian JIRA (v6.2#6252)