[
https://issues.apache.org/jira/browse/WICKET-6392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16037062#comment-16037062
]
Kamil edited comment on WICKET-6392 at 6/7/17 3:31 PM:
-------------------------------------------------------
Phew... this is showcase project.
1)run ./gradlew bootRun
2)Go to localhost:8080
3)Click "Add user" (observe logs)
4)If fields are properly filled and submitted - on second open window is cleared
5)If fields are not properly filled, submit button is clicked and you click
cancel button to close window - on second open window is NOT cleared
If you are using IDEA - Enable Lombok plugin
was (Author: eximius):
Phew... this is showcase project.
1)run ./gradlew bootRun
2)Go to localhost:8080
3)Click "Add user" (observe logs)
4)If fields are properly filled and submitted - on second open window is cleared
5)If fields are not properly filled, submit button is clicked and you click
cancel button to close window - on second open window is NOT cleared
> Can not change Model when form has Validation Errors
> ----------------------------------------------------
>
> Key: WICKET-6392
> URL: https://issues.apache.org/jira/browse/WICKET-6392
> Project: Wicket
> Issue Type: Bug
> Affects Versions: 8.0.0-M6
> Reporter: Kamil
> Attachments: wicket-showcase-cleanForm.zip
>
>
> I have a Modal with Form and Submit button (it is used for creating new
> users).
> Form has several text fields bound to CompoundPropertyModel.
> Everytime I open the Modal, I set the ModelObject as new User();
> It works fine (fields "see" new model if I cancel the window or if I sumbit
> it without erors).
> If Form has validation errors, even if i set compoundModel.setObject(new
> User()); fields have old value and validation erros are present.
> I found
> [workaround|https://stackoverflow.com/questions/8879775/apache-wicket-how-to-update-model-after-validation-error]
> but I believe it should be possible with Wicket without "workarounds"
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)