You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Meier (JIRA)" <ji...@apache.org> on 2014/06/18 18:12:25 UTC
[jira] [Closed] (WICKET-5622) WicketTester behaves odd when using
AjaxFormComponentUpdatingBehavior on CheckBox
[ https://issues.apache.org/jira/browse/WICKET-5622?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sven Meier closed WICKET-5622.
------------------------------
Resolution: Invalid
Assignee: Sven Meier
Note that tester.executeAjaxEvent() consumes the current request, which has a value for "state".
For the following call to formTester.submit() you will have to set the value once again.
> WicketTester behaves odd when using AjaxFormComponentUpdatingBehavior on CheckBox
> ---------------------------------------------------------------------------------
>
> Key: WICKET-5622
> URL: https://issues.apache.org/jira/browse/WICKET-5622
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 7.0.0-M1, 6.15.0
> Environment: Windows 7 Prof. x64 latest SP & updates, java version "1.7.0_51"
> Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
> Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
> Reporter: Christoph Radtke
> Assignee: Sven Meier
> Labels: wicket-tester
> Attachments: quickstart-AjaxFormComponentUpdatingBehavior-wickettester.zip
>
>
> I'm using an AjaxFormComponentUpdatingBehavior on a CheckBox which works fine on the page.
> But testing said constraint with WicketTesters FormTester does not react as expected.
> Setup is a form with a checkbox and a submit button. The form has a model (MyModel.class), which binds a boolean ("state") to the checkbox.
> The checkbox has an AjaxFormComponentUpdatingBehavior (i use this in my real project to toggle enabled of certain form components).
> To test the component i use this code:
> FormTester ft = tester.newFormTester("frm");
> ft.setValue("state", true); // setup the value
> tester.executeAjaxEvent(state, "click"); // trigger the ajax event
> ft.submit();
> Surprisingly after submit the state has become false. I discovered the faulty behavior is caused by the AjaxFormComponentUpdatingBehavior.
> Quickstart attached
--
This message was sent by Atlassian JIRA
(v6.2#6252)