Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-2744

AjaxFormChoiceComponentUpdatingBehavior cannot find the choice

    XMLWordPrintableJSON

Details

    Description

      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");

      Attachments

        1. ajaxradiochoice.tgz
          4 kB
          Martin Grigorov

        Issue Links

          Activity

            People

              ivaynberg Igor Vaynberg
              martin-g Martin Grigorov (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: