that should be enough, alternatively use AjaxLink instead

-igor

On Tue, Sep 28, 2010 at 10:49 AM, LutherBaker <lutherba...@gmail.com> wrote:
>
> I am popping up a ModalWindow with a form - which has Cancel and Submit
> buttons. Unfortunately, I can't get the Cancel button to close the window.
> It keeps submitting to the validator, stays on the form and echos validation
> text to the feedback panel.
>
> I can get it to work with an AjaxLink.
>
>
>    &lt;a href="#" wicket:id="cancel.link"&gt;&lt;wicket:message
> key="Application.cancelButton.label"/&gt;&lt;/a&gt;
>    &lt;input wicket:id="cancel.button" type="button"
> wicket:message="value:Application.cancelButton.label"/&gt;
>
>
>
>                        final AjaxLink cancelLink = new 
> AjaxLink("cancel.link") {
>                                private static final long serialVersionUID = 
> 1L;
>
>                               �...@override
>                                public void onClick(final AjaxRequestTarget 
> target) {
>                                        modal.close(target);
>                                }
>
>                        };
>                        add(cancelLink);
>
>                        final AjaxButton cancel = new 
> AjaxButton("cancel.button",
> AreaEditorForm.this) {
>                                private static final long serialVersionUID = 
> 1L;
>
>                               �...@override
>                                protected void onSubmit(final 
> AjaxRequestTarget target,
>                                                final Form<?> form) {
>                                        modal.close(target);
>                                }
>                        };
>                        cancel.setDefaultFormProcessing(false);
>                        add(cancel);
>
>
> I thought that I could set default form processing = false but that doesn't
> seem to be enough.
>
> Thoughts?
>
> -Luther
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Cancelling-ala-AjaxLink-vs-AjaxButton-tp2717635p2717635.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to