You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by rodrigo benenson <ro...@gmail.com> on 2009/03/23 10:50:23 UTC

Testing a Form with AjaxButton

Hello there !
Could someone point me out the correct way of testing a Form that has
an AjaxButton in Wicket 1.4-rc2 ?

calling

form_tester.submit()
or
form_tester.submit("button-id")
or
tester.executeAjaxEvent("button-id", "onclick");

does not seem to do what I expect. The first cases does not call the
AjaxButton onSubmit method and the last one does not take into account
the form.setValue(...) calls.

I could not find a relevant example online....

Thanks for you answer.
Regards,
rodrigob.

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


Re: Testing a Form with AjaxButton

Posted by rodrigo benenson <ro...@gmail.com>.
that was the solution !
Thanks for your answer.
Regards,
rodrigob.

On Mon, Mar 23, 2009 at 12:46 PM, Per Newgro <pe...@gmx.ch> wrote:
> rodrigo benenson schrieb:
>>
>> Hello there !
>> Could someone point me out the correct way of testing a Form that has
>> an AjaxButton in Wicket 1.4-rc2 ?
>>
>> calling
>>
>> form_tester.submit()
>> or
>> form_tester.submit("button-id")
>> or
>> tester.executeAjaxEvent("button-id", "onclick");
>>
>> does not seem to do what I expect. The first cases does not call the
>> AjaxButton onSubmit method and the last one does not take into account
>> the form.setValue(...) calls.
>>
>> I could not find a relevant example online....
>>
>> Thanks for you answer.
>> Regards,
>> rodrigob.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> Did you try
>
> form_tester.submit()
> or
> form_tester.submit("button-id")
> AND
> tester.executeAjaxEvent("button-id", "onclick");
>
> ?
>
> Cheers
> Per
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: Testing a Form with AjaxButton

Posted by Per Newgro <pe...@gmx.ch>.
rodrigo benenson schrieb:
> Hello there !
> Could someone point me out the correct way of testing a Form that has
> an AjaxButton in Wicket 1.4-rc2 ?
>
> calling
>
> form_tester.submit()
> or
> form_tester.submit("button-id")
> or
> tester.executeAjaxEvent("button-id", "onclick");
>
> does not seem to do what I expect. The first cases does not call the
> AjaxButton onSubmit method and the last one does not take into account
> the form.setValue(...) calls.
>
> I could not find a relevant example online....
>
> Thanks for you answer.
> Regards,
> rodrigob.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>   
Did you try

form_tester.submit()
or
form_tester.submit("button-id")
AND
tester.executeAjaxEvent("button-id", "onclick");

?

Cheers
Per

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