You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Jean-Baptiste Quenot (JIRA)" <ji...@apache.org> on 2007/03/06 15:28:25 UTC

[jira] Commented: (WICKET-165) While testing with FormTester: onSelectionChanged is not being invoked if DropDownChoice is enabled for notifications

    [ https://issues.apache.org/jira/browse/WICKET-165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12478422 ] 

Jean-Baptiste Quenot commented on WICKET-165:
---------------------------------------------

As a workaround you could call executeListener(Component) yourself.

> While testing with FormTester: onSelectionChanged is not being invoked if DropDownChoice is enabled for notifications
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-165
>                 URL: https://issues.apache.org/jira/browse/WICKET-165
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.2.3
>         Environment: Linux, Java 1.4
>            Reporter: Todor Todorov
>            Priority: Minor
>
> Method DropDownChoice.onSelectionChanged is never called when testing a drop down by calling formTester.select("dropDownChoiceNotified", 0);
> In my page:
> 		form.add(new DropDownChoice("dropDownChoiceNotified", candidateChoices, bookChoiceRenderer) {
> 			private static final long serialVersionUID = 1L;
> 			protected boolean wantOnSelectionChangedNotifications()
> 			{
> 				return true;
> 			}
> 			
> 			protected void onSelectionChanged(Object arg0) {
> 				super.onSelectionChanged(arg0);
> 				
> 				throw new RuntimeException("notification "+arg0);
> 			}
> 		});
> In my unit Test  I do:
> 		formTester.select("dropDownChoiceNotified", 0);
> and the drop down component is not being notified.
> It works fine when testing in a container though.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.