Would it work to add a behavior to the component, passing behavior's url to Toastr and calling this url via Wicket.Ajax?
In the behavior you would then redirect to the page you need.



On 07/27/2017 04:43 PM, Martin Grigorov wrote:
You will have to do some refactoring ...

Instead of using Wicket's setResponsePage() you will need to use Toastr's
callbacks

toastr.options.onHidden = function() { console.log('goodbye');
}toastr.options.onCloseClick = function() { console.log('close button
clicked'); }


and do the redirect with JavaScript: document.location='../the/next/page';

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

On Thu, Jul 27, 2017 at 5:18 PM, ssamarin <stepan.sama...@gmail.com> wrote:

I probably don't need a label, problem is that onSubmit of the form
typically
calls redirect to another page.

I tried AjaxButton, but can't get redirect being called *after* toastr
popup
shows up. Ideally, I want popup, wait few seconds till it closes (or user
closes it) - do redirect.

--
View this message in context: http://apache-wicket.1842946.
n4.nabble.com/Toastr-popups-and-Form-s-onSubmit-tp4678320p4678329.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