I have something I do not understand in Wicket. I created an AJAX Button with an override method onSubmit() linked with my HTML page. Once I press the button the method is not call.
Here the 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 the HTML:
<button type="submit" value="save" wicket:id="save_ext" class="btn btn-success" id="buttonSave_ext" onclick="saveFunction()">Save</button>
Do you have an idea how to solve the problem.
Thanks