You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2010/03/26 15:16:27 UTC

[jira] Resolved: (WICKET-2806) Javascript looking for related radio in group is not working if css class is already assigned to radio

     [ https://issues.apache.org/jira/browse/WICKET-2806?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-2806.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5-M1
         Assignee: Igor Vaynberg

> Javascript looking for related radio in group is not working if css class is already assigned to radio
> ------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-2806
>                 URL: https://issues.apache.org/jira/browse/WICKET-2806
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.7
>         Environment: Windows XP
>            Reporter: Per Newgro
>            Assignee: Igor Vaynberg
>             Fix For: 1.4.8, 1.5-M1
>
>
> We added a RadioGroup and two Radios. We often use multiple css classes for a component. Everything is working, until we add the class attribute to the radios. Then the click on radio is ignored.
> The sad thing is that the tests for behavior with WicketTester are working. This problem is only related to the browsers. So we can't provide a testcase. 
> Sorry you have to check it manually.
> We traced it to the line 73 in AjaxFormChoiceComponentUpdatingBehavior
> <code>
> asb.append(" if (!(inputNode.className.indexOf('wicket-'+markupId)===0)&&!(inputNode.id.indexOf(markupId+'-')===0)) continue;\n");
> </code>
> That means that the className has to start with the appropriate "wicket-markupId" value. But it will be added to the end of the class attribute value in
> line 226 of Radio. So we get "abc wicket-markupId".
> It is working with
> asb.append(" if (!(inputNode.className.indexOf('wicket-'+markupId)>=0 || inputNode.id.indexOf(markupId+'-')>=0)) continue;\n");
> Alternatively the class for identifying in script has to be added at beginning
> Radio line 226:
> clazz = marker + " " + clazz;

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.