You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Timo Rantalaiho <Ti...@ri.fi> on 2008/01/01 16:39:36 UTC

Re: {wicket 1.3 rc1}testing ajaxbutton...

On Fri, 14 Dec 2007, Nino Saturnino Martinez Vazquez Wael wrote:
> If I try to execute the event I just get an null pointer exeception like 
> this:
>         wicketTester.executeAjaxEvent("form:ajaxButton", "onclick");
> 
> Should I just check if theres ajax present? And the process the form 
> using the formtester?

Hi, are you sure that the path "form:ajaxButton" is correct?
So if you do

   AjaxButton button = (AjaxButton)
       wicketTester.getComponentFromLastRenederedPage("form:ajaxButton");
   Assert.notNull(button);

does it pass?

What is the stack trace? Is request cycle initialized?
Are you sure that "onclick" is the correct event?

Best wishes,
Timo

-- 
Timo Rantalaiho           
Reaktor Innovations Oy    <URL: http://www.ri.fi/ >

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


Re: {wicket 1.3 rc1}testing ajaxbutton...

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Hi Timo

It was a bug in rc 1 I think, was fixed rc2 as I remember.

Timo Rantalaiho wrote:
> On Fri, 14 Dec 2007, Nino Saturnino Martinez Vazquez Wael wrote:
>   
>> If I try to execute the event I just get an null pointer exeception like 
>> this:
>>         wicketTester.executeAjaxEvent("form:ajaxButton", "onclick");
>>
>> Should I just check if theres ajax present? And the process the form 
>> using the formtester?
>>     
>
> Hi, are you sure that the path "form:ajaxButton" is correct?
> So if you do
>
>    AjaxButton button = (AjaxButton)
>        wicketTester.getComponentFromLastRenederedPage("form:ajaxButton");
>    Assert.notNull(button);
>
> does it pass?
>
> What is the stack trace? Is request cycle initialized?
> Are you sure that "onclick" is the correct event?
>
> Best wishes,
> Timo
>
>   

-- 
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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