The behavior wont work on button. Why don't you use AjaxSubmitButton instead?
-Matej drakonis wrote: > Hi, i have a curious problem. > I have a form with a submit button. If i click the submit button the > onSubmit method of the button is called so is the onSubmit method of the > form. > > And also inside the page i have a button to which i added > > final Button ajaxButton = new Button("ajaxButton"); > ajaxButton.add(new AjaxFormComponentUpdatingBehavior("onclick") { > ..... > }. > > Inside the method i have code that replaces an empty panel with a panel that > has 2 textfields > > add(new TextField("username")); > add(new PasswordTextField("password")); > > The weird problem is that after i click the ajax button and the 2 textfields > appear, clicking on the form's submit button does not call the onSubmit on > neither the button or the form. > So when i do not click the ajax producing button and proced directly to the > form's submit the onSubmit is executed. > If i click the ajaxButton and after that the submit button, the onSubmit is > not called. > > Is this normal? > I'm using Wicket 1.2.2 > > Thank you. ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user