Repository: wicket
Updated Branches:
  refs/heads/wicket-6.x e4a7c1616 -> fe22ea366


WICKET-6351 Form.anyFormComponentError performance degradation


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/fe22ea36
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/fe22ea36
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/fe22ea36

Branch: refs/heads/wicket-6.x
Commit: fe22ea3666150e410b9708dc3bfc584311a6cdb9
Parents: e4a7c16
Author: Martin Tzvetanov Grigorov <[email protected]>
Authored: Mon Apr 3 11:19:02 2017 +0200
Committer: Martin Tzvetanov Grigorov <[email protected]>
Committed: Mon Apr 3 11:20:26 2017 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/wicket/markup/html/form/Form.java | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/fe22ea36/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java 
b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
index c7df2ef..4eab314 100644
--- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
+++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java
@@ -1015,8 +1015,7 @@ public class Form<T> extends WebMarkupContainer
                        public void component(final Component component, final 
IVisit<Void> visit)
                        {
                                Form<?> form = (Form<?>)component;
-                               if (form.isEnabledInHierarchy() && 
form.isVisibleInHierarchy() &&
-                                       form.wantSubmitOnParentFormSubmit())
+                               if (form.wantSubmitOnParentFormSubmit() && 
form.isEnabledInHierarchy() && form.isVisibleInHierarchy())
                                {
                                        form.setFlag(FLAG_SUBMITTED, true);
                                        return;
@@ -1158,8 +1157,7 @@ public class Form<T> extends WebMarkupContainer
                        @Override
                        public void component(final Component component, final 
IVisit<Boolean> visit)
                        {
-                               if (component.isVisibleInHierarchy() && 
component.isEnabledInHierarchy() &&
-                                       component.hasErrorMessage())
+                               if (component.hasErrorMessage() && 
component.isVisibleInHierarchy() && component.isEnabledInHierarchy())
                                {
                                        visit.stop(true);
                                }

Reply via email to