I have basically the following

Form<String> typeInForm = new Form<String>("typeInForm") {
      protected void onSubmit()

    AjaxFormSubmitBehavior ajax = new AjaxFormSubmitBehavior("onkeyup") {

      protected void onSubmit(AjaxRequestTarget target) {


When the user just enter something in the the text field the both the form
onSubmit gets called once and the AjaxFormSubmitBehavior onSubmit  also
gets called. So far so good. However when the user hits return on the page
the forms onSubmit gets called twice. Looking at the call stack the second
call is coming from the AjaxFormSubmitBehavior.onEvent which intern calls

We need the form onSubmits because if the  user hits return  the
AjaxFormSubmitBehavior onSubmit never gets called.

How can I stop onSubmit getting called twice? I looked for a
'markformsubmitdone' or something but didn't see anything

many thanks

Reply via email to