[ 
https://issues.apache.org/jira/browse/WICKET-6392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16301372#comment-16301372
 ] 

Kamil commented on WICKET-6392:
-------------------------------

For FeedbackCollector Session issue I created separate issue. Could you please 
add your 2c about it under my comment: 
https://issues.apache.org/jira/browse/WICKET-6507?focusedCommentId=16301327&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16301327
 ?

and back to the "clearFeedbackMessages"
now it looks like this:
{code}
        public static void clearFeedbackMessages(Form<?> form) {
                final FeedbackCollector collector = new FeedbackCollector(form);
                collector.setIncludeSession(false); //WICKET-6507
                
collector.collect().stream().forEach(FeedbackMessage::markRendered); // 
http://markmail.org/message/mqrfbxlnl6keljfj
        }
{code}

Thst is why I think it should be included in Wicket API

> 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
>            Assignee: Martin Grigorov
>         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.4.14#64029)

Reply via email to