The following still happens with actual trunk: On a form like <form wicket:id="myForm"> <table> <tr><td class="rightAligned"><label for="Anmeldename">Anmeldename</label></td> <td><input tabindex="4" id="Anmeldename" size="30" maxlength="40" wicket:id="login" type="text" class="formInput"/></td></tr> <tr><td colspan="4" align="center"><div wicket:id="feedback">Tu den Mecker hierhin</div></td></tr> <tr><td align="right"><input tabindex="7" class="formButton" type="submit" value="speichern" wicket:id="ajax-submit-button"/> </table> ... I have a FeedbackPanel and AjaxSubmitButton The JavaCode looks like this: public MyPanel() { super(parent, id); new MyForm(this, "myForm", ....); } private class MyForm extends Form { private static final long serialVersionUID = 1L;
FeedbackPanel fp1; public MyForm(final MarkupContainer parent, final String id, IModel model) { super(parent, id, model); fp1 = new FeedbackPanel(this, "feedback"); new TextField(this, "login").setRequired(true); new AjaxSubmitButton(this, "ajax-submit-button", this) { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target, Form form) { System.out.println("AjaxOnSubmit called"); target.addComponent(form); } @Override protected void onError(AjaxRequestTarget target, Form form) { System.out.println("AjaxOnSubmit called"); target.addComponent(form); } }; } I must override AjaxSubmitButtons's onError method like above to see a FeedbackPanel if the input for a required field is missing. Shouldn't this happen automatically as default behavior of the original onError mehtod of AjaxSubmitButton? currently I havt to ovveride the onErrorMethod in every AjaxSubmitButton of a Form. Stefan Lindner
<<winmail.dat>>
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user