wicket 6 - AjaxButton onSubmit not called -


i have not understand in wicket. created ajax button override method onsubmit() linked html page. once press button method not call.

here java code:

  ajaxbutton savebutton = (ajaxbutton) new ajaxbutton("save_ext", form) {          @override         protected void onerror(ajaxrequesttarget target, form<?> form) {             super.onerror(target, form); //to change body of generated methods, choose tools | templates.             system.out.println("save button ajax error");         }          @override         public void onsubmit(ajaxrequesttarget target, form<?> form) {               system.out.println("save form");     }.setoutputmarkupid(true); 

form.add(savebutton);

here html:

<button type="submit" value="save" wicket:id="save_ext" class="btn btn-success" id="buttonsave_ext" onclick="savefunction()">save</button> 

do have idea how solve problem.

thanks

check in devtools/firebug whether there ajax request made clicking on button. see have "onclick" function in markup. if returns false other event listeners won't executed, i.e. wicket's click listener won't fire ajax call notify server side.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -