Hi,

It is not clear why you have two submit buttons in HTML.
I think you need just one - AjaxButton.
It will submit the form via Ajax and if errors occur then its
#onError(AjaxRequestTarget) will be called.
If everything is OK then #onSubmit() will be called.
In both cases you have AjaxRequestTarget around to close the ModalWindow.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Apr 21, 2015 at 9:09 AM, Ulrich <for...@gombers.de> wrote:

> I have already  asked this question
> <
> http://apache-wicket.1842946.n4.nabble.com/Modal-panel-reloaded-when-selecting-from-DropDownChoice-td4670394.html
> >
> but maybe it was off topic there.
>
> The Modal Window provides the method #close(AjaxRequestTarget). But I want
> to provide a Button to validate entered data and display a message in case
> of error otherwise close.
> If I use AjaxSubmitButton() to handle the button the message is not part of
> the target and not updated. I I use Link() the message becomes updated but
> I
> have no means to close the window.
> HTML:
>
>
> Java:
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/How-to-close-a-ModalWindow-without-AjaxRequestTarget-tp4670429.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
>
>

Reply via email to