You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by David Hendrix <wi...@unbewaff.net> on 2011/03/31 23:41:31 UTC

Strange behaviour in WicketTester when Ajax-clicking on a deselected checkbox

Hi there,

I'm experiencing some weird behaviour in WicketTester. Running the code 
in jetty gives the expected results.

I've got an AjaxCheckbox with a PropertyModel. When ajax-clicking in in 
WicketTester, when the model is true, everything works as expected but 
ajax-clicking it when the model is false doesn't result in a call of the 
model's setter even in onUpdate is executed (Breakpoints and jUnit-Asserts)

Is this some known issue or am I doing something wrong?

I created a quickstart replicating this for Wicket 1.4.15, didn't try 
another version yet...

Thanks for your help
David

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Strange behaviour in WicketTester when Ajax-clicking on a deselected checkbox

Posted by David Hendrix <wi...@unbewaff.net>.
On 01.04.2011 00:25, Pedro Santos wrote:
> Hi David, looks like a bug, please create a ticket + upload the quickstart.
> As a side note, wicket tester do not encode the form state between requests.
> If you submit a form a second time, the request parameters for fields you
> didn't set will be empty, and will look like the user had cleared the form.
> <https://issues.apache.org/jira/browse/WICKET-1826>

Thanks Pedro,

upon further investigation, I found out, that I was wrong...
I was under the delusion, that with an AjaxCheckBox executing the 
onClick would be sufficient and thus didn't call FormTester.setValue(), 
which resulted in the Model being false after my test in any case (which 
looked OK for deselecting checkboxes).

Thanks for your reply anyway, I really appreciate the help one can get 
on this list.

David Hendrix

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Strange behaviour in WicketTester when Ajax-clicking on a deselected checkbox

Posted by Pedro Santos <pe...@gmail.com>.
Hi David, looks like a bug, please create a ticket + upload the quickstart.
As a side note, wicket tester do not encode the form state between requests.
If you submit a form a second time, the request parameters for fields you
didn't set will be empty, and will look like the user had cleared the form.
<https://issues.apache.org/jira/browse/WICKET-1826>

On Thu, Mar 31, 2011 at 6:41 PM, David Hendrix <wi...@unbewaff.net>wrote:

> Hi there,
>
> I'm experiencing some weird behaviour in WicketTester. Running the code in
> jetty gives the expected results.
>
> I've got an AjaxCheckbox with a PropertyModel. When ajax-clicking in in
> WicketTester, when the model is true, everything works as expected but
> ajax-clicking it when the model is false doesn't result in a call of the
> model's setter even in onUpdate is executed (Breakpoints and jUnit-Asserts)
>
> Is this some known issue or am I doing something wrong?
>
> I created a quickstart replicating this for Wicket 1.4.15, didn't try
> another version yet...
>
> Thanks for your help
> David
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos