Repository: wicket Updated Branches: refs/heads/wicket-6.x b21471a4a -> 469f189c0
WICKET-5537 Wicket.DOM.toggleClass is called with additional "#" inside AutoLabelResolver Project: http://git-wip-us.apache.org/repos/asf/wicket/repo Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/469f189c Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/469f189c Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/469f189c Branch: refs/heads/wicket-6.x Commit: 469f189c09af1c72a56ec8779c88ff4b64a97d16 Parents: b21471a Author: Martin Tzvetanov Grigorov <mgrigo...@apache.org> Authored: Wed Mar 19 17:30:49 2014 +0200 Committer: Martin Tzvetanov Grigorov <mgrigo...@apache.org> Committed: Wed Mar 19 17:30:49 2014 +0200 ---------------------------------------------------------------------- .../org/apache/wicket/markup/html/form/AutoLabelResolver.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/wicket/blob/469f189c/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java ---------------------------------------------------------------------- diff --git a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java index ecbe9c2..d3f9a2e 100644 --- a/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java +++ b/wicket-core/src/main/java/org/apache/wicket/markup/html/form/AutoLabelResolver.java @@ -226,14 +226,14 @@ public class AutoLabelResolver implements IComponentResolver if (isRequired() != required) { - target.appendJavaScript(String.format("Wicket.DOM.toggleClass('#%s', '%s', %s);", + target.appendJavaScript(String.format("Wicket.DOM.toggleClass('%s', '%s', %s);", getLabelIdFor(component), component.getString(CSS_REQUIRED_KEY, null, CSS_REQUIRED_DEFAULT), required)); } if (isEnabled() != enabled) { - target.appendJavaScript(String.format("Wicket.DOM.toggleClass('#%s', '%s', %s);", + target.appendJavaScript(String.format("Wicket.DOM.toggleClass('%s', '%s', %s);", getLabelIdFor(component), component.getString(CSS_DISABLED_KEY, null, CSS_DISABLED_DEFAULT), !enabled)); }