[
https://issues.apache.org/jira/browse/WICKET-4670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martin Grigorov resolved WICKET-4670.
-------------------------------------
Resolution: Not A Problem
There were two issues:
1) the formcomponent inputname is just "combo1", not "form:combo1". Sorry about
the confusion.
2) You were submitting value "0" which is none of the available ones and thus
dropDown.getConvertedInput() returned null, since 0 do not convert to any
DomainObject.
Here is the code that works:
@Test
public void testAjaxDropDownMartin() {
WicketTester tester= new WicketTester(new WicketApplication());
tester.startPage(AjaxDropDown.class);
tester.getRequest().setParameter("combo1", "1");
tester.executeAjaxEvent("form:combo1", "onchange");
tester.assertNoErrorMessage();
}
> Unable to use wicket tester to simulate ajax behavior
> -----------------------------------------------------
>
> Key: WICKET-4670
> URL: https://issues.apache.org/jira/browse/WICKET-4670
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.7
> Environment: windows and mac jdk 1.7 and 1.6
> Reporter: Giovanni Cuccu
> Priority: Minor
> Attachments: quickstart.zip, quickstart_maven.zip
>
>
> The tester is unable to simulate what happens on the browser when an ajax
> behaviour is attached to a dropdown choice. The test case that fails is
> included an is WicketTesterAjaxDropDown
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira