Dear Wicket Boffins, I have a Wicket 6 app that I’ve recently migrated to Wicket 7. In the app there is a form whose AjaxSubmitLink hides the form as part of the submit. In Wicket7, this causes a ListenerInvocationNotAllowedException to be thrown, since the component that submitted the form is no longer visible. What is the approved “wicket way” to do what I’m attempting?
Thanks in advance. -Don Here’s a stripped down version of the code: JAVA: public class TestPage extends WebPage { public TestPage() { Form form = new Form("form"); form.add(new AjaxSubmitLink("submit") { @Override protected void onSubmit(AjaxRequestTarget target, Form<?> form) { super.onSubmit(target, form); form.setVisible(false); target.add(form); } }); add(form.setOutputMarkupPlaceholderTag(true)); } } HTML: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org"> <body> <h3>Test Form Submit Hides Form</h3> <form wicket:id="form"> <h4>Form Element</h4> <input type="submit" wicket:id="submit" value="Submit"/> </form> </body> EXCEPTION THROWN ON SUBMIT: org.apache.wicket.core.request.handler.ListenerInvocationNotAllowedException: Component rejected interface invocationComponent: [Form [Component id = form]] Listener: [RequestListenerInterface name=IFormSubmitListener, method=public abstract void org.apache.wicket.markup.html.form.IFormSubmitListener.onFormSubmitted()] at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:212) at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:241) at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:234) … --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org