[ https://issues.apache.org/jira/browse/WICKET-5883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14501835#comment-14501835 ]
Martin Grigorov commented on WICKET-5883: ----------------------------------------- OK. I see what happens. The error feedback message is rendered but preserved for the next request because of: {code} // make feedback messages not to disappear after page refresh getApplicationSettings().setFeedbackMessageCleanupFilter(IFeedbackMessageFilter.NONE); {code} [~svenmeier] What do you think about adding checks for component.isVisibileInHierarchy() and #isEnabledInHierarchy() at org.apache.wicket.markup.html.form.Form#anyFormComponentError()? {code} diff --git i/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java w/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java index 789a804..c7fea42 100644 --- i/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java +++ w/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java @@ -1141,7 +1141,7 @@ public class Form<T> extends WebMarkupContainer implements IFormSubmitListener, @Override public void component(final Component component, final IVisit<Boolean> visit) { - if (component.hasErrorMessage()) + if (component.isVisibleInHierarchy() && component.isEnabledInHierarchy() && component.hasErrorMessage()) { visit.stop(true); {code} > Feedback messages not cleared for invisible/disabled form components on > submit. > ------------------------------------------------------------------------------- > > Key: WICKET-5883 > URL: https://issues.apache.org/jira/browse/WICKET-5883 > Project: Wicket > Issue Type: Bug > Affects Versions: 6.19.0 > Reporter: Denis Shokhalevich > Assignee: Martin Grigorov > Priority: Minor > Attachments: quickstart.zip > > > Having: > - IFeedbackMessageFilter.NONE used as the default application's feedback > message cleanup filter (in order to make feedback messages not to disappear > after page refresh, i.e. persistent) > - form with validatable component whose enabled/visible state may be > dynamically changed by user (e.g. checkbox "send me email" and text field > "email") > First, user tries to submit form having invalid value - as the result > validation error occurs. > Then user makes that component invisible and retries form submitting - as the > result no validation errors, but form wasn't submitted. > This happens because that component still has error feedback message got from > first submit. Note that when using default application's feedback message > cleanup filter, form is successfully submitted. > Probably, feedback messages should be cleared for invisible/disabled form > components on submit, as it done for visible/enabled components in > FormComponent.validate() -- This message was sent by Atlassian JIRA (v6.3.4#6332)