You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2016/10/31 19:42:44 UTC
wicket git commit: WICKET-6264 Form: improve error message for
disabled/invisible IFormSubmittingComponent
Repository: wicket
Updated Branches:
refs/heads/master 3219c6ce5 -> 705a3c262
WICKET-6264 Form: improve error message for disabled/invisible IFormSubmittingComponent
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/705a3c26
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/705a3c26
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/705a3c26
Branch: refs/heads/master
Commit: 705a3c26226cd52159175acbeba6b67e1aa446df
Parents: 3219c6c
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Mon Oct 31 20:42:16 2016 +0100
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Mon Oct 31 20:42:16 2016 +0100
----------------------------------------------------------------------
.../java/org/apache/wicket/markup/html/form/Form.java | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/705a3c26/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 e48fa3d..55a7679 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
@@ -815,16 +815,22 @@ public class Form<T> extends WebMarkupContainer
if (!component.isVisibleInHierarchy())
{
+ Page page = findPage();
throw new WicketRuntimeException("Submit Button " +
- submittingComponent.getInputName() + " (path=" +
- component.getPageRelativePath() + ") is not visible");
+ submittingComponent.getInputName() + " (path=" +
+ component.getPath() + ", pageClass=" +
+ (page == null ? "<unknown>" : page.getPageClass().getName()) +
+ ") is not visible");
}
if (!component.isEnabledInHierarchy())
{
+ Page page = findPage();
throw new WicketRuntimeException("Submit Button " +
- submittingComponent.getInputName() + " (path=" +
- component.getPageRelativePath() + ") is not enabled");
+ submittingComponent.getInputName() + " (path=" +
+ component.getPath() + ", pageClass=" +
+ (page == null ? "<unknown>" : page.getPageClass().getName()) +
+ ") is not enabled");
}
}