Re: ModalWindow alert popup that submits form

2020-05-15 Thread Entropy
Issue Resolved.

Another part of the code was found to be setting it back to false in a way
that evaded my previous searches.  Once that was corrected, the AjaxButton
behaves as expected.  Sorry to waste your time.

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: ModalWindow alert popup that submits form

2020-05-15 Thread Sven Meier

Sorry, we seem to speak about different buttons.

Could you create a quickstart? I've used validation in modal dialogs 
plenty of times and it works as expected.


Have fun
Sven


On 14.05.20 19:14, Entropy wrote:

The panel that launches the modal is not inside the form (it's part of a
standard header), so when i remove it from the constructor I get an illegal
state exception saying "form was not specified in the constructor and cannot
be found in the hierarchy of the component this behavior is attached to"

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

-
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



Re: ModalWindow alert popup that submits form

2020-05-14 Thread Entropy
The panel that launches the modal is not inside the form (it's part of a
standard header), so when i remove it from the constructor I get an illegal
state exception saying "form was not specified in the constructor and cannot
be found in the hierarchy of the component this behavior is attached to"

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: ModalWindow alert popup that submits form

2020-05-14 Thread Sven Meier
Hi,

form processing should work as usual in the modal window, including validation 
of course.

Does it make a difference when you let the AjaxButton find its form by itself?

Have fun
Sven

Am 13. Mai 2020 22:29:59 MESZ schrieb Entropy :
>We have a custom popup alert box launched from wicket.  It's build
>around
>org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow.  It
>works
>great in most situations where it's just messaging and doing other
>not-validating things.  But one of the buttons in one scenario needs to
>cause a save (and validate) of the form.  The buttons are based on
>AjaxButton, and the defaultformprocessing flag was set to true on that
>button during initialization.  the button has reference back to the
>form on
>the main page (the form is not INSIDE the modal).
>
>But everytime I submit, the onSubmit() runs instead of the onError()
>despite
>the fact that I deliberately put a validation error in the text that
>DOES
>get trapped on the normal submit process.
>
>Does anyone have an idea of where I should look?  or if this is just
>something you can't do from inside a modalwindow?  
>
>--
>Sent from:
>http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html
>
>-
>To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>For additional commands, e-mail: users-h...@wicket.apache.org


ModalWindow alert popup that submits form

2020-05-13 Thread Entropy
We have a custom popup alert box launched from wicket.  It's build around
org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow.  It works
great in most situations where it's just messaging and doing other
not-validating things.  But one of the buttons in one scenario needs to
cause a save (and validate) of the form.  The buttons are based on
AjaxButton, and the defaultformprocessing flag was set to true on that
button during initialization.  the button has reference back to the form on
the main page (the form is not INSIDE the modal).

But everytime I submit, the onSubmit() runs instead of the onError() despite
the fact that I deliberately put a validation error in the text that DOES
get trapped on the normal submit process.

Does anyone have an idea of where I should look?  or if this is just
something you can't do from inside a modalwindow?  

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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