You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Mathijs de Groot (JIRA)" <ji...@apache.org> on 2011/09/01 12:20:10 UTC
[jira] [Commented] (WICKET-3977) Calling FormTester.select for
DropDownChoice invokes onSelectionChanged with null argument
[ https://issues.apache.org/jira/browse/WICKET-3977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13095216#comment-13095216 ]
Mathijs de Groot commented on WICKET-3977:
------------------------------------------
I'm struggling with the same issue.
I think every developer that uses Forms with Dropdowns (and writes good Unit tests) will face this issue.
@Marcel: Thanks for the (not very elegant) workaround. Hope this issue will be fixed soon.
> Calling FormTester.select for DropDownChoice invokes onSelectionChanged with null argument
> ------------------------------------------------------------------------------------------
>
> Key: WICKET-3977
> URL: https://issues.apache.org/jira/browse/WICKET-3977
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5-RC5.1
> Environment: Linux Ubuntu 11.04, Java 1.6.0_26
> Reporter: Marcel Cullens
> Attachments: wicket3977.zip
>
>
> I have a DropDownChoice which has a wantOnSelectionChangedNotifications that returns true, so that the onSelectionChanged is called when the selection changes.
> In a unit test a selection is made for the dropdown using: formTester.select("dropDown", 0);
> The FormTester sets the selected value for the dropdown as a post parameter in the current request and the calls BaseWicketTester#executeListener to process the request for the onSelectionChanged event.
> In BaseWicketTester#executeListener however the the request post parameters previously set are ignored, by creating a new empty request:
> MockHttpServletRequest request = new MockHttpServletRequest(application, httpSession, servletContext);
> I guess either the current request should be used instead of new-ing one or the post parameters should be copied from the current request instance.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira