Updated Branches: refs/heads/wicket-6.x 512a573e1 -> 9bd0e07b3
Revert "AAU-5462 fix npe in ajax form component label repainting" incorrect jira number This reverts commit 512a573e15753e905e1aafbf9b451d0460e6ba2f. Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/2f52df61 Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/2f52df61 Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/2f52df61 Branch: refs/heads/wicket-6.x Commit: 2f52df61f45f747a6e42d51b73c2f02aa49f6b66 Parents: 512a573 Author: Igor Vaynberg <[email protected]> Authored: Mon Jan 6 10:26:17 2014 -0800 Committer: Igor Vaynberg <[email protected]> Committed: Mon Jan 6 10:26:17 2014 -0800 ---------------------------------------------------------------------- .../src/main/java/org/apache/wicket/markup/html/form/Form.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/2f52df61/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 918edec..a9ea6a6 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 @@ -778,10 +778,10 @@ public class Form<T> extends WebMarkupContainer implements IFormSubmitListener, callOnError(submitter); } - // update auto labels if we are inside an ajax request - final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class); - if (target != null) + + if (((WebRequest)getRequest()).isAjax()) { + final AjaxRequestTarget target = getRequestCycle().find(AjaxRequestTarget.class); visitChildren(FormComponent.class, new IVisitor<FormComponent<?>, Void>() { @Override
