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

Igor Vaynberg resolved WICKET-2744.
-----------------------------------

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

> AjaxFormChoiceComponentUpdatingBehavior cannot find the choice
> --------------------------------------------------------------
>
>                 Key: WICKET-2744
>                 URL: https://issues.apache.org/jira/browse/WICKET-2744
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.6
>            Reporter: Martin Grigorov
>            Assignee: Igor Vaynberg
>             Fix For: 1.4.7, 1.5-M1
>
>         Attachments: ajaxradiochoice.tgz
>
>
> AjaxFormChoiceComponentUpdatingBehavior tries to find the form components 
> (the choices) by iterating the children elements with tagName 'input' and 
> verifying some constraints. One of this constraints have been changed 
> recently and now the children could not be found:
> Index: 
> src/main/java/org/apache/wicket/ajax/form/AjaxFormChoiceComponentUpdatingBehavior.java
> ===================================================================
> --- 
> src/main/java/org/apache/wicket/ajax/form/AjaxFormChoiceComponentUpdatingBehavior.java
>     (revision 909983)
> +++ 
> src/main/java/org/apache/wicket/ajax/form/AjaxFormChoiceComponentUpdatingBehavior.java
>     (working copy)
> @@ -70,7 +70,7 @@
>               asb.append(" for (var i = 0 ; i < inputNodes.length ; i ++) 
> {\n");
>               asb.append(" var inputNode = inputNodes[i];\n");
>               asb.append(" if (!inputNode.type) continue;\n");
> -             asb.append(" if 
> (!(inputNode.className.indexOf('wicket-'+markupId)===0)) continue;\n");
> +             asb.append(" if (!(inputNode.id.indexOf(markupId+'-')===0)) 
> continue;\n");
>               asb.append(" var inputType = inputNode.type.toLowerCase();\n");
>               asb.append(" if (inputType == 'checkbox' || inputType == 
> 'radio') {\n");
>               asb.append(" Wicket.Event.add(inputNode, 'click', 
> callbackScript);\n");

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

Reply via email to