Description
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).
Attachments
Attachments
Issue Links
- is duplicated by
-
WICKET-4069 Wickettester: submit select via AJAX
- Resolved