why are you attaching a new ajaxformsubmitbehavior to an ajaxbutton ,it already has it's own ? if you want to pass some request parameter ,you can set it to the request by tester.getRequest().setParameter(key,value)
On Fri, Aug 17, 2012 at 12:09 PM, JCoder <i...@jcoder.de> wrote: > Hi Vineet, > > "wickettester#ajaxEvent(button,"onclick") " is what I already tried. And it > worked better but not finally finsihed. > The cause of the next problem is that I need to provide some request > parameter for this request since my application reads request and throws an > exception if it can't find special parameters. > Then I changed my code to provide some ajax request parameter because the > button click is an instance of AjaxButton: > > " > Component comp = tester > > .getComponentFromLastRenderedPage("myForm:myAjaxButton"); > AjaxEventBehavior behavior = new > AjaxFormSubmitBehavior("onclick") { > > @Override > protected void onSubmit(AjaxRequestTarget target) { > System.out.println("hh"); > } > > @Override > protected void onError(AjaxRequestTarget target) { > // TODO Auto-generated method stub > > } > }; > > comp.add(behavior); > tester.executeAjaxEvent(comp, "onclick"); > " > > Is this the correct to provide ajax request parameter? > If so, I guess I need to chance something in "onSubmit(AjaxRequestTarget)", > true ? > > Regards, > Y > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- regards, Vineet Semwal --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org