THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
<input type="submit" style="display: none;">
add some javascript to Tell the form to hit the ajaxsubmitbutton when the form is submittedwhich button 'return' should be attached to:
form.add(new AttributeModifier("onSubmit", true, new Model("document.getElementById('" + ajaxSubmitButton.getMarkupId() + "').onclick();return false;"))setDefaultButton(ajaxSubmitButton);