Repository: wicket
Updated Branches:
  refs/heads/master 7d7c3d928 -> f734ad676


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/f734ad67
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/f734ad67
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/f734ad67

Branch: refs/heads/master
Commit: f734ad6764bc6c1c7bfc0fa09e85db27d7510d50
Parents: 9d18949
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:19:31 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/f734ad67/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 e8b61e7..a90ccc4 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
@@ -1028,8 +1028,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;
@@ -1171,8 +1170,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