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

RadioGroup WicktTester with a AjaxSubmitLink fails


    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5.0
    • Fix Version/s: 1.5.1
    • Component/s: wicket
    • Labels:


      After migrating to Wicket 1.5.0 some of our WicketTester unit-tests fail, they involve a RadioGroup component with a Enum as model. The setup works correctly at runtime. The problem is as follows:

      The enum (simplified enum, for demonstration purposes): public enum ValEnum

      { VAL_A, VAL_B; }

      A form containing a RadioGroup, the individual Radio components are based on the Enum values. When submiting the form (using a AjaxSubmitLink) containing the RadioGroup in a WicktTester situation a WicketRuntimeException is thrown containing:
      org.apache.wicket.WicketRuntimeException: submitted http post value [VAL_A] for RadioGroup component [1:form:group] is illegal because it does not contain relative path to a Radio component. Due to this the RadioGroup component cannot resolve the selected Radio component pointed to by the illegal value. A possible reason is that component hierarchy changed between rendering and form submission.

      It works correctly when submitting the form using a normal SubmitLink.

      Debugging the select function of the FormTester shows te correct value being placed in the PostParameters ("radio1" is the value being set).


        1. myproject.zip
          25 kB
          Dries Schulten

          Issue Links



              • Assignee:
                ivaynberg Igor Vaynberg
                dries.schulten Dries Schulten
              • Votes:
                0 Vote for this issue
                1 Start watching this issue


                • Created: