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
Post a Comment