Author: ivaynberg Date: Fri Mar 26 14:14:53 2010 New Revision: 927861 URL: http://svn.apache.org/viewvc?rev=927861&view=rev Log: WICKET-2806 Javascript looking for related radio in group is not working if css class is already assigned to radio Issue: WICKET-2806
Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/form/AjaxFormChoiceComponentUpdatingBehavior.java Modified: wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/form/AjaxFormChoiceComponentUpdatingBehavior.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/form/AjaxFormChoiceComponentUpdatingBehavior.java?rev=927861&r1=927860&r2=927861&view=diff ============================================================================== --- wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/form/AjaxFormChoiceComponentUpdatingBehavior.java (original) +++ wicket/trunk/wicket/src/main/java/org/apache/wicket/ajax/form/AjaxFormChoiceComponentUpdatingBehavior.java Fri Mar 26 14:14:53 2010 @@ -70,7 +70,7 @@ public abstract class AjaxFormChoiceComp 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)&&!(inputNode.id.indexOf(markupId+'-')===0)) continue;\n"); + asb.append(" if (!(inputNode.className.indexOf('wicket-'+markupId)>=0)&&!(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");