[
https://issues.apache.org/jira/browse/WICKET-6099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15157196#comment-15157196
]
Martin Grigorov commented on WICKET-6099:
-----------------------------------------
I am not sure what happens :-/
The browser is Google Chrome 48, Ubuntu 15.10, Wicket 7.2.0.
I have a RadioGroup with two Radios inside with markup like <label><input ..>
Text</label>.
If I use AFCCUB then nothing works. I've overridden the precondition to find
the input inside the label, but still the "checked" attribute is always on the
first radio, and this is what the browser submits.
Now I moved to AFCUB("change") + RadioGroup.setRenderBodyOnly(false) and it
behaves as desired (i.e. as a toggle button).
I'll try to reproduce in a quickstart later.
> AjaxFormChoiceComponentUpdatingBehavior's javascript doesn't work when the
> radio has a label
> --------------------------------------------------------------------------------------------
>
> Key: WICKET-6099
> URL: https://issues.apache.org/jira/browse/WICKET-6099
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 7.2.0
> Reporter: Martin Grigorov
>
> AjaxFormChoiceComponentUpdatingBehavior's JS precondition
> {code}
> return attrs.event.target.name === '%s'", getFormComponent().getInputName()
> {code}
> doesn't work in case the input is used with a label like
> {code}
> <label>Blah <input .../></label>
> {code}
> or
> {code}
> <label for="x">Blah</label>
> <input id="x" .../>
> {code}
> In these case the event target is the label.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)